OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... | |
24 | 24 |
25 class BrowserActionsContainer; | 25 class BrowserActionsContainer; |
26 class Browser; | 26 class Browser; |
27 class WrenchMenu; | 27 class WrenchMenu; |
28 class WrenchMenuModel; | 28 class WrenchMenuModel; |
29 | 29 |
30 namespace views { | 30 namespace views { |
31 class MenuListener; | 31 class MenuListener; |
32 } | 32 } |
33 | 33 |
34 class HomeImageButton : public views::ImageButton { | |
Peter Kasting
2013/01/17 23:48:42
Nit: We should declare this in its own header, lik
Tom Cassiotis
2013/01/18 15:18:49
Done.
| |
35 public: | |
36 HomeImageButton(views::ButtonListener* listener, Browser* browser); | |
37 virtual ~HomeImageButton(); | |
38 | |
39 virtual bool GetDropFormats( | |
40 int* formats, | |
41 std::set<OSExchangeData::CustomFormat>* custom_formats) OVERRIDE; | |
42 virtual bool CanDrop(const OSExchangeData& data) OVERRIDE; | |
43 virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE; | |
44 virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE; | |
45 | |
46 private: | |
47 Browser* browser_; | |
48 }; | |
49 | |
34 // The Browser Window's toolbar. | 50 // The Browser Window's toolbar. |
35 class ToolbarView : public views::AccessiblePaneView, | 51 class ToolbarView : public views::AccessiblePaneView, |
36 public views::MenuButtonListener, | 52 public views::MenuButtonListener, |
37 public ui::AcceleratorProvider, | 53 public ui::AcceleratorProvider, |
38 public LocationBarView::Delegate, | 54 public LocationBarView::Delegate, |
39 public content::NotificationObserver, | 55 public content::NotificationObserver, |
40 public CommandObserver, | 56 public CommandObserver, |
41 public views::ButtonListener, | 57 public views::ButtonListener, |
42 public views::WidgetObserver { | 58 public views::WidgetObserver { |
43 public: | 59 public: |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
194 | 210 |
195 void OnShowHomeButtonChanged(); | 211 void OnShowHomeButtonChanged(); |
196 | 212 |
197 // The model that contains the security level, text, icon to display... | 213 // The model that contains the security level, text, icon to display... |
198 ToolbarModel* model_; | 214 ToolbarModel* model_; |
199 | 215 |
200 // Controls | 216 // Controls |
201 views::ImageButton* back_; | 217 views::ImageButton* back_; |
202 views::ImageButton* forward_; | 218 views::ImageButton* forward_; |
203 ReloadButton* reload_; | 219 ReloadButton* reload_; |
204 views::ImageButton* home_; | 220 HomeImageButton* home_; |
205 LocationBarView* location_bar_; | 221 LocationBarView* location_bar_; |
206 BrowserActionsContainer* browser_actions_; | 222 BrowserActionsContainer* browser_actions_; |
207 views::MenuButton* app_menu_; | 223 views::MenuButton* app_menu_; |
208 Browser* browser_; | 224 Browser* browser_; |
209 | 225 |
210 // Controls whether or not a home button should be shown on the toolbar. | 226 // Controls whether or not a home button should be shown on the toolbar. |
211 BooleanPrefMember show_home_button_; | 227 BooleanPrefMember show_home_button_; |
212 | 228 |
213 // A pref that counts how often the bubble has been shown. | 229 // A pref that counts how often the bubble has been shown. |
214 IntegerPrefMember sideload_wipeout_bubble_shown_; | 230 IntegerPrefMember sideload_wipeout_bubble_shown_; |
215 | 231 |
216 // The display mode used when laying out the toolbar. | 232 // The display mode used when laying out the toolbar. |
217 DisplayMode display_mode_; | 233 DisplayMode display_mode_; |
218 | 234 |
219 // Wrench model and menu. | 235 // Wrench model and menu. |
220 // Note that the menu should be destroyed before the model it uses, so the | 236 // Note that the menu should be destroyed before the model it uses, so the |
221 // menu should be listed later. | 237 // menu should be listed later. |
222 scoped_ptr<WrenchMenuModel> wrench_menu_model_; | 238 scoped_ptr<WrenchMenuModel> wrench_menu_model_; |
223 scoped_ptr<WrenchMenu> wrench_menu_; | 239 scoped_ptr<WrenchMenu> wrench_menu_; |
224 | 240 |
225 // A list of listeners to call when the menu opens. | 241 // A list of listeners to call when the menu opens. |
226 ObserverList<views::MenuListener> menu_listeners_; | 242 ObserverList<views::MenuListener> menu_listeners_; |
227 | 243 |
228 content::NotificationRegistrar registrar_; | 244 content::NotificationRegistrar registrar_; |
229 | 245 |
230 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); | 246 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); |
231 }; | 247 }; |
232 | 248 |
233 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ | 249 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ |
OLD | NEW |