summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/bookmark_bubble_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_bubble_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_bubble_gtk.h')
-rw-r--r--chrome/browser/gtk/bookmark_bubble_gtk.h57
1 files changed, 8 insertions, 49 deletions
diff --git a/chrome/browser/gtk/bookmark_bubble_gtk.h b/chrome/browser/gtk/bookmark_bubble_gtk.h
index a071ca57..ff8688b 100644
--- a/chrome/browser/gtk/bookmark_bubble_gtk.h
+++ b/chrome/browser/gtk/bookmark_bubble_gtk.h
@@ -20,6 +20,7 @@
#include "base/basictypes.h"
#include "base/task.h"
#include "chrome/browser/gtk/info_bubble_gtk.h"
+#include "chrome/common/gtk_signal.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
#include "googleurl/src/gurl.h"
@@ -59,56 +60,14 @@ class BookmarkBubbleGtk : public InfoBubbleGtkDelegate,
bool newly_bookmarked);
~BookmarkBubbleGtk();
- static void HandleDestroyThunk(GtkWidget* widget,
- gpointer userdata) {
- reinterpret_cast<BookmarkBubbleGtk*>(userdata)->
- HandleDestroy();
- }
// Notified when |content_| is destroyed so we can delete our instance.
- void HandleDestroy();
-
- static void HandleNameActivateThunk(GtkWidget* widget,
- gpointer user_data) {
- reinterpret_cast<BookmarkBubbleGtk*>(user_data)->
- HandleNameActivate();
- }
- void HandleNameActivate();
-
- static void HandleFolderChangedThunk(GtkWidget* widget,
- gpointer user_data) {
- reinterpret_cast<BookmarkBubbleGtk*>(user_data)->
- HandleFolderChanged();
- }
- void HandleFolderChanged();
-
- static void HandleFolderPopupShownThunk(GObject* object,
- GParamSpec* property,
- gpointer user_data) {
- return reinterpret_cast<BookmarkBubbleGtk*>(user_data)->
- HandleFolderPopupShown();
- }
- void HandleFolderPopupShown();
-
- static void HandleEditButtonThunk(GtkWidget* widget,
- gpointer user_data) {
- reinterpret_cast<BookmarkBubbleGtk*>(user_data)->
- HandleEditButton();
- }
- void HandleEditButton();
-
- static void HandleCloseButtonThunk(GtkWidget* widget,
- gpointer user_data) {
- reinterpret_cast<BookmarkBubbleGtk*>(user_data)->
- HandleCloseButton();
- }
- void HandleCloseButton();
-
- static void HandleRemoveButtonThunk(GtkWidget* widget,
- gpointer user_data) {
- reinterpret_cast<BookmarkBubbleGtk*>(user_data)->
- HandleRemoveButton();
- }
- void HandleRemoveButton();
+ CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnDestroy);
+ CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnNameActivate);
+ CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnFolderChanged);
+ CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnFolderPopupShown);
+ CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnEditClicked);
+ CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnCloseClicked);
+ CHROMEGTK_CALLBACK_0(BookmarkBubbleGtk, void, OnRemoveClicked);
// Update the bookmark with any edits that have been made.
void ApplyEdits();