summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/bookmark_editor_gtk.h
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-10 20:47:40 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-10 20:47:40 +0000
commit107a46c110cb49a04c7e7daa0e04ea9941a71fc8 (patch)
tree08b7144276faf9643b78d2b01f7d42d55210a7f3 /chrome/browser/gtk/bookmark_editor_gtk.h
parent5a0b12cd1c5bb121f5f5caa922e0f9a15e488037 (diff)
downloadchromium_src-107a46c110cb49a04c7e7daa0e04ea9941a71fc8.zip
chromium_src-107a46c110cb49a04c7e7daa0e04ea9941a71fc8.tar.gz
chromium_src-107a46c110cb49a04c7e7daa0e04ea9941a71fc8.tar.bz2
GTK: Use new macros to hide thunk declaration and cleanup callback declaration.
We have two conventions for declaring GTK+ callbacks in our code: We either declare a bunch of static thunks in the header that redirect to the correct object (and bloat up the header) OR we declare the callback methods static and pass the object as the final parameter (and litter the implementation with "context->"). The two styles are now about half/half...including mixing these two styles in the same files. This madness must end! BUG=none TEST=none Review URL: http://codereview.chromium.org/661010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41202 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/bookmark_editor_gtk.h')
-rw-r--r--chrome/browser/gtk/bookmark_editor_gtk.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/chrome/browser/gtk/bookmark_editor_gtk.h b/chrome/browser/gtk/bookmark_editor_gtk.h
index d2ab6eb..671bc6d 100644
--- a/chrome/browser/gtk/bookmark_editor_gtk.h
+++ b/chrome/browser/gtk/bookmark_editor_gtk.h
@@ -12,6 +12,7 @@
#include "base/scoped_ptr.h"
#include "chrome/browser/bookmarks/bookmark_editor.h"
#include "chrome/browser/bookmarks/bookmark_model_observer.h"
+#include "chrome/common/gtk_signal.h"
#include "testing/gtest/include/gtest/gtest_prod.h"
class GURL;
@@ -90,20 +91,15 @@ class BookmarkEditorGtk : public BookmarkEditor,
// new group.
void AddNewGroup(GtkTreeIter* parent, GtkTreeIter* child);
- static void OnSelectionChanged(GtkTreeSelection* treeselection,
- BookmarkEditorGtk* dialog);
+ CHROMEGTK_CALLBACK_0(BookmarkEditorGtk, void, OnSelectionChanged);
+ CHROMEGTK_CALLBACK_1(BookmarkEditorGtk, void, OnResponse, int);
+ CHROMEGTK_CALLBACK_1(BookmarkEditorGtk, gboolean, OnWindowDeleteEvent,
+ GdkEvent*);
- static void OnResponse(GtkDialog* dialog, int response_id,
- BookmarkEditorGtk* window);
+ CHROMEGTK_CALLBACK_0(BookmarkEditorGtk, void, OnWindowDestroy);
+ CHROMEGTK_CALLBACK_0(BookmarkEditorGtk, void, OnEntryChanged);
- static gboolean OnWindowDeleteEvent(GtkWidget* widget,
- GdkEvent* event,
- BookmarkEditorGtk* dialog);
-
- static void OnWindowDestroy(GtkWidget* widget, BookmarkEditorGtk* dialog);
- static void OnEntryChanged(GtkEditable* entry, BookmarkEditorGtk* dialog);
-
- static void OnNewFolderClicked(GtkWidget* button, BookmarkEditorGtk* dialog);
+ CHROMEGTK_CALLBACK_0(BookmarkEditorGtk, void, OnNewFolderClicked);
// Profile the entry is from.
Profile* profile_;