OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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/choose_mobile_network_dialog.h" | 5 #include "chrome/browser/chromeos/choose_mobile_network_dialog.h" |
6 | 6 |
7 #include "chrome/browser/chromeos/login/user_manager.h" | 7 #include "chrome/browser/chromeos/login/user_manager.h" |
8 #include "chrome/browser/profiles/profile_manager.h" | 8 #include "chrome/browser/profiles/profile_manager.h" |
9 #include "chrome/browser/ui/browser_dialogs.h" | 9 #include "chrome/browser/ui/browser_dialogs.h" |
10 #include "chrome/common/url_constants.h" | 10 #include "chrome/common/url_constants.h" |
11 #include "ui/gfx/size.h" | 11 #include "ui/gfx/size.h" |
12 | 12 |
13 using content::WebContents; | 13 using content::WebContents; |
14 using content::WebUIMessageHandler; | 14 using content::WebUIMessageHandler; |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 // Default width/height of the dialog. | 18 // Default width/height of the dialog. |
19 const int kDefaultWidth = 350; | 19 const int kDefaultWidth = 350; |
20 const int kDefaultHeight = 225; | 20 const int kDefaultHeight = 225; |
21 | 21 |
22 } // namespace | 22 } // namespace |
23 | 23 |
24 namespace chromeos { | 24 namespace chromeos { |
25 | 25 |
26 // static | 26 // static |
27 void ChooseMobileNetworkDialog::ShowDialog(gfx::NativeWindow owning_window) { | 27 void ChooseMobileNetworkDialog::ShowDialog(gfx::NativeWindow owning_window) { |
28 chrome::ShowWebDialog(owning_window, | 28 chrome::ShowWebDialog(owning_window, |
29 ProfileManager::GetDefaultProfileOrOffTheRecord(), | 29 ProfileManager::GetActiveUserProfileOrOffTheRecord(), |
Mr4D (OOO till 08-26)
2013/12/16 18:31:31
GetActiveUserProfile. Please not OrOffTheRecord (i
michaelpg
2013/12/16 18:48:13
Sorry, that's right.
| |
30 new ChooseMobileNetworkDialog); | 30 new ChooseMobileNetworkDialog); |
31 } | 31 } |
32 | 32 |
33 ChooseMobileNetworkDialog::ChooseMobileNetworkDialog() { | 33 ChooseMobileNetworkDialog::ChooseMobileNetworkDialog() { |
34 } | 34 } |
35 | 35 |
36 ui::ModalType ChooseMobileNetworkDialog::GetDialogModalType() const { | 36 ui::ModalType ChooseMobileNetworkDialog::GetDialogModalType() const { |
37 return ui::MODAL_TYPE_SYSTEM; | 37 return ui::MODAL_TYPE_SYSTEM; |
38 } | 38 } |
39 | 39 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
71 return false; | 71 return false; |
72 } | 72 } |
73 | 73 |
74 bool ChooseMobileNetworkDialog::HandleContextMenu( | 74 bool ChooseMobileNetworkDialog::HandleContextMenu( |
75 const content::ContextMenuParams& params) { | 75 const content::ContextMenuParams& params) { |
76 // Disable context menu. | 76 // Disable context menu. |
77 return true; | 77 return true; |
78 } | 78 } |
79 | 79 |
80 } // namespace chromeos | 80 } // namespace chromeos |
OLD | NEW |