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 BackButton; | 23 class BackButton; |
24 class BrowserActionsContainer; | 24 class BrowserActionsContainer; |
25 class Browser; | 25 class Browser; |
26 class HomeButton; | 26 class HomeButton; |
27 class ReloadButton; | 27 class ReloadButton; |
28 class ToolbarButton; | 28 class ToolbarButton; |
29 class ToolbarOriginChipView; | |
30 class WrenchMenu; | 29 class WrenchMenu; |
31 class WrenchMenuModel; | 30 class WrenchMenuModel; |
32 class WrenchToolbarButton; | 31 class WrenchToolbarButton; |
33 | 32 |
34 namespace extensions { | 33 namespace extensions { |
35 class Command; | 34 class Command; |
36 class Extension; | 35 class Extension; |
37 class ExtensionMessageBubbleFactory; | 36 class ExtensionMessageBubbleFactory; |
38 } | 37 } |
39 | 38 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 void ShowPageActionPopup(const extensions::Extension* extension); | 95 void ShowPageActionPopup(const extensions::Extension* extension); |
97 | 96 |
98 // Shows the extension's browser action, if present. | 97 // Shows the extension's browser action, if present. |
99 void ShowBrowserActionPopup(const extensions::Extension* extension); | 98 void ShowBrowserActionPopup(const extensions::Extension* extension); |
100 | 99 |
101 // Accessors... | 100 // Accessors... |
102 Browser* browser() const { return browser_; } | 101 Browser* browser() const { return browser_; } |
103 BrowserActionsContainer* browser_actions() const { return browser_actions_; } | 102 BrowserActionsContainer* browser_actions() const { return browser_actions_; } |
104 ReloadButton* reload_button() const { return reload_; } | 103 ReloadButton* reload_button() const { return reload_; } |
105 LocationBarView* location_bar() const { return location_bar_; } | 104 LocationBarView* location_bar() const { return location_bar_; } |
106 ToolbarOriginChipView* origin_chip() const { return origin_chip_view_; } | |
107 views::MenuButton* app_menu() const; | 105 views::MenuButton* app_menu() const; |
108 HomeButton* home_button() const { return home_; } | 106 HomeButton* home_button() const { return home_; } |
109 | 107 |
110 // Overridden from AccessiblePaneView | 108 // Overridden from AccessiblePaneView |
111 virtual bool SetPaneFocus(View* initial_focus) OVERRIDE; | 109 virtual bool SetPaneFocus(View* initial_focus) OVERRIDE; |
112 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; | 110 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; |
113 | 111 |
114 // Overridden from views::MenuButtonListener: | 112 // Overridden from views::MenuButtonListener: |
115 virtual void OnMenuButtonClicked(views::View* source, | 113 virtual void OnMenuButtonClicked(views::View* source, |
116 const gfx::Point& point) OVERRIDE; | 114 const gfx::Point& point) OVERRIDE; |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 void OnShowHomeButtonChanged(); | 226 void OnShowHomeButtonChanged(); |
229 | 227 |
230 int content_shadow_height() const; | 228 int content_shadow_height() const; |
231 | 229 |
232 // Controls | 230 // Controls |
233 BackButton* back_; | 231 BackButton* back_; |
234 ToolbarButton* forward_; | 232 ToolbarButton* forward_; |
235 ReloadButton* reload_; | 233 ReloadButton* reload_; |
236 HomeButton* home_; | 234 HomeButton* home_; |
237 LocationBarView* location_bar_; | 235 LocationBarView* location_bar_; |
238 ToolbarOriginChipView* origin_chip_view_; | |
239 BrowserActionsContainer* browser_actions_; | 236 BrowserActionsContainer* browser_actions_; |
240 WrenchToolbarButton* app_menu_; | 237 WrenchToolbarButton* app_menu_; |
241 Browser* browser_; | 238 Browser* browser_; |
242 | 239 |
243 // Controls whether or not a home button should be shown on the toolbar. | 240 // Controls whether or not a home button should be shown on the toolbar. |
244 BooleanPrefMember show_home_button_; | 241 BooleanPrefMember show_home_button_; |
245 | 242 |
246 // The display mode used when laying out the toolbar. | 243 // The display mode used when laying out the toolbar. |
247 DisplayMode display_mode_; | 244 DisplayMode display_mode_; |
248 | 245 |
(...skipping 10 matching lines...) Expand all Loading... |
259 | 256 |
260 // A list of listeners to call when the menu opens. | 257 // A list of listeners to call when the menu opens. |
261 ObserverList<views::MenuListener> menu_listeners_; | 258 ObserverList<views::MenuListener> menu_listeners_; |
262 | 259 |
263 content::NotificationRegistrar registrar_; | 260 content::NotificationRegistrar registrar_; |
264 | 261 |
265 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); | 262 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); |
266 }; | 263 }; |
267 | 264 |
268 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_ | 265 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_ |
OLD | NEW |