Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Side by Side Diff: chrome/browser/chromeos/ui/choose_mobile_network_dialog.cc

Issue 2446573003: chromeos: Make "mobile network" and "set time" dialogs work with mash (Closed)
Patch Set: cleanup Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/ui/choose_mobile_network_dialog.h" 5 #include "chrome/browser/chromeos/ui/choose_mobile_network_dialog.h"
6 6
7 #include "ash/public/cpp/shell_window_ids.h"
7 #include "chrome/browser/profiles/profile_manager.h" 8 #include "chrome/browser/profiles/profile_manager.h"
9 #include "chrome/browser/ui/ash/web_dialog_util.h"
8 #include "chrome/browser/ui/browser_dialogs.h" 10 #include "chrome/browser/ui/browser_dialogs.h"
9 #include "chrome/common/url_constants.h" 11 #include "chrome/common/url_constants.h"
10 #include "ui/gfx/geometry/size.h" 12 #include "ui/gfx/geometry/size.h"
11 13
12 using content::WebContents; 14 using content::WebContents;
13 using content::WebUIMessageHandler; 15 using content::WebUIMessageHandler;
14 16
15 namespace { 17 namespace {
16 18
17 // Default width/height of the dialog. 19 // Default width/height of the dialog.
18 const int kDefaultWidth = 350; 20 const int kDefaultWidth = 350;
19 const int kDefaultHeight = 225; 21 const int kDefaultHeight = 225;
20 22
21 } // namespace 23 } // namespace
22 24
23 namespace chromeos { 25 namespace chromeos {
24 26
25 // static 27 // static
26 void ChooseMobileNetworkDialog::ShowDialog(gfx::NativeWindow owning_window) { 28 void ChooseMobileNetworkDialog::ShowDialog(gfx::NativeWindow owning_window) {
27 chrome::ShowWebDialog(owning_window, 29 chrome::ShowWebDialog(owning_window,
28 ProfileManager::GetActiveUserProfile(), 30 ProfileManager::GetActiveUserProfile(),
29 new ChooseMobileNetworkDialog); 31 new ChooseMobileNetworkDialog);
30 } 32 }
31 33
34 // static
35 void ChooseMobileNetworkDialog::ShowDialogInContainer(int container_id) {
36 DCHECK_NE(container_id, ash::kShellWindowId_Invalid);
msw 2016/10/24 22:18:09 q: only a couple ids are really expected here, rig
James Cook 2016/10/25 00:29:04 Good idea. Done.
37 chrome::ShowWebDialogInContainer(container_id,
38 ProfileManager::GetActiveUserProfile(),
39 new ChooseMobileNetworkDialog);
40 }
41
32 ChooseMobileNetworkDialog::ChooseMobileNetworkDialog() { 42 ChooseMobileNetworkDialog::ChooseMobileNetworkDialog() {
33 } 43 }
34 44
35 ui::ModalType ChooseMobileNetworkDialog::GetDialogModalType() const { 45 ui::ModalType ChooseMobileNetworkDialog::GetDialogModalType() const {
36 return ui::MODAL_TYPE_SYSTEM; 46 return ui::MODAL_TYPE_SYSTEM;
37 } 47 }
38 48
39 base::string16 ChooseMobileNetworkDialog::GetDialogTitle() const { 49 base::string16 ChooseMobileNetworkDialog::GetDialogTitle() const {
40 return base::string16(); 50 return base::string16();
41 } 51 }
(...skipping 27 matching lines...) Expand all
69 return false; 79 return false;
70 } 80 }
71 81
72 bool ChooseMobileNetworkDialog::HandleContextMenu( 82 bool ChooseMobileNetworkDialog::HandleContextMenu(
73 const content::ContextMenuParams& params) { 83 const content::ContextMenuParams& params) {
74 // Disable context menu. 84 // Disable context menu.
75 return true; 85 return true;
76 } 86 }
77 87
78 } // namespace chromeos 88 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698