OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
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 "chrome/browser/command_updater.h" | 13 #include "chrome/browser/command_updater.h" |
14 #include "chrome/browser/prefs/pref_member.h" | 14 #include "chrome/browser/prefs/pref_member.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/accessible_pane_view.h" | 16 #include "chrome/browser/ui/views/accessible_pane_view.h" |
17 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 17 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
18 #include "chrome/browser/ui/views/reload_button.h" | 18 #include "chrome/browser/ui/views/reload_button.h" |
19 #include "ui/base/animation/slide_animation.h" | 19 #include "ui/base/animation/slide_animation.h" |
20 #include "ui/base/models/accelerator.h" | 20 #include "ui/base/models/accelerator.h" |
21 #include "views/controls/button/menu_button.h" | 21 #include "views/controls/button/menu_button.h" |
22 #include "views/controls/menu/view_menu_delegate.h" | 22 #include "views/controls/menu/view_menu_delegate.h" |
23 #include "views/view.h" | 23 #include "views/view.h" |
24 | 24 |
25 class BrowserActionsContainer; | 25 class BrowserActionsContainer; |
26 class Browser; | 26 class Browser; |
27 class Profile; | 27 class Profile; |
28 class WrenchMenu; | |
29 | 28 |
30 namespace views { | 29 namespace views { |
31 class MenuListener; | 30 class MenuListener; |
32 } | 31 } |
33 | 32 |
34 // The Browser Window's toolbar. | 33 // The Browser Window's toolbar. |
35 class ToolbarView : public AccessiblePaneView, | 34 class ToolbarView : public AccessiblePaneView, |
36 public views::ViewMenuDelegate, | 35 public views::ViewMenuDelegate, |
37 public ui::AcceleratorProvider, | 36 public ui::AcceleratorProvider, |
38 public LocationBarView::Delegate, | 37 public LocationBarView::Delegate, |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
192 | 191 |
193 // Contents of the profiles menu to populate with profile names. | 192 // Contents of the profiles menu to populate with profile names. |
194 scoped_ptr<ui::SimpleMenuModel> profiles_menu_contents_; | 193 scoped_ptr<ui::SimpleMenuModel> profiles_menu_contents_; |
195 | 194 |
196 // Controls whether or not a home button should be shown on the toolbar. | 195 // Controls whether or not a home button should be shown on the toolbar. |
197 BooleanPrefMember show_home_button_; | 196 BooleanPrefMember show_home_button_; |
198 | 197 |
199 // The display mode used when laying out the toolbar. | 198 // The display mode used when laying out the toolbar. |
200 DisplayMode display_mode_; | 199 DisplayMode display_mode_; |
201 | 200 |
202 // The contents of the wrench menu. | |
203 scoped_ptr<ui::SimpleMenuModel> wrench_menu_model_; | |
204 | |
205 // Wrench menu. | |
206 scoped_ptr<WrenchMenu> wrench_menu_; | |
sky
2011/10/10 17:28:53
Keep this one as a member, otherwise we can run in
sail
2011/10/10 17:47:02
Done.
| |
207 | |
208 // A list of listeners to call when the menu opens. | 201 // A list of listeners to call when the menu opens. |
209 ObserverList<views::MenuListener> menu_listeners_; | 202 ObserverList<views::MenuListener> menu_listeners_; |
210 | 203 |
211 NotificationRegistrar registrar_; | 204 NotificationRegistrar registrar_; |
212 | 205 |
213 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); | 206 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); |
214 }; | 207 }; |
215 | 208 |
216 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ | 209 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ |
OLD | NEW |