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

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

Issue 193052: GTK: Switch the page/app menus over to the new menu bar helper class.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/gtk/browser_toolbar_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « no previous file | chrome/browser/gtk/browser_toolbar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698