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

Unified Diff: chrome/browser/app_modal_dialog_gtk.cc

Issue 100061: Revert r14620 which was a rollback of r14549 and r14508. This (Closed)
Patch Set: rebase Created 11 years, 8 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 | « base/process_util_posix.cc ('k') | chrome/browser/unload_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « base/process_util_posix.cc ('k') | chrome/browser/unload_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698