| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 void OnShowHomeButtonChanged(); | 222 void OnShowHomeButtonChanged(); |
| 225 | 223 |
| 226 int content_shadow_height() const; | 224 int content_shadow_height() const; |
| 227 | 225 |
| 228 // Controls | 226 // Controls |
| 229 BackButton* back_; | 227 BackButton* back_; |
| 230 ToolbarButton* forward_; | 228 ToolbarButton* forward_; |
| 231 ReloadButton* reload_; | 229 ReloadButton* reload_; |
| 232 HomeButton* home_; | 230 HomeButton* home_; |
| 233 LocationBarView* location_bar_; | 231 LocationBarView* location_bar_; |
| 234 ToolbarOriginChipView* origin_chip_view_; | |
| 235 BrowserActionsContainer* browser_actions_; | 232 BrowserActionsContainer* browser_actions_; |
| 236 WrenchToolbarButton* app_menu_; | 233 WrenchToolbarButton* app_menu_; |
| 237 Browser* browser_; | 234 Browser* browser_; |
| 238 | 235 |
| 239 // Controls whether or not a home button should be shown on the toolbar. | 236 // Controls whether or not a home button should be shown on the toolbar. |
| 240 BooleanPrefMember show_home_button_; | 237 BooleanPrefMember show_home_button_; |
| 241 | 238 |
| 242 // The display mode used when laying out the toolbar. | 239 // The display mode used when laying out the toolbar. |
| 243 DisplayMode display_mode_; | 240 DisplayMode display_mode_; |
| 244 | 241 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 255 | 252 |
| 256 // A list of listeners to call when the menu opens. | 253 // A list of listeners to call when the menu opens. |
| 257 ObserverList<views::MenuListener> menu_listeners_; | 254 ObserverList<views::MenuListener> menu_listeners_; |
| 258 | 255 |
| 259 content::NotificationRegistrar registrar_; | 256 content::NotificationRegistrar registrar_; |
| 260 | 257 |
| 261 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); | 258 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); |
| 262 }; | 259 }; |
| 263 | 260 |
| 264 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_ | 261 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_ |
| OLD | NEW |