| 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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
| 10 #include "base/prefs/pref_member.h" | 10 #include "base/prefs/pref_member.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 class HomeButton; | 24 class HomeButton; |
| 25 class ReloadButton; | 25 class ReloadButton; |
| 26 class ToolbarButton; | 26 class ToolbarButton; |
| 27 class WrenchMenu; | 27 class WrenchMenu; |
| 28 class WrenchMenuModel; | 28 class WrenchMenuModel; |
| 29 class WrenchToolbarButton; | 29 class WrenchToolbarButton; |
| 30 | 30 |
| 31 namespace extensions { | 31 namespace extensions { |
| 32 class Command; | 32 class Command; |
| 33 class Extension; | 33 class Extension; |
| 34 class ExtensionMessageBubbleFactory; | |
| 35 } | 34 } |
| 36 | 35 |
| 37 namespace views { | 36 namespace views { |
| 38 class MenuListener; | 37 class MenuListener; |
| 39 } | 38 } |
| 40 | 39 |
| 41 // The Browser Window's toolbar. | 40 // The Browser Window's toolbar. |
| 42 class ToolbarView : public views::AccessiblePaneView, | 41 class ToolbarView : public views::AccessiblePaneView, |
| 43 public views::MenuButtonListener, | 42 public views::MenuButtonListener, |
| 44 public ui::AcceleratorProvider, | 43 public ui::AcceleratorProvider, |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 const GURL& url, | 129 const GURL& url, |
| 131 const content::SSLStatus& ssl) override; | 130 const content::SSLStatus& ssl) override; |
| 132 | 131 |
| 133 // CommandObserver: | 132 // CommandObserver: |
| 134 void EnabledStateChangedForCommand(int id, bool enabled) override; | 133 void EnabledStateChangedForCommand(int id, bool enabled) override; |
| 135 | 134 |
| 136 // views::ButtonListener: | 135 // views::ButtonListener: |
| 137 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | 136 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
| 138 | 137 |
| 139 // views::WidgetObserver: | 138 // views::WidgetObserver: |
| 140 void OnWidgetVisibilityChanged(views::Widget* widget, bool visible) override; | |
| 141 void OnWidgetActivationChanged(views::Widget* widget, bool active) override; | 139 void OnWidgetActivationChanged(views::Widget* widget, bool active) override; |
| 142 | 140 |
| 143 // content::NotificationObserver: | 141 // content::NotificationObserver: |
| 144 void Observe(int type, | 142 void Observe(int type, |
| 145 const content::NotificationSource& source, | 143 const content::NotificationSource& source, |
| 146 const content::NotificationDetails& details) override; | 144 const content::NotificationDetails& details) override; |
| 147 | 145 |
| 148 // ui::AcceleratorProvider: | 146 // ui::AcceleratorProvider: |
| 149 bool GetAcceleratorForCommandId(int command_id, | 147 bool GetAcceleratorForCommandId(int command_id, |
| 150 ui::Accelerator* accelerator) override; | 148 ui::Accelerator* accelerator) override; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 | 236 |
| 239 // The display mode used when laying out the toolbar. | 237 // The display mode used when laying out the toolbar. |
| 240 DisplayMode display_mode_; | 238 DisplayMode display_mode_; |
| 241 | 239 |
| 242 // Wrench model and menu. | 240 // Wrench model and menu. |
| 243 // Note that the menu should be destroyed before the model it uses, so the | 241 // Note that the menu should be destroyed before the model it uses, so the |
| 244 // menu should be listed later. | 242 // menu should be listed later. |
| 245 scoped_ptr<WrenchMenuModel> wrench_menu_model_; | 243 scoped_ptr<WrenchMenuModel> wrench_menu_model_; |
| 246 scoped_ptr<WrenchMenu> wrench_menu_; | 244 scoped_ptr<WrenchMenu> wrench_menu_; |
| 247 | 245 |
| 248 // The factory to create bubbles to warn about dangerous/suspicious | |
| 249 // extensions. | |
| 250 scoped_ptr<extensions::ExtensionMessageBubbleFactory> | |
| 251 extension_message_bubble_factory_; | |
| 252 | |
| 253 // A list of listeners to call when the menu opens. | 246 // A list of listeners to call when the menu opens. |
| 254 ObserverList<views::MenuListener> menu_listeners_; | 247 ObserverList<views::MenuListener> menu_listeners_; |
| 255 | 248 |
| 256 content::NotificationRegistrar registrar_; | 249 content::NotificationRegistrar registrar_; |
| 257 | 250 |
| 258 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); | 251 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); |
| 259 }; | 252 }; |
| 260 | 253 |
| 261 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_ | 254 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_ |
| OLD | NEW |