if (mate::Converter<atom::MessageBoxCallback>::FromV8(args->isolate(),
peek,
&callback)) {
- atom::ShowMessageBox(window, (atom::MessageBoxType)type, buttons, default_button_index,
- cancel_id, options, title, message, detail, icon, callback);
+ atom::ShowMessageBox(window, (atom::MessageBoxType)type, buttons,
+ default_button_index, cancel_id, options, title,
+ message, detail, icon, callback);
} else {
int chosen = atom::ShowMessageBox(window, (atom::MessageBoxType)type,
- buttons, default_button_index, cancel_id, options, title,
- message, detail, icon);
+ buttons, default_button_index, cancel_id,
+ options, title, message, detail, icon);
args->Return(chosen);
}
}
const std::string& message,
const std::string& detail,
const gfx::ImageSkia& icon) {
- return GtkMessageBox(parent, type, buttons, default_button_index, cancel_id, title, message, detail,
- icon).RunSynchronous();
+ return GtkMessageBox(parent, type, buttons, default_button_index, cancel_id,
+ title, message, detail, icon).RunSynchronous();
}
void ShowMessageBox(NativeWindow* parent,
const std::string& detail,
const gfx::ImageSkia& icon,
const MessageBoxCallback& callback) {
- (new GtkMessageBox(parent, type, buttons, default_button_index, cancel_id, title, message, detail,
- icon))->RunAsynchronous(callback);
+ (new GtkMessageBox(parent, type, buttons, default_button_index, cancel_id,
+ title, message, detail, icon))->RunAsynchronous(callback);
}
void ShowErrorBox(const base::string16& title, const base::string16& content) {
int ShowMessageBoxUTF16(HWND parent,
MessageBoxType type,
const std::vector<base::string16>& buttons,
+ int default_button_index,
int cancel_id,
int options,
const base::string16& title,
NativeWindow* parent,
MessageBoxType type,
const std::vector<std::string>& buttons,
+ int default_button_index,
int cancel_id,
int options,
const std::string& title,
const std::string& detail,
const gfx::ImageSkia& icon,
const MessageBoxCallback& callback) {
- int result = ShowMessageBox(parent, type, buttons, cancel_id, options, title,
- message, detail, icon);
+ int result = ShowMessageBox(parent, type, buttons, default_button_index,
+ cancel_id, options, title, message, detail, icon);
content::BrowserThread::PostTask(
content::BrowserThread::UI, FROM_HERE, base::Bind(callback, result));
content::BrowserThread::DeleteSoon(
int ShowMessageBox(NativeWindow* parent,
MessageBoxType type,
const std::vector<std::string>& buttons,
+ int default_button_index,
int cancel_id,
int options,
const std::string& title,
return ShowMessageBoxUTF16(hwnd_parent,
type,
utf16_buttons,
+ default_button_index,
cancel_id,
options,
base::UTF8ToUTF16(title),
void ShowMessageBox(NativeWindow* parent,
MessageBoxType type,
const std::vector<std::string>& buttons,
+ int default_button_index,
int cancel_id,
int options,
const std::string& title,
unretained->message_loop()->PostTask(
FROM_HERE,
base::Bind(&RunMessageBoxInNewThread, base::Unretained(unretained),
- parent, type, buttons, cancel_id, options, title, message,
- detail, icon, callback));
+ parent, type, buttons, default_button_index,
+ cancel_id, options, title, message, detail, icon, callback));
}
void ShowErrorBox(const base::string16& title, const base::string16& content) {
- ShowMessageBoxUTF16(NULL, MESSAGE_BOX_TYPE_ERROR, {}, 0, 0, L"Error", title,
- content, gfx::ImageSkia());
+ ShowMessageBoxUTF16(NULL, MESSAGE_BOX_TYPE_ERROR, {}, -1, 0, 0, L"Error",
+ title, content, gfx::ImageSkia());
}
} // namespace atom