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

Side by Side Diff: chrome/browser/views/js_modal_dialog_views.cc

Issue 3538012: Use BubbleWindow for ChromeOS windows/dialogs. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: fix win trybot Created 10 years, 2 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
« no previous file with comments | « chrome/browser/views/html_dialog_view.cc ('k') | chrome/browser/views/modal_dialog_delegate.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/views/js_modal_dialog_views.h" 5 #include "chrome/browser/views/js_modal_dialog_views.h"
6 6
7 #include "app/keyboard_codes.h" 7 #include "app/keyboard_codes.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "app/message_box_flags.h" 9 #include "app/message_box_flags.h"
10 #include "chrome/browser/app_modal_dialog.h" 10 #include "chrome/browser/app_modal_dialog.h"
11 #include "chrome/browser/views/window.h"
11 #include "grit/generated_resources.h" 12 #include "grit/generated_resources.h"
12 #include "views/controls/message_box_view.h" 13 #include "views/controls/message_box_view.h"
13 #include "views/window/window.h" 14 #include "views/window/window.h"
14 15
15 #if defined(OS_CHROMEOS)
16 #include "chrome/browser/chromeos/frame/bubble_window.h"
17 #endif // defined(OS_CHROMEOS)
18
19 //////////////////////////////////////////////////////////////////////////////// 16 ////////////////////////////////////////////////////////////////////////////////
20 // JSModalDialogViews, public: 17 // JSModalDialogViews, public:
21 18
22 JSModalDialogViews::JSModalDialogViews( 19 JSModalDialogViews::JSModalDialogViews(
23 JavaScriptAppModalDialog* parent) 20 JavaScriptAppModalDialog* parent)
24 : parent_(parent), 21 : parent_(parent),
25 message_box_view_(new MessageBoxView( 22 message_box_view_(new MessageBoxView(
26 parent->dialog_flags() | MessageBoxFlags::kAutoDetectAlignment, 23 parent->dialog_flags() | MessageBoxFlags::kAutoDetectAlignment,
27 parent->message_text(), parent->default_prompt_text())) { 24 parent->message_text(), parent->default_prompt_text())) {
28 DCHECK(message_box_view_); 25 DCHECK(message_box_view_);
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 143
147 //////////////////////////////////////////////////////////////////////////////// 144 ////////////////////////////////////////////////////////////////////////////////
148 // NativeAppModalDialog, public: 145 // NativeAppModalDialog, public:
149 146
150 // static 147 // static
151 NativeAppModalDialog* NativeAppModalDialog::CreateNativeJavaScriptPrompt( 148 NativeAppModalDialog* NativeAppModalDialog::CreateNativeJavaScriptPrompt(
152 JavaScriptAppModalDialog* dialog, 149 JavaScriptAppModalDialog* dialog,
153 gfx::NativeWindow parent_window) { 150 gfx::NativeWindow parent_window) {
154 JSModalDialogViews* d = new JSModalDialogViews(dialog); 151 JSModalDialogViews* d = new JSModalDialogViews(dialog);
155 152
156 #if defined(OS_CHROMEOS) 153 browser::CreateViewsWindow(parent_window, gfx::Rect(), d);
157 // Use bubble frame for JS dialog on ChromeOS.
158 chromeos::BubbleWindow::Create(parent_window, gfx::Rect(), d);
159 #else
160 views::Window::CreateChromeWindow(parent_window, gfx::Rect(), d);
161 #endif
162
163 return d; 154 return d;
164 } 155 }
OLDNEW
« no previous file with comments | « chrome/browser/views/html_dialog_view.cc ('k') | chrome/browser/views/modal_dialog_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698