Chromium Code Reviews| 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..495d8b33e93d1d5f370348b8506b870f4a751c20 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.h" |
|
Peter Kasting
2017/06/12 23:54:19
callback_forward.h?
xiyuan
2017/06/13 21:49:44
Done.
|
| #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. |