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

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

Issue 7601014: browser: Abstract message box dialog functions into its own header file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile on linux_view? Created 9 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/about_chrome_view.cc ('k') | chrome/browser/ui/webui/ntp/app_launcher_handler.cc » ('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
new file mode 100644
index 0000000000000000000000000000000000000000..34b509a841799b4583cb08559b58570d6717e228
--- /dev/null
+++ b/chrome/browser/ui/views/simple_message_box_win.cc
@@ -0,0 +1,26 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/simple_message_box.h"
+
+#include "ui/base/message_box_win.h"
+
+namespace browser {
+
+void ShowErrorBox(gfx::NativeWindow parent,
+ const string16& title,
+ const string16& message) {
+ UINT flags = MB_OK | MB_ICONWARNING | MB_SETFOREGROUND | MB_TOPMOST;
+ ui::MessageBox(parent, message, title, flags);
+}
+
+bool ShowYesNoBox(gfx::NativeWindow parent,
+ const string16& title,
+ const string16& message) {
+ UINT flags = MB_YESNO | MB_ICONWARNING | MB_SETFOREGROUND;
+ int result = ui::MessageBox(parent, message, title, flags);
+ return result == IDYES;
+}
+
+} // namespace browser
« no previous file with comments | « chrome/browser/ui/views/about_chrome_view.cc ('k') | chrome/browser/ui/webui/ntp/app_launcher_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698