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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 const NotificationDetails& details); | 71 const NotificationDetails& details); |
72 | 72 |
73 Profile* profile() { return profile_; } | 73 Profile* profile() { return profile_; } |
74 void SetProfile(Profile* profile); | 74 void SetProfile(Profile* profile); |
75 | 75 |
76 // Message that we should react to a state change. | 76 // Message that we should react to a state change. |
77 void UpdateTabContents(TabContents* contents, bool should_restore_state); | 77 void UpdateTabContents(TabContents* contents, bool should_restore_state); |
78 | 78 |
79 ToolbarStarToggleGtk* star() { return star_.get(); } | 79 ToolbarStarToggleGtk* star() { return star_.get(); } |
80 | 80 |
| 81 // Alerts us that the theme changed, and we might need to change theme images. |
| 82 void UserChangedTheme(); |
| 83 |
81 // Implement AutocompletePopupPositioner, return the position of where the | 84 // Implement AutocompletePopupPositioner, return the position of where the |
82 // Omnibox results popup should go (from the star to the go buttons). | 85 // Omnibox results popup should go (from the star to the go buttons). |
83 virtual gfx::Rect GetPopupBounds() const; | 86 virtual gfx::Rect GetPopupBounds() const; |
84 | 87 |
85 private: | 88 private: |
86 // Builds a toolbar button with all the properties set. | 89 // Builds a toolbar button with all the properties set. |
87 // |spacing| is the width of padding (in pixels) on the left and right of the | 90 // |spacing| is the width of padding (in pixels) on the left and right of the |
88 // button. | 91 // button. |
89 CustomDrawButton* BuildToolbarButton(int normal_id, | 92 CustomDrawButton* BuildToolbarButton(int normal_id, |
90 int active_id, | 93 int active_id, |
91 int highlight_id, | 94 int highlight_id, |
92 int depressed_id, | 95 int depressed_id, |
93 const std::string& localized_tooltip); | 96 const std::string& localized_tooltip, |
| 97 const char* stock_id); |
94 | 98 |
95 // Create the star button given the tooltip. Returns the widget created. | 99 // Create the star button given the tooltip. Returns the widget created. |
96 ToolbarStarToggleGtk* BuildStarButton(const std::string& localized_tooltip); | 100 ToolbarStarToggleGtk* BuildStarButton(const std::string& localized_tooltip); |
97 | 101 |
98 // Create a menu for the toolbar given the icon id and tooltip. Returns the | 102 // Create a menu for the toolbar given the icon id and tooltip. Returns the |
99 // widget created. | 103 // widget created. |
100 GtkWidget* BuildToolbarMenuButton( | 104 GtkWidget* BuildToolbarMenuButton( |
101 int icon_id, | 105 int icon_id, |
102 const std::string& localized_tooltip, | 106 const std::string& localized_tooltip, |
103 OwnedWidgetGtk* owner); | 107 OwnedWidgetGtk* owner); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 // Controls whether or not a home button should be shown on the toolbar. | 170 // Controls whether or not a home button should be shown on the toolbar. |
167 BooleanPrefMember show_home_button_; | 171 BooleanPrefMember show_home_button_; |
168 | 172 |
169 // The event state the last time we observed a button release event. | 173 // The event state the last time we observed a button release event. |
170 int last_release_event_flags_; | 174 int last_release_event_flags_; |
171 | 175 |
172 DISALLOW_COPY_AND_ASSIGN(BrowserToolbarGtk); | 176 DISALLOW_COPY_AND_ASSIGN(BrowserToolbarGtk); |
173 }; | 177 }; |
174 | 178 |
175 #endif // CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_ | 179 #endif // CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_ |
OLD | NEW |