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