| Index: chrome/browser/gtk/browser_toolbar_gtk.h
|
| ===================================================================
|
| --- chrome/browser/gtk/browser_toolbar_gtk.h (revision 25676)
|
| +++ chrome/browser/gtk/browser_toolbar_gtk.h (working copy)
|
| @@ -11,6 +11,7 @@
|
| #include "base/scoped_ptr.h"
|
| #include "chrome/browser/autocomplete/autocomplete_popup_view.h"
|
| #include "chrome/browser/command_updater.h"
|
| +#include "chrome/browser/gtk/menu_bar_helper.h"
|
| #include "chrome/browser/gtk/menu_gtk.h"
|
| #include "chrome/common/notification_observer.h"
|
| #include "chrome/common/notification_registrar.h"
|
| @@ -34,7 +35,8 @@
|
| class BrowserToolbarGtk : public CommandUpdater::CommandObserver,
|
| public MenuGtk::Delegate,
|
| public NotificationObserver,
|
| - public AutocompletePopupPositioner {
|
| + public AutocompletePopupPositioner,
|
| + public MenuBarHelper::Delegate {
|
| public:
|
| explicit BrowserToolbarGtk(Browser* browser, BrowserWindowGtk* window);
|
| virtual ~BrowserToolbarGtk();
|
| @@ -89,6 +91,11 @@
|
| // Omnibox results popup should go (from the star to the go buttons).
|
| virtual gfx::Rect GetPopupBounds() const;
|
|
|
| + // MenuBarHelper::Delegate implementation ------------------------------------
|
| + virtual void PopupForButton(GtkWidget* button);
|
| + virtual void PopupForButtonNextTo(GtkWidget* button,
|
| + GtkMenuDirectionType dir);
|
| +
|
| private:
|
| // Builds a toolbar button with all the properties set.
|
| // |spacing| is the width of padding (in pixels) on the left and right of the
|
| @@ -143,15 +150,6 @@
|
| guint info, guint time,
|
| BrowserToolbarGtk* toolbar);
|
|
|
| - // These event handlers are used to fake menu-bar behavior in the page and
|
| - // app menus.
|
| - static gboolean OnPageAppMenuMouseMotion(GtkWidget* widget,
|
| - GdkEventMotion* event,
|
| - BrowserToolbarGtk* toolbar);
|
| - static void OnPageAppMenuMoveCurrent(GtkWidget* widget,
|
| - GtkMenuDirectionType dir,
|
| - BrowserToolbarGtk* toolbar);
|
| -
|
| // Sometimes we only want to show the location w/o the toolbar buttons (e.g.,
|
| // in a popup window).
|
| bool ShouldOnlyShowLocation() const;
|
| @@ -207,6 +205,8 @@
|
| // rendering.
|
| OwnedWidgetGtk offscreen_entry_;
|
|
|
| + MenuBarHelper menu_bar_helper_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(BrowserToolbarGtk);
|
| };
|
|
|
|
|