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

Side by Side Diff: chrome/browser/autofill/autofill_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, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/autofill/autofill_dialog.h" 5 #include "chrome/browser/autofill/autofill_dialog.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 private: 109 private:
110 // 'destroy' signal handler. Calls DeleteSoon on the global singleton dialog 110 // 'destroy' signal handler. Calls DeleteSoon on the global singleton dialog
111 // object. 111 // object.
112 CHROMEGTK_CALLBACK_0(AutoFillDialog, void, OnDestroy); 112 CHROMEGTK_CALLBACK_0(AutoFillDialog, void, OnDestroy);
113 113
114 // 'response' signal handler. Notifies the AutoFillDialogObserver that new 114 // 'response' signal handler. Notifies the AutoFillDialogObserver that new
115 // data is available if the response is GTK_RESPONSE_APPLY or GTK_RESPONSE_OK. 115 // data is available if the response is GTK_RESPONSE_APPLY or GTK_RESPONSE_OK.
116 // We close the dialog if the response is GTK_RESPONSE_OK or 116 // We close the dialog if the response is GTK_RESPONSE_OK or
117 // GTK_RESPONSE_CANCEL. 117 // GTK_RESPONSE_CANCEL.
118 CHROMEG_CALLBACK_1(AutoFillDialog, void, OnResponse, GtkDialog*, gint); 118 CHROMEGTK_CALLBACK_1(AutoFillDialog, void, OnResponse, int);
119 119
120 CHROMEGTK_CALLBACK_0(AutoFillDialog, void, OnAutoFillCheckToggled); 120 CHROMEGTK_CALLBACK_0(AutoFillDialog, void, OnAutoFillCheckToggled);
121 CHROMEG_CALLBACK_2(AutoFillDialog, void, OnRowActivated, GtkTreeView*, 121 CHROMEG_CALLBACK_2(AutoFillDialog, void, OnRowActivated, GtkTreeView*,
122 GtkTreePath*, GtkTreeViewColumn*); 122 GtkTreePath*, GtkTreeViewColumn*);
123 CHROMEG_CALLBACK_0(AutoFillDialog, void, OnSelectionChanged, 123 CHROMEG_CALLBACK_0(AutoFillDialog, void, OnSelectionChanged,
124 GtkTreeSelection*); 124 GtkTreeSelection*);
125 CHROMEG_CALLBACK_1(AutoFillDialog, gboolean, OnCheckRowIsSeparator, 125 CHROMEG_CALLBACK_1(AutoFillDialog, gboolean, OnCheckRowIsSeparator,
126 GtkTreeModel*, GtkTreeIter*); 126 GtkTreeModel*, GtkTreeIter*);
127 CHROMEGTK_CALLBACK_0(AutoFillDialog, void, OnAddAddress); 127 CHROMEGTK_CALLBACK_0(AutoFillDialog, void, OnAddAddress);
128 CHROMEGTK_CALLBACK_0(AutoFillDialog, void, OnAddCreditCard); 128 CHROMEGTK_CALLBACK_0(AutoFillDialog, void, OnAddCreditCard);
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 245
246 void AutoFillDialog::Show() { 246 void AutoFillDialog::Show() {
247 gtk_util::PresentWindow(dialog_, gtk_get_current_event_time()); 247 gtk_util::PresentWindow(dialog_, gtk_get_current_event_time());
248 } 248 }
249 249
250 void AutoFillDialog::OnDestroy(GtkWidget* widget) { 250 void AutoFillDialog::OnDestroy(GtkWidget* widget) {
251 dialog = NULL; 251 dialog = NULL;
252 MessageLoop::current()->DeleteSoon(FROM_HERE, this); 252 MessageLoop::current()->DeleteSoon(FROM_HERE, this);
253 } 253 }
254 254
255 void AutoFillDialog::OnResponse(GtkDialog* dialog, gint response_id) { 255 void AutoFillDialog::OnResponse(GtkWidget* dialog, int response_id) {
256 if (response_id == GTK_RESPONSE_OK || 256 if (response_id == GTK_RESPONSE_OK ||
257 response_id == GTK_RESPONSE_CANCEL || 257 response_id == GTK_RESPONSE_CANCEL ||
258 response_id == GTK_RESPONSE_DELETE_EVENT) { 258 response_id == GTK_RESPONSE_DELETE_EVENT) {
259 gtk_widget_destroy(GTK_WIDGET(dialog)); 259 gtk_widget_destroy(dialog);
260 } 260 }
261 261
262 if (response_id == kAutoFillDialogAboutLink) 262 if (response_id == kAutoFillDialogAboutLink)
263 OnLinkActivated(); 263 OnLinkActivated();
264 } 264 }
265 265
266 void AutoFillDialog::OnAutoFillCheckToggled(GtkWidget* widget) { 266 void AutoFillDialog::OnAutoFillCheckToggled(GtkWidget* widget) {
267 bool enabled = gtk_toggle_button_get_active( 267 bool enabled = gtk_toggle_button_get_active(
268 GTK_TOGGLE_BUTTON(form_autofill_enable_check_)); 268 GTK_TOGGLE_BUTTON(form_autofill_enable_check_));
269 if (enabled) { 269 if (enabled) {
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 660
661 void ShowAutoFillDialog(gfx::NativeView parent, 661 void ShowAutoFillDialog(gfx::NativeView parent,
662 AutoFillDialogObserver* observer, 662 AutoFillDialogObserver* observer,
663 Profile* profile) { 663 Profile* profile) {
664 DCHECK(profile); 664 DCHECK(profile);
665 665
666 if (!dialog) 666 if (!dialog)
667 dialog = new AutoFillDialog(profile, observer); 667 dialog = new AutoFillDialog(profile, observer);
668 dialog->Show(); 668 dialog->Show();
669 } 669 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_editor_gtk.cc » ('j') | chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698