OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UI_VIEWS_TOOLBAR_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/observer_list.h" | 12 #include "base/observer_list.h" |
13 #include "base/prefs/public/pref_member.h" | 13 #include "base/prefs/public/pref_member.h" |
14 #include "chrome/browser/command_observer.h" | 14 #include "chrome/browser/command_observer.h" |
15 #include "chrome/browser/ui/toolbar/back_forward_menu_model.h" | 15 #include "chrome/browser/ui/toolbar/back_forward_menu_model.h" |
| 16 #include "chrome/browser/ui/views/home_button.h" |
16 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 17 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
17 #include "chrome/browser/ui/views/reload_button.h" | 18 #include "chrome/browser/ui/views/reload_button.h" |
18 #include "ui/base/accelerators/accelerator.h" | 19 #include "ui/base/accelerators/accelerator.h" |
19 #include "ui/base/animation/slide_animation.h" | 20 #include "ui/base/animation/slide_animation.h" |
20 #include "ui/views/accessible_pane_view.h" | 21 #include "ui/views/accessible_pane_view.h" |
21 #include "ui/views/controls/button/menu_button.h" | 22 #include "ui/views/controls/button/menu_button.h" |
22 #include "ui/views/controls/button/menu_button_listener.h" | 23 #include "ui/views/controls/button/menu_button_listener.h" |
23 #include "ui/views/view.h" | 24 #include "ui/views/view.h" |
24 | 25 |
25 class BrowserActionsContainer; | 26 class BrowserActionsContainer; |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 | 195 |
195 void OnShowHomeButtonChanged(); | 196 void OnShowHomeButtonChanged(); |
196 | 197 |
197 // The model that contains the security level, text, icon to display... | 198 // The model that contains the security level, text, icon to display... |
198 ToolbarModel* model_; | 199 ToolbarModel* model_; |
199 | 200 |
200 // Controls | 201 // Controls |
201 views::ImageButton* back_; | 202 views::ImageButton* back_; |
202 views::ImageButton* forward_; | 203 views::ImageButton* forward_; |
203 ReloadButton* reload_; | 204 ReloadButton* reload_; |
204 views::ImageButton* home_; | 205 HomeImageButton* home_; |
205 LocationBarView* location_bar_; | 206 LocationBarView* location_bar_; |
206 BrowserActionsContainer* browser_actions_; | 207 BrowserActionsContainer* browser_actions_; |
207 views::MenuButton* app_menu_; | 208 views::MenuButton* app_menu_; |
208 Browser* browser_; | 209 Browser* browser_; |
209 | 210 |
210 // Controls whether or not a home button should be shown on the toolbar. | 211 // Controls whether or not a home button should be shown on the toolbar. |
211 BooleanPrefMember show_home_button_; | 212 BooleanPrefMember show_home_button_; |
212 | 213 |
213 // A pref that counts how often the bubble has been shown. | 214 // A pref that counts how often the bubble has been shown. |
214 IntegerPrefMember sideload_wipeout_bubble_shown_; | 215 IntegerPrefMember sideload_wipeout_bubble_shown_; |
215 | 216 |
216 // The display mode used when laying out the toolbar. | 217 // The display mode used when laying out the toolbar. |
217 DisplayMode display_mode_; | 218 DisplayMode display_mode_; |
218 | 219 |
219 // Wrench model and menu. | 220 // Wrench model and menu. |
220 // Note that the menu should be destroyed before the model it uses, so the | 221 // Note that the menu should be destroyed before the model it uses, so the |
221 // menu should be listed later. | 222 // menu should be listed later. |
222 scoped_ptr<WrenchMenuModel> wrench_menu_model_; | 223 scoped_ptr<WrenchMenuModel> wrench_menu_model_; |
223 scoped_ptr<WrenchMenu> wrench_menu_; | 224 scoped_ptr<WrenchMenu> wrench_menu_; |
224 | 225 |
225 // A list of listeners to call when the menu opens. | 226 // A list of listeners to call when the menu opens. |
226 ObserverList<views::MenuListener> menu_listeners_; | 227 ObserverList<views::MenuListener> menu_listeners_; |
227 | 228 |
228 content::NotificationRegistrar registrar_; | 229 content::NotificationRegistrar registrar_; |
229 | 230 |
230 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); | 231 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); |
231 }; | 232 }; |
232 | 233 |
233 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ | 234 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ |
OLD | NEW |