OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_TOOLBAR_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_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/pref_member.h" | 13 #include "base/prefs/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/location_bar/location_bar_view.h" | 16 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
17 #include "ui/base/accelerators/accelerator.h" | 17 #include "ui/base/accelerators/accelerator.h" |
18 #include "ui/views/accessible_pane_view.h" | 18 #include "ui/views/accessible_pane_view.h" |
19 #include "ui/views/controls/button/menu_button.h" | 19 #include "ui/views/controls/button/menu_button.h" |
20 #include "ui/views/controls/button/menu_button_listener.h" | 20 #include "ui/views/controls/button/menu_button_listener.h" |
21 #include "ui/views/view.h" | 21 #include "ui/views/view.h" |
22 | 22 |
23 class BrowserActionsContainer; | 23 class BrowserActionsContainer; |
24 class Browser; | 24 class Browser; |
25 class HomeImageButton; | 25 class HomeImageButton; |
26 class ReloadButton; | 26 class ReloadButton; |
| 27 class SiteChipView; |
27 class ToolbarButton; | 28 class ToolbarButton; |
28 class WrenchMenu; | 29 class WrenchMenu; |
29 class WrenchMenuModel; | 30 class WrenchMenuModel; |
30 class WrenchToolbarButton; | 31 class WrenchToolbarButton; |
31 | 32 |
32 namespace views { | 33 namespace views { |
33 class MenuListener; | 34 class MenuListener; |
34 } | 35 } |
35 | 36 |
36 // The Browser Window's toolbar. | 37 // The Browser Window's toolbar. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 views::View* GetBookmarkBubbleAnchor(); | 79 views::View* GetBookmarkBubbleAnchor(); |
79 | 80 |
80 // Returns the view to which the Translate bubble should be anchored. | 81 // Returns the view to which the Translate bubble should be anchored. |
81 views::View* GetTranslateBubbleAnchor(); | 82 views::View* GetTranslateBubbleAnchor(); |
82 | 83 |
83 // Accessors... | 84 // Accessors... |
84 Browser* browser() const { return browser_; } | 85 Browser* browser() const { return browser_; } |
85 BrowserActionsContainer* browser_actions() const { return browser_actions_; } | 86 BrowserActionsContainer* browser_actions() const { return browser_actions_; } |
86 ReloadButton* reload_button() const { return reload_; } | 87 ReloadButton* reload_button() const { return reload_; } |
87 LocationBarView* location_bar() const { return location_bar_; } | 88 LocationBarView* location_bar() const { return location_bar_; } |
| 89 SiteChipView* site_chip() const { return site_chip_view_; } |
88 views::MenuButton* app_menu() const; | 90 views::MenuButton* app_menu() const; |
89 | 91 |
90 // Overridden from AccessiblePaneView | 92 // Overridden from AccessiblePaneView |
91 virtual bool SetPaneFocus(View* initial_focus) OVERRIDE; | 93 virtual bool SetPaneFocus(View* initial_focus) OVERRIDE; |
92 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 94 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
93 | 95 |
94 // Overridden from views::MenuButtonListener: | 96 // Overridden from views::MenuButtonListener: |
95 virtual void OnMenuButtonClicked(views::View* source, | 97 virtual void OnMenuButtonClicked(views::View* source, |
96 const gfx::Point& point) OVERRIDE; | 98 const gfx::Point& point) OVERRIDE; |
97 | 99 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 void OnShowHomeButtonChanged(); | 207 void OnShowHomeButtonChanged(); |
206 | 208 |
207 int content_shadow_height() const; | 209 int content_shadow_height() const; |
208 | 210 |
209 // Controls | 211 // Controls |
210 ToolbarButton* back_; | 212 ToolbarButton* back_; |
211 ToolbarButton* forward_; | 213 ToolbarButton* forward_; |
212 ReloadButton* reload_; | 214 ReloadButton* reload_; |
213 HomeImageButton* home_; | 215 HomeImageButton* home_; |
214 LocationBarView* location_bar_; | 216 LocationBarView* location_bar_; |
| 217 SiteChipView* site_chip_view_; |
215 BrowserActionsContainer* browser_actions_; | 218 BrowserActionsContainer* browser_actions_; |
216 WrenchToolbarButton* app_menu_; | 219 WrenchToolbarButton* app_menu_; |
217 Browser* browser_; | 220 Browser* browser_; |
218 | 221 |
219 // Controls whether or not a home button should be shown on the toolbar. | 222 // Controls whether or not a home button should be shown on the toolbar. |
220 BooleanPrefMember show_home_button_; | 223 BooleanPrefMember show_home_button_; |
221 | 224 |
222 // The display mode used when laying out the toolbar. | 225 // The display mode used when laying out the toolbar. |
223 DisplayMode display_mode_; | 226 DisplayMode display_mode_; |
224 | 227 |
225 // Wrench model and menu. | 228 // Wrench model and menu. |
226 // Note that the menu should be destroyed before the model it uses, so the | 229 // Note that the menu should be destroyed before the model it uses, so the |
227 // menu should be listed later. | 230 // menu should be listed later. |
228 scoped_ptr<WrenchMenuModel> wrench_menu_model_; | 231 scoped_ptr<WrenchMenuModel> wrench_menu_model_; |
229 scoped_ptr<WrenchMenu> wrench_menu_; | 232 scoped_ptr<WrenchMenu> wrench_menu_; |
230 | 233 |
231 // A list of listeners to call when the menu opens. | 234 // A list of listeners to call when the menu opens. |
232 ObserverList<views::MenuListener> menu_listeners_; | 235 ObserverList<views::MenuListener> menu_listeners_; |
233 | 236 |
234 content::NotificationRegistrar registrar_; | 237 content::NotificationRegistrar registrar_; |
235 | 238 |
236 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); | 239 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); |
237 }; | 240 }; |
238 | 241 |
239 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_ | 242 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_ |
OLD | NEW |