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 26 matching lines...) Expand all Loading... |
37 explicit BrowserToolbarGtk(Browser* browser); | 37 explicit BrowserToolbarGtk(Browser* browser); |
38 virtual ~BrowserToolbarGtk(); | 38 virtual ~BrowserToolbarGtk(); |
39 | 39 |
40 // Create the contents of the toolbar. |top_level_window| is the GtkWindow | 40 // Create the contents of the toolbar. |top_level_window| is the GtkWindow |
41 // to which we attach our accelerators. | 41 // to which we attach our accelerators. |
42 void Init(Profile* profile, GtkWindow* top_level_window); | 42 void Init(Profile* profile, GtkWindow* top_level_window); |
43 | 43 |
44 // Adds this GTK toolbar into a sizing box. | 44 // Adds this GTK toolbar into a sizing box. |
45 void AddToolbarToBox(GtkWidget* box); | 45 void AddToolbarToBox(GtkWidget* box); |
46 | 46 |
| 47 void Show(); |
| 48 void Hide(); |
| 49 |
47 virtual LocationBar* GetLocationBar() const; | 50 virtual LocationBar* GetLocationBar() const; |
48 | 51 |
49 GoButtonGtk* GetGoButton() { return go_.get(); } | 52 GoButtonGtk* GetGoButton() { return go_.get(); } |
50 | 53 |
51 // Overridden from CommandUpdater::CommandObserver: | 54 // Overridden from CommandUpdater::CommandObserver: |
52 virtual void EnabledStateChangedForCommand(int id, bool enabled); | 55 virtual void EnabledStateChangedForCommand(int id, bool enabled); |
53 | 56 |
54 // Overridden from MenuGtk::Delegate: | 57 // Overridden from MenuGtk::Delegate: |
55 virtual bool IsCommandEnabled(int command_id) const; | 58 virtual bool IsCommandEnabled(int command_id) const; |
56 virtual bool IsItemChecked(int id) const; | 59 virtual bool IsItemChecked(int id) const; |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 // The back/forward menu gets reset every time it is shown. | 180 // The back/forward menu gets reset every time it is shown. |
178 scoped_ptr<MenuGtk> back_forward_menu_; | 181 scoped_ptr<MenuGtk> back_forward_menu_; |
179 | 182 |
180 scoped_ptr<BackForwardMenuModelGtk> back_menu_model_; | 183 scoped_ptr<BackForwardMenuModelGtk> back_menu_model_; |
181 scoped_ptr<BackForwardMenuModelGtk> forward_menu_model_; | 184 scoped_ptr<BackForwardMenuModelGtk> forward_menu_model_; |
182 | 185 |
183 ScopedRunnableMethodFactory<BrowserToolbarGtk> show_menu_factory_; | 186 ScopedRunnableMethodFactory<BrowserToolbarGtk> show_menu_factory_; |
184 }; | 187 }; |
185 | 188 |
186 #endif // CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_ | 189 #endif // CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_ |
OLD | NEW |