Add support for checkbox with dialog.showMessageBox
This adds the `checkboxLabel` and `checkboxChecked` options to display a checkbox in the message box. Fixes #6048.
This commit is contained in:
parent
9163b601a4
commit
c8c11e68c6
10 changed files with 155 additions and 61 deletions
|
@ -32,7 +32,8 @@ enum MessageBoxOptions {
|
|||
MESSAGE_BOX_NO_LINK = 1 << 0,
|
||||
};
|
||||
|
||||
typedef base::Callback<void(int code)> MessageBoxCallback;
|
||||
typedef base::Callback<void(int code, bool checkbox_checked)>
|
||||
MessageBoxCallback;
|
||||
|
||||
int ShowMessageBox(NativeWindow* parent_window,
|
||||
MessageBoxType type,
|
||||
|
@ -54,6 +55,8 @@ void ShowMessageBox(NativeWindow* parent_window,
|
|||
const std::string& title,
|
||||
const std::string& message,
|
||||
const std::string& detail,
|
||||
const std::string& checkbox_label,
|
||||
bool checkbox_checked,
|
||||
const gfx::ImageSkia& icon,
|
||||
const MessageBoxCallback& callback);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue