| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_ | 5 #ifndef CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_ |
| 6 #define CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_ | 6 #define CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_ |
| 7 | 7 |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 BrowserActionsToolbarGtk* GetBrowserActionsToolbar() { | 78 BrowserActionsToolbarGtk* GetBrowserActionsToolbar() { |
| 79 return actions_toolbar_.get(); | 79 return actions_toolbar_.get(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 LocationBarViewGtk* GetLocationBarView() { return location_bar_.get(); } | 82 LocationBarViewGtk* GetLocationBarView() { return location_bar_.get(); } |
| 83 | 83 |
| 84 // We have to show padding on the bottom of the toolbar when the bookmark | 84 // We have to show padding on the bottom of the toolbar when the bookmark |
| 85 // is in floating mode. Otherwise the bookmark bar will paint it for us. | 85 // is in floating mode. Otherwise the bookmark bar will paint it for us. |
| 86 void UpdateForBookmarkBarVisibility(bool show_bottom_padding); | 86 void UpdateForBookmarkBarVisibility(bool show_bottom_padding); |
| 87 | 87 |
| 88 void ShowPageMenu(); |
| 89 void ShowAppMenu(); |
| 90 |
| 88 // Overridden from CommandUpdater::CommandObserver: | 91 // Overridden from CommandUpdater::CommandObserver: |
| 89 virtual void EnabledStateChangedForCommand(int id, bool enabled); | 92 virtual void EnabledStateChangedForCommand(int id, bool enabled); |
| 90 | 93 |
| 91 // Overridden from MenuGtk::Delegate: | 94 // Overridden from MenuGtk::Delegate: |
| 92 virtual void StoppedShowing(); | 95 virtual void StoppedShowing(); |
| 93 | 96 |
| 94 // Overridden from menus::SimpleMenuModel::Delegate: | 97 // Overridden from menus::SimpleMenuModel::Delegate: |
| 95 virtual bool IsCommandIdEnabled(int id) const; | 98 virtual bool IsCommandIdEnabled(int id) const; |
| 96 virtual bool IsCommandIdChecked(int id) const; | 99 virtual bool IsCommandIdChecked(int id) const; |
| 97 virtual void ExecuteCommand(int id); | 100 virtual void ExecuteCommand(int id); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 BrowserToolbarGtk* toolbar); | 158 BrowserToolbarGtk* toolbar); |
| 156 | 159 |
| 157 // Gtk callback for the "clicked" signal. | 160 // Gtk callback for the "clicked" signal. |
| 158 static void OnButtonClick(GtkWidget* button, BrowserToolbarGtk* toolbar); | 161 static void OnButtonClick(GtkWidget* button, BrowserToolbarGtk* toolbar); |
| 159 | 162 |
| 160 // Gtk callback to intercept mouse clicks to the menu buttons. | 163 // Gtk callback to intercept mouse clicks to the menu buttons. |
| 161 static gboolean OnMenuButtonPressEvent(GtkWidget* button, | 164 static gboolean OnMenuButtonPressEvent(GtkWidget* button, |
| 162 GdkEventButton* event, | 165 GdkEventButton* event, |
| 163 BrowserToolbarGtk* toolbar); | 166 BrowserToolbarGtk* toolbar); |
| 164 | 167 |
| 165 // Gtk callback used when a hotkey activates the menu buttons. | |
| 166 static gboolean OnMenuClicked(GtkWidget* button, | |
| 167 BrowserToolbarGtk* toolbar); | |
| 168 | |
| 169 // Used for drags onto home button. | 168 // Used for drags onto home button. |
| 170 static void OnDragDataReceived(GtkWidget* widget, | 169 static void OnDragDataReceived(GtkWidget* widget, |
| 171 GdkDragContext* drag_context, | 170 GdkDragContext* drag_context, |
| 172 gint x, gint y, | 171 gint x, gint y, |
| 173 GtkSelectionData* data, | 172 GtkSelectionData* data, |
| 174 guint info, guint time, | 173 guint info, guint time, |
| 175 BrowserToolbarGtk* toolbar); | 174 BrowserToolbarGtk* toolbar); |
| 176 | 175 |
| 177 // ProfileSyncServiceObserver method. | 176 // ProfileSyncServiceObserver method. |
| 178 virtual void OnStateChanged(); | 177 virtual void OnStateChanged(); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 // A GtkEntry that isn't part of the hierarchy. We keep this for native | 238 // A GtkEntry that isn't part of the hierarchy. We keep this for native |
| 240 // rendering. | 239 // rendering. |
| 241 OwnedWidgetGtk offscreen_entry_; | 240 OwnedWidgetGtk offscreen_entry_; |
| 242 | 241 |
| 243 MenuBarHelper menu_bar_helper_; | 242 MenuBarHelper menu_bar_helper_; |
| 244 | 243 |
| 245 DISALLOW_COPY_AND_ASSIGN(BrowserToolbarGtk); | 244 DISALLOW_COPY_AND_ASSIGN(BrowserToolbarGtk); |
| 246 }; | 245 }; |
| 247 | 246 |
| 248 #endif // CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_ | 247 #endif // CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_ |
| OLD | NEW |