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

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

Issue 10695122: chromeos: Use chrome::ShowWebDialog to avoid depending in web_dialog_view.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/login_web_dialog.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/views/web_dialog_view.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/views/view.h" 11 #include "ui/gfx/size.h"
12 #include "ui/views/widget/widget.h"
13 12
14 using content::WebContents; 13 using content::WebContents;
15 using content::WebUIMessageHandler; 14 using content::WebUIMessageHandler;
16 15
17 namespace { 16 namespace {
18 17
19 // Default width/height of the dialog. 18 // Default width/height of the dialog.
20 const int kDefaultWidth = 350; 19 const int kDefaultWidth = 350;
21 const int kDefaultHeight = 225; 20 const int kDefaultHeight = 225;
22 21
23 } // namespace 22 } // namespace
24 23
25 namespace chromeos { 24 namespace chromeos {
26 25
27 // static 26 // static
28 void ChooseMobileNetworkDialog::ShowDialog(gfx::NativeWindow owning_window) { 27 void ChooseMobileNetworkDialog::ShowDialog(gfx::NativeWindow owning_window) {
29 views::Widget::CreateWindowWithParent( 28 chrome::ShowWebDialog(owning_window,
30 new WebDialogView(ProfileManager::GetDefaultProfileOrOffTheRecord(), 29 ProfileManager::GetDefaultProfileOrOffTheRecord(),
31 new ChooseMobileNetworkDialog), 30 new ChooseMobileNetworkDialog);
32 owning_window)->Show();
33 } 31 }
34 32
35 ChooseMobileNetworkDialog::ChooseMobileNetworkDialog() { 33 ChooseMobileNetworkDialog::ChooseMobileNetworkDialog() {
36 } 34 }
37 35
38 ui::ModalType ChooseMobileNetworkDialog::GetDialogModalType() const { 36 ui::ModalType ChooseMobileNetworkDialog::GetDialogModalType() const {
39 return ui::MODAL_TYPE_SYSTEM; 37 return ui::MODAL_TYPE_SYSTEM;
40 } 38 }
41 39
42 string16 ChooseMobileNetworkDialog::GetDialogTitle() const { 40 string16 ChooseMobileNetworkDialog::GetDialogTitle() const {
(...skipping 30 matching lines...) Expand all
73 return false; 71 return false;
74 } 72 }
75 73
76 bool ChooseMobileNetworkDialog::HandleContextMenu( 74 bool ChooseMobileNetworkDialog::HandleContextMenu(
77 const content::ContextMenuParams& params) { 75 const content::ContextMenuParams& params) {
78 // Disable context menu. 76 // Disable context menu.
79 return true; 77 return true;
80 } 78 }
81 79
82 } // namespace chromeos 80 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/login_web_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698