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

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

Issue 10214001: WebDialogs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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
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/sim_dialog_delegate.h" 5 #include "chrome/browser/chromeos/sim_dialog_delegate.h"
6 6
7 #include "base/stringprintf.h" 7 #include "base/stringprintf.h"
8 #include "chrome/browser/chromeos/login/user_manager.h" 8 #include "chrome/browser/chromeos/login/user_manager.h"
9 #include "chrome/browser/profiles/profile_manager.h" 9 #include "chrome/browser/profiles/profile_manager.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
11 #include "chrome/browser/ui/browser_list.h" 11 #include "chrome/browser/ui/browser_list.h"
12 #include "chrome/browser/ui/views/html_dialog_view.h" 12 #include "chrome/browser/ui/views/web_dialog_view.h"
13 #include "chrome/common/url_constants.h" 13 #include "chrome/common/url_constants.h"
14 #include "ui/views/view.h" 14 #include "ui/views/view.h"
15 #include "ui/views/widget/widget.h" 15 #include "ui/views/widget/widget.h"
16 16
17 using content::WebContents; 17 using content::WebContents;
18 using content::WebUIMessageHandler; 18 using content::WebUIMessageHandler;
19 19
20 namespace { 20 namespace {
21 21
22 // Default width/height of the dialog. 22 // Default width/height of the dialog.
(...skipping 18 matching lines...) Expand all
41 const char kSimDialogSetLockOffMode[] = "set-lock-off"; 41 const char kSimDialogSetLockOffMode[] = "set-lock-off";
42 42
43 } // namespace 43 } // namespace
44 44
45 namespace chromeos { 45 namespace chromeos {
46 46
47 // static 47 // static
48 void SimDialogDelegate::ShowDialog(gfx::NativeWindow owning_window, 48 void SimDialogDelegate::ShowDialog(gfx::NativeWindow owning_window,
49 SimDialogMode mode) { 49 SimDialogMode mode) {
50 views::Widget::CreateWindowWithParent( 50 views::Widget::CreateWindowWithParent(
51 new HtmlDialogView(ProfileManager::GetDefaultProfileOrOffTheRecord(), 51 new WebDialogView(ProfileManager::GetDefaultProfileOrOffTheRecord(),
52 BrowserList::GetLastActive(), 52 BrowserList::GetLastActive(),
53 new SimDialogDelegate(mode)), 53 new SimDialogDelegate(mode)),
54 owning_window)->Show(); 54 owning_window)->Show();
55 } 55 }
56 56
57 SimDialogDelegate::SimDialogDelegate(SimDialogMode dialog_mode) 57 SimDialogDelegate::SimDialogDelegate(SimDialogMode dialog_mode)
58 : dialog_mode_(dialog_mode) { 58 : dialog_mode_(dialog_mode) {
59 } 59 }
60 60
61 SimDialogDelegate::~SimDialogDelegate() { 61 SimDialogDelegate::~SimDialogDelegate() {
62 } 62 }
63 63
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 return false; 115 return false;
116 } 116 }
117 117
118 bool SimDialogDelegate::HandleContextMenu( 118 bool SimDialogDelegate::HandleContextMenu(
119 const content::ContextMenuParams& params) { 119 const content::ContextMenuParams& params) {
120 // Disable context menu. 120 // Disable context menu.
121 return true; 121 return true;
122 } 122 }
123 123
124 } // namespace chromeos 124 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/sim_dialog_delegate.h ('k') | chrome/browser/printing/cloud_print/cloud_print_setup_flow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698