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

Unified Diff: chrome/browser/ui/gtk/js_modal_dialog_gtk.cc

Issue 6627038: gtk: Rename OnDialogResponse() to OnResponse() to standardize on a consistent naming scheme. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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
Index: chrome/browser/ui/gtk/js_modal_dialog_gtk.cc
diff --git a/chrome/browser/ui/gtk/js_modal_dialog_gtk.cc b/chrome/browser/ui/gtk/js_modal_dialog_gtk.cc
index 8d577bc7a00957c83dcd34efbf77f720e0496c54..269137452fdfa8290c198ffe9cb2e9934bb84238 100644
--- a/chrome/browser/ui/gtk/js_modal_dialog_gtk.cc
+++ b/chrome/browser/ui/gtk/js_modal_dialog_gtk.cc
@@ -134,8 +134,7 @@ JSModalDialogGtk::JSModalDialogGtk(JavaScriptAppModalDialog* dialog,
}
gtk_dialog_set_default_response(GTK_DIALOG(gtk_dialog_), GTK_RESPONSE_OK);
- g_signal_connect(gtk_dialog_, "response",
- G_CALLBACK(OnDialogResponseThunk), this);
+ g_signal_connect(gtk_dialog_, "response", G_CALLBACK(OnResponseThunk), this);
}
JSModalDialogGtk::~JSModalDialogGtk() {
@@ -173,22 +172,21 @@ void JSModalDialogGtk::ActivateAppModalDialog() {
void JSModalDialogGtk::CloseAppModalDialog() {
DCHECK(gtk_dialog_);
- OnDialogResponse(gtk_dialog_, GTK_RESPONSE_DELETE_EVENT);
+ OnResponse(gtk_dialog_, GTK_RESPONSE_DELETE_EVENT);
}
void JSModalDialogGtk::AcceptAppModalDialog() {
- OnDialogResponse(gtk_dialog_, GTK_RESPONSE_OK);
+ OnResponse(gtk_dialog_, GTK_RESPONSE_OK);
}
void JSModalDialogGtk::CancelAppModalDialog() {
- OnDialogResponse(gtk_dialog_, GTK_RESPONSE_CANCEL);
+ OnResponse(gtk_dialog_, GTK_RESPONSE_CANCEL);
}
////////////////////////////////////////////////////////////////////////////////
// JSModalDialogGtk, private:
-void JSModalDialogGtk::OnDialogResponse(GtkWidget* dialog,
- int response_id) {
+void JSModalDialogGtk::OnResponse(GtkWidget* dialog, int response_id) {
switch (response_id) {
case GTK_RESPONSE_OK:
// The first arg is the prompt text and the second is true if we want to
@@ -205,7 +203,7 @@ void JSModalDialogGtk::OnDialogResponse(GtkWidget* dialog,
default:
NOTREACHED();
}
- gtk_widget_destroy(GTK_WIDGET(dialog));
+ gtk_widget_destroy(dialog);
// Now that the dialog is gone, we can put all the windows into separate
// window groups so other dialogs are no longer app modal.

Powered by Google App Engine
This is Rietveld 408576698