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

Unified Diff: chrome/browser/simple_message_box.h

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/process_singleton_win.cc ('k') | chrome/browser/speech/speech_input_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/simple_message_box.h
diff --git a/chrome/browser/simple_message_box.h b/chrome/browser/simple_message_box.h
new file mode 100644
index 0000000000000000000000000000000000000000..009417448692748f3a9c61154ce6e22150d6f2db
--- /dev/null
+++ b/chrome/browser/simple_message_box.h
@@ -0,0 +1,30 @@
+// 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.
+
+#ifndef CHROME_BROWSER_SIMPLE_MESSAGE_BOX_H_
+#define CHROME_BROWSER_SIMPLE_MESSAGE_BOX_H_
+#pragma once
+
+#include "base/string16.h"
+#include "ui/gfx/native_widget_types.h"
+
+namespace browser {
+
+// Pops up an error box with an OK button. If |parent| is non-null, the box
+// will be modal on it. (On Mac, it is always app-modal.) Generally speaking,
+// this function should not be used for much. Infobars are preferred.
+void ShowErrorBox(gfx::NativeWindow parent,
+ const string16& title,
+ const string16& message);
+
+// Pops up a dialog box with two buttons (Yes/No), with the default button of
+// Yes. If |parent| is non-null, the box will be modal on it. (On Mac, it is
+// always app-modal.) Returns true if the Yes button was chosen.
+bool ShowYesNoBox(gfx::NativeWindow parent,
+ const string16& title,
+ const string16& message);
+
+} // namespace browser
+
+#endif // CHROME_BROWSER_SIMPLE_MESSAGE_BOX_H_
« no previous file with comments | « chrome/browser/process_singleton_win.cc ('k') | chrome/browser/speech/speech_input_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698