diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-07 22:31:35 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-07 22:31:35 +0000 |
commit | 23512f4ba83ab011aac513972290aa30b26785cd (patch) | |
tree | a60e0238bd60a79258de538c4564e984a5cf3506 /chrome/browser/gtk/browser_toolbar_gtk.h | |
parent | b45243c422ce9eddf818d25777fea0f7e7f94e85 (diff) | |
download | chromium_src-23512f4ba83ab011aac513972290aa30b26785cd.zip chromium_src-23512f4ba83ab011aac513972290aa30b26785cd.tar.gz chromium_src-23512f4ba83ab011aac513972290aa30b26785cd.tar.bz2 |
Give page/app menu native menu bar feel.
Allow keyboard and mouse navigation between the two while one is open.
BUG=none
TEST=the page and wrench menus feel like a native menubar
Review URL: http://codereview.chromium.org/155164
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20095 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/browser_toolbar_gtk.h')
-rw-r--r-- | chrome/browser/gtk/browser_toolbar_gtk.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/browser/gtk/browser_toolbar_gtk.h b/chrome/browser/gtk/browser_toolbar_gtk.h index 9ed0929..e6d76dc 100644 --- a/chrome/browser/gtk/browser_toolbar_gtk.h +++ b/chrome/browser/gtk/browser_toolbar_gtk.h @@ -109,6 +109,10 @@ class BrowserToolbarGtk : public CommandUpdater::CommandObserver, // Connect signals for dragging a url onto the home button. void SetUpDragForHomeButton(); + // Helper for the PageAppMenu event handlers. Pops down the currently active + // meun and pops up the other menu. + void ChangeActiveMenu(GtkWidget* active_menu, guint timestamp); + // Gtk callback for the "expose-event" signal. static gboolean OnToolbarExpose(GtkWidget* widget, GdkEventExpose* e, BrowserToolbarGtk* toolbar); @@ -133,6 +137,15 @@ class BrowserToolbarGtk : public CommandUpdater::CommandObserver, 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); + // Initialize the background NineBox. void InitNineBox(); |