This source file includes following definitions.
- ShowDialog
- GetDialogModalType
- GetDialogTitle
- GetDialogContentURL
- GetWebUIMessageHandlers
- GetDialogSize
- GetDialogArgs
- OnDialogClosed
- OnCloseContents
- ShouldShowDialogTitle
- HandleContextMenu
#include "chrome/browser/chromeos/choose_mobile_network_dialog.h"
#include "chrome/browser/chromeos/login/user_manager.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/common/url_constants.h"
#include "ui/gfx/size.h"
using content::WebContents;
using content::WebUIMessageHandler;
namespace {
const int kDefaultWidth = 350;
const int kDefaultHeight = 225;
}
namespace chromeos {
void ChooseMobileNetworkDialog::ShowDialog(gfx::NativeWindow owning_window) {
chrome::ShowWebDialog(owning_window,
ProfileManager::GetActiveUserProfile(),
new ChooseMobileNetworkDialog);
}
ChooseMobileNetworkDialog::ChooseMobileNetworkDialog() {
}
ui::ModalType ChooseMobileNetworkDialog::GetDialogModalType() const {
return ui::MODAL_TYPE_SYSTEM;
}
base::string16 ChooseMobileNetworkDialog::GetDialogTitle() const {
return base::string16();
}
GURL ChooseMobileNetworkDialog::GetDialogContentURL() const {
return GURL(chrome::kChromeUIChooseMobileNetworkURL);
}
void ChooseMobileNetworkDialog::GetWebUIMessageHandlers(
std::vector<WebUIMessageHandler*>* handlers) const {
}
void ChooseMobileNetworkDialog::GetDialogSize(gfx::Size* size) const {
size->SetSize(kDefaultWidth, kDefaultHeight);
}
std::string ChooseMobileNetworkDialog::GetDialogArgs() const {
return "[]";
}
void ChooseMobileNetworkDialog::OnDialogClosed(const std::string& json_retval) {
delete this;
}
void ChooseMobileNetworkDialog::OnCloseContents(WebContents* source,
bool* out_close_dialog) {
if (out_close_dialog)
*out_close_dialog = true;
}
bool ChooseMobileNetworkDialog::ShouldShowDialogTitle() const {
return false;
}
bool ChooseMobileNetworkDialog::HandleContextMenu(
const content::ContextMenuParams& params) {
return true;
}
}