| 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 18 matching lines...) Expand all Loading... |
| 29 class BrowserToolbarGtk : public CommandUpdater::CommandObserver, | 29 class BrowserToolbarGtk : public CommandUpdater::CommandObserver, |
| 30 public MenuGtk::Delegate, | 30 public MenuGtk::Delegate, |
| 31 public NotificationObserver { | 31 public NotificationObserver { |
| 32 public: | 32 public: |
| 33 // Height of the toolbar, in pixels. | 33 // Height of the toolbar, in pixels. |
| 34 static const int kToolbarHeight; | 34 static const int kToolbarHeight; |
| 35 | 35 |
| 36 explicit BrowserToolbarGtk(Browser* browser); | 36 explicit BrowserToolbarGtk(Browser* browser); |
| 37 virtual ~BrowserToolbarGtk(); | 37 virtual ~BrowserToolbarGtk(); |
| 38 | 38 |
| 39 // Create the contents of the toolbar | 39 // Create the contents of the toolbar. |top_level_window| is the GtkWindow |
| 40 void Init(Profile* profile, GtkAccelGroup* accel_group); | 40 // to which we attach our accelerators. |
| 41 void Init(Profile* profile, GtkWindow* top_level_window); |
| 41 | 42 |
| 42 // Adds this GTK toolbar into a sizing box. | 43 // Adds this GTK toolbar into a sizing box. |
| 43 void AddToolbarToBox(GtkWidget* box); | 44 void AddToolbarToBox(GtkWidget* box); |
| 44 | 45 |
| 45 virtual LocationBar* GetLocationBar() const; | 46 virtual LocationBar* GetLocationBar() const; |
| 46 | 47 |
| 47 // Overridden from CommandUpdater::CommandObserver: | 48 // Overridden from CommandUpdater::CommandObserver: |
| 48 virtual void EnabledStateChangedForCommand(int id, bool enabled); | 49 virtual void EnabledStateChangedForCommand(int id, bool enabled); |
| 49 | 50 |
| 50 // Overridden from MenuGtk::Delegate: | 51 // Overridden from MenuGtk::Delegate: |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 // The back/forward menu gets reset every time it is shown. | 157 // The back/forward menu gets reset every time it is shown. |
| 157 scoped_ptr<MenuGtk> back_forward_menu_; | 158 scoped_ptr<MenuGtk> back_forward_menu_; |
| 158 | 159 |
| 159 scoped_ptr<BackForwardMenuModelGtk> back_menu_model_; | 160 scoped_ptr<BackForwardMenuModelGtk> back_menu_model_; |
| 160 scoped_ptr<BackForwardMenuModelGtk> forward_menu_model_; | 161 scoped_ptr<BackForwardMenuModelGtk> forward_menu_model_; |
| 161 | 162 |
| 162 ScopedRunnableMethodFactory<BrowserToolbarGtk> show_menu_factory_; | 163 ScopedRunnableMethodFactory<BrowserToolbarGtk> show_menu_factory_; |
| 163 }; | 164 }; |
| 164 | 165 |
| 165 #endif // CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_ | 166 #endif // CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_ |
| OLD | NEW |