| Index: chrome/browser/app_modal_dialog_gtk.cc
|
| diff --git a/chrome/browser/app_modal_dialog_gtk.cc b/chrome/browser/app_modal_dialog_gtk.cc
|
| index b44d865de4db260501a004d99ea8bb80347b2c07..2f9337dffa2228b414c4dd3b449960802f77aff4 100644
|
| --- a/chrome/browser/app_modal_dialog_gtk.cc
|
| +++ b/chrome/browser/app_modal_dialog_gtk.cc
|
| @@ -107,14 +107,27 @@ void AppModalDialog::CloseModalDialog() {
|
| }
|
|
|
| int AppModalDialog::GetDialogButtons() {
|
| - NOTIMPLEMENTED();
|
| - return 0;
|
| + switch (dialog_flags_) {
|
| + case MessageBoxFlags::kIsJavascriptAlert:
|
| + return MessageBoxFlags::DIALOGBUTTON_OK;
|
| +
|
| + case MessageBoxFlags::kIsJavascriptConfirm:
|
| + return MessageBoxFlags::DIALOGBUTTON_OK |
|
| + MessageBoxFlags::DIALOGBUTTON_CANCEL;
|
| +
|
| + case MessageBoxFlags::kIsJavascriptPrompt:
|
| + return MessageBoxFlags::DIALOGBUTTON_OK;
|
| +
|
| + default:
|
| + NOTREACHED();
|
| + return 0;
|
| + }
|
| }
|
|
|
| void AppModalDialog::AcceptWindow() {
|
| - NOTIMPLEMENTED();
|
| + OnDialogResponse(GTK_DIALOG(dialog_), GTK_RESPONSE_OK, this);
|
| }
|
|
|
| void AppModalDialog::CancelWindow() {
|
| - NOTIMPLEMENTED();
|
| + OnDialogResponse(GTK_DIALOG(dialog_), GTK_RESPONSE_CANCEL, this);
|
| }
|
|
|