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

Unified Diff: chrome/browser/ui/views/simple_message_box_win.cc

Issue 23291003: Don't try to use compositor to display dialog before compositor is initialized (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: refactor to avoid copying Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/simple_message_box_win.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/simple_message_box_win.cc
diff --git a/chrome/browser/ui/views/simple_message_box_win.cc b/chrome/browser/ui/views/simple_message_box_win.cc
index 167600caa626a1463bd38aea50f01b1e788239af..70ab8a8b976b3825f8580709b4ba146bb5079612 100644
--- a/chrome/browser/ui/views/simple_message_box_win.cc
+++ b/chrome/browser/ui/views/simple_message_box_win.cc
@@ -10,15 +10,10 @@
namespace chrome {
-MessageBoxResult ShowMessageBox(gfx::NativeWindow parent,
- const string16& title,
- const string16& message,
- MessageBoxType type) {
- startup_metric_utils::SetNonBrowserUIDisplayed();
-
- if (!parent)
- parent = ui::GetWindowToParentTo(true);
-
+MessageBoxResult NativeShowMessageBox(HWND parent,
+ const string16& title,
+ const string16& message,
+ MessageBoxType type) {
UINT flags = MB_SETFOREGROUND;
if (type == MESSAGE_BOX_TYPE_QUESTION) {
flags |= MB_YESNO;
@@ -34,4 +29,18 @@ MessageBoxResult ShowMessageBox(gfx::NativeWindow parent,
MESSAGE_BOX_RESULT_YES : MESSAGE_BOX_RESULT_NO;
}
+#if !defined(USE_AURA)
+MessageBoxResult ShowMessageBox(gfx::NativeWindow parent,
+ const string16& title,
+ const string16& message,
+ MessageBoxType type) {
+ startup_metric_utils::SetNonBrowserUIDisplayed();
+
+ if (!parent)
+ parent = ui::GetWindowToParentTo(true);
+
+ return NativeShowMessageBox(parent, title, message, type);
+}
+#endif
+
} // namespace chrome
« no previous file with comments | « chrome/browser/ui/views/simple_message_box_win.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698