summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/browser_toolbar_gtk.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/gtk/browser_toolbar_gtk.h')
-rw-r--r--chrome/browser/gtk/browser_toolbar_gtk.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/chrome/browser/gtk/browser_toolbar_gtk.h b/chrome/browser/gtk/browser_toolbar_gtk.h
index 4962ca2e..c943db4 100644
--- a/chrome/browser/gtk/browser_toolbar_gtk.h
+++ b/chrome/browser/gtk/browser_toolbar_gtk.h
@@ -36,7 +36,7 @@ class BrowserToolbarGtk : public CommandUpdater::CommandObserver,
virtual ~BrowserToolbarGtk();
// Create the contents of the toolbar
- void Init(Profile* profile);
+ void Init(Profile* profile, GtkAccelGroup* accel_group);
// Adds this GTK toolbar into a sizing box.
void AddToolbarToBox(GtkWidget* box);
@@ -76,6 +76,13 @@ class BrowserToolbarGtk : public CommandUpdater::CommandObserver,
int icon_id,
const std::wstring& localized_tooltip);
+ // Adds a keyboard accelerator which trigers a button. (i.e., Ctrl+R is now
+ // equivalent to a reload click).
+ void AddAcceleratorToButton(
+ const scoped_ptr<CustomDrawButton>& button,
+ unsigned int accelerator,
+ unsigned int accelerator_mod);
+
// Gtk callback for the "activate" signal on the |entry_| widget. Responds to
// enter.
static void OnEntryActivate(GtkEntry *entry, BrowserToolbarGtk* toolbar);
@@ -122,6 +129,9 @@ class BrowserToolbarGtk : public CommandUpdater::CommandObserver,
// Our temporary URL bar (until we get the omnibox up).
GtkWidget* entry_;
+ // A pointer to our window's accelerator list.
+ GtkAccelGroup* accel_group_;
+
// All the buttons in the toolbar.
scoped_ptr<CustomDrawButton> back_, forward_;
scoped_ptr<CustomDrawButton> reload_;