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

Unified Diff: chrome/browser/ui/simple_message_box.h

Issue 2929953002: Make profile error dialog async (Closed)
Patch Set: for #3 comments Created 3 years, 6 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/profile_error_dialog.cc ('k') | chrome/browser/ui/views/simple_message_box_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/simple_message_box.h
diff --git a/chrome/browser/ui/simple_message_box.h b/chrome/browser/ui/simple_message_box.h
index c7585a121c911daedd6f6daf979d5df0cff45508..1dd0ce136ed8383118d5899a8dea89ef52975bd8 100644
--- a/chrome/browser/ui/simple_message_box.h
+++ b/chrome/browser/ui/simple_message_box.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_UI_SIMPLE_MESSAGE_BOX_H_
#define CHROME_BROWSER_UI_SIMPLE_MESSAGE_BOX_H_
+#include "base/callback_forward.h"
#include "base/compiler_specific.h"
#include "base/strings/string16.h"
#include "ui/gfx/native_widget_types.h"
@@ -36,12 +37,15 @@ void ShowWarningMessageBox(gfx::NativeWindow parent,
const base::string16& title,
const base::string16& message);
-// As above, but with a checkbox. Returns true if the checkbox was checked when
-// the dialog was dismissed, false otherwise.
-bool ShowWarningMessageBoxWithCheckbox(gfx::NativeWindow parent,
- const base::string16& title,
- const base::string16& message,
- const base::string16& checkbox_text);
+// As above, but shows the dialog box asynchronously with a checkbox.
+// |callback| will be invoked after the dialog is dismissed. It is invoked with
+// true if the checkbox is checked and false otherwise.
+void ShowWarningMessageBoxWithCheckbox(
+ gfx::NativeWindow parent,
+ const base::string16& title,
+ const base::string16& message,
+ const base::string16& checkbox_text,
+ base::OnceCallback<void(bool checked)> callback);
// As above, but two buttons are displayed and the return value indicates which
// is chosen.
« no previous file with comments | « chrome/browser/ui/profile_error_dialog.cc ('k') | chrome/browser/ui/views/simple_message_box_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698