Split gdata_file_system_interface.h from gdata_file_system.h
[chromium-blink-merge.git] / chrome / browser / chromeos / choose_mobile_network_dialog.cc
blob567d2c601ffa2a3708be50c341f497971d85e86d
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/chromeos/choose_mobile_network_dialog.h"
7 #include "chrome/browser/chromeos/login/user_manager.h"
8 #include "chrome/browser/profiles/profile_manager.h"
9 #include "chrome/browser/ui/browser_dialogs.h"
10 #include "chrome/common/url_constants.h"
11 #include "ui/gfx/size.h"
13 using content::WebContents;
14 using content::WebUIMessageHandler;
16 namespace {
18 // Default width/height of the dialog.
19 const int kDefaultWidth = 350;
20 const int kDefaultHeight = 225;
22 } // namespace
24 namespace chromeos {
26 // static
27 void ChooseMobileNetworkDialog::ShowDialog(gfx::NativeWindow owning_window) {
28 chrome::ShowWebDialog(owning_window,
29 ProfileManager::GetDefaultProfileOrOffTheRecord(),
30 new ChooseMobileNetworkDialog);
33 ChooseMobileNetworkDialog::ChooseMobileNetworkDialog() {
36 ui::ModalType ChooseMobileNetworkDialog::GetDialogModalType() const {
37 return ui::MODAL_TYPE_SYSTEM;
40 string16 ChooseMobileNetworkDialog::GetDialogTitle() const {
41 return string16();
44 GURL ChooseMobileNetworkDialog::GetDialogContentURL() const {
45 return GURL(chrome::kChromeUIChooseMobileNetworkURL);
48 void ChooseMobileNetworkDialog::GetWebUIMessageHandlers(
49 std::vector<WebUIMessageHandler*>* handlers) const {
52 void ChooseMobileNetworkDialog::GetDialogSize(gfx::Size* size) const {
53 size->SetSize(kDefaultWidth, kDefaultHeight);
56 std::string ChooseMobileNetworkDialog::GetDialogArgs() const {
57 return "[]";
60 void ChooseMobileNetworkDialog::OnDialogClosed(const std::string& json_retval) {
61 delete this;
64 void ChooseMobileNetworkDialog::OnCloseContents(WebContents* source,
65 bool* out_close_dialog) {
66 if (out_close_dialog)
67 *out_close_dialog = true;
70 bool ChooseMobileNetworkDialog::ShouldShowDialogTitle() const {
71 return false;
74 bool ChooseMobileNetworkDialog::HandleContextMenu(
75 const content::ContextMenuParams& params) {
76 // Disable context menu.
77 return true;
80 } // namespace chromeos