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

Unified Diff: chrome/browser/gtk/hover_controller_gtk.h

Issue 1708013: GTK: make more use of gtk_signal convenience macros/signal registrar. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 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
Index: chrome/browser/gtk/hover_controller_gtk.h
diff --git a/chrome/browser/gtk/hover_controller_gtk.h b/chrome/browser/gtk/hover_controller_gtk.h
index 6867503f4b16cd21cddf4431fcee99b8787b83a5..10196ad12e58f4ea4af12db9bee525a631ad6685 100644
--- a/chrome/browser/gtk/hover_controller_gtk.h
+++ b/chrome/browser/gtk/hover_controller_gtk.h
@@ -7,6 +7,7 @@
#include <gtk/gtk.h>
+#include "app/gtk_signal.h"
#include "app/slide_animation.h"
#include "app/throb_animation.h"
#include "base/scoped_ptr.h"
@@ -44,30 +45,18 @@ class HoverControllerGtk : public AnimationDelegate {
virtual void AnimationEnded(const Animation* animation);
virtual void AnimationCanceled(const Animation* animation);
- static gboolean OnEnterThunk(GtkWidget* widget,
- GdkEventCrossing* event,
- HoverControllerGtk* hover_controller) {
- return hover_controller->OnEnter(widget, event);
- }
- gboolean OnEnter(GtkWidget* widget, GdkEventCrossing* event);
-
- static gboolean OnLeaveThunk(GtkWidget* widget,
- GdkEventCrossing* event,
- HoverControllerGtk* hover_controller) {
- return hover_controller->OnLeave(widget, event);
- }
- gboolean OnLeave(GtkWidget* widget, GdkEventCrossing* event);
-
- static void OnButtonDestroyThunk(GtkWidget* widget,
- HoverControllerGtk* hover_controller) {
- hover_controller->OnButtonDestroy(widget);
- }
- void OnButtonDestroy(GtkWidget* widget);
+ CHROMEGTK_CALLBACK_1(HoverControllerGtk, gboolean, OnEnter,
+ GdkEventCrossing*);
+ CHROMEGTK_CALLBACK_1(HoverControllerGtk, gboolean, OnLeave,
+ GdkEventCrossing*);
+ CHROMEGTK_CALLBACK_0(HoverControllerGtk, void, OnDestroy);
ThrobAnimation throb_animation_;
SlideAnimation hover_animation_;
GtkWidget* button_;
+ GtkSignalRegistrar signals_;
+
DISALLOW_COPY_AND_ASSIGN(HoverControllerGtk);
};
« no previous file with comments | « no previous file | chrome/browser/gtk/hover_controller_gtk.cc » ('j') | chrome/browser/gtk/hover_controller_gtk.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698