| Index: chrome/browser/gtk/menu_bar_helper.h
|
| diff --git a/chrome/browser/gtk/menu_bar_helper.h b/chrome/browser/gtk/menu_bar_helper.h
|
| index 9b6448c808dbf9b5054fc8175bc009fc9f4bf7bd..05d68193b887430830a3925927214729bbdb121c 100644
|
| --- a/chrome/browser/gtk/menu_bar_helper.h
|
| +++ b/chrome/browser/gtk/menu_bar_helper.h
|
| @@ -13,6 +13,9 @@
|
|
|
| #include <vector>
|
|
|
| +#include "app/gtk_signal.h"
|
| +#include "base/scoped_ptr.h"
|
| +
|
| class MenuBarHelper {
|
| public:
|
| class Delegate {
|
| @@ -43,24 +46,11 @@ class MenuBarHelper {
|
| void Clear();
|
|
|
| private:
|
| - static gboolean OnMenuMotionNotifyThunk(GtkWidget* menu,
|
| - GdkEventMotion* motion,
|
| - MenuBarHelper* helper) {
|
| - return helper->OnMenuMotionNotify(menu, motion);
|
| - }
|
| - gboolean OnMenuMotionNotify(GtkWidget* menu, GdkEventMotion* motion);
|
| -
|
| - static void OnMenuHiddenThunk(GtkWidget* menu, MenuBarHelper* helper) {
|
| - helper->OnMenuHidden(menu);
|
| - }
|
| - void OnMenuHidden(GtkWidget* menu);
|
| -
|
| - static void OnMenuMoveCurrentThunk(GtkWidget* menu,
|
| - GtkMenuDirectionType dir,
|
| - MenuBarHelper* helper) {
|
| - helper->OnMenuMoveCurrent(menu, dir);
|
| - }
|
| - void OnMenuMoveCurrent(GtkWidget* menu, GtkMenuDirectionType dir);
|
| + CHROMEGTK_CALLBACK_1(MenuBarHelper, gboolean, OnMenuMotionNotify,
|
| + GdkEventMotion*);
|
| + CHROMEGTK_CALLBACK_0(MenuBarHelper, void, OnMenuHidden);
|
| + CHROMEGTK_CALLBACK_1(MenuBarHelper, void, OnMenuMoveCurrent,
|
| + GtkMenuDirectionType);
|
|
|
| // The buttons for which we pop up menus. We do not own these, or even add
|
| // refs to them.
|
| @@ -76,6 +66,10 @@ class MenuBarHelper {
|
| // of them.
|
| std::vector<GtkWidget*> submenus_;
|
|
|
| + // Signal handlers that are attached only between the "show" and "hide" events
|
| + // for the menu.
|
| + scoped_ptr<GtkSignalRegistrar> signal_handlers_;
|
| +
|
| Delegate* delegate_;
|
| };
|
|
|
|
|