Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(724)

Side by Side Diff: chrome/browser/ui/views/toolbar/toolbar_view.h

Issue 62873007: [Toolbar] Base toolbar button class with background images for button states (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add home button Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 BrowserActionsContainer; 23 class BrowserActionsContainer;
24 class Browser; 24 class Browser;
25 class HomeImageButton; 25 class HomeImageButton;
26 class ReloadButton; 26 class ReloadButton;
27 class ToolbarButton;
27 class WrenchMenu; 28 class WrenchMenu;
28 class WrenchMenuModel; 29 class WrenchMenuModel;
29 class WrenchToolbarButton; 30 class WrenchToolbarButton;
30 31
31 namespace views { 32 namespace views {
32 class MenuListener; 33 class MenuListener;
33 } 34 }
34 35
35 // The Browser Window's toolbar. 36 // The Browser Window's toolbar.
36 class ToolbarView : public views::AccessiblePaneView, 37 class ToolbarView : public views::AccessiblePaneView,
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 void UpdateAppMenuState(); 200 void UpdateAppMenuState();
200 201
201 // Updates the severity level on the wrench menu button. 202 // Updates the severity level on the wrench menu button.
202 void UpdateWrenchButtonSeverity(); 203 void UpdateWrenchButtonSeverity();
203 204
204 void OnShowHomeButtonChanged(); 205 void OnShowHomeButtonChanged();
205 206
206 int content_shadow_height() const; 207 int content_shadow_height() const;
207 208
208 // Controls 209 // Controls
209 views::ImageButton* back_; 210 ToolbarButton* back_;
210 views::ImageButton* forward_; 211 ToolbarButton* forward_;
211 ReloadButton* reload_; 212 ReloadButton* reload_;
212 HomeImageButton* home_; 213 HomeImageButton* home_;
213 LocationBarView* location_bar_; 214 LocationBarView* location_bar_;
214 BrowserActionsContainer* browser_actions_; 215 BrowserActionsContainer* browser_actions_;
215 WrenchToolbarButton* app_menu_; 216 WrenchToolbarButton* app_menu_;
216 Browser* browser_; 217 Browser* browser_;
217 218
218 // Controls whether or not a home button should be shown on the toolbar. 219 // Controls whether or not a home button should be shown on the toolbar.
219 BooleanPrefMember show_home_button_; 220 BooleanPrefMember show_home_button_;
220 221
221 // The display mode used when laying out the toolbar. 222 // The display mode used when laying out the toolbar.
222 DisplayMode display_mode_; 223 DisplayMode display_mode_;
223 224
224 // Wrench model and menu. 225 // Wrench model and menu.
225 // Note that the menu should be destroyed before the model it uses, so the 226 // Note that the menu should be destroyed before the model it uses, so the
226 // menu should be listed later. 227 // menu should be listed later.
227 scoped_ptr<WrenchMenuModel> wrench_menu_model_; 228 scoped_ptr<WrenchMenuModel> wrench_menu_model_;
228 scoped_ptr<WrenchMenu> wrench_menu_; 229 scoped_ptr<WrenchMenu> wrench_menu_;
229 230
230 // A list of listeners to call when the menu opens. 231 // A list of listeners to call when the menu opens.
231 ObserverList<views::MenuListener> menu_listeners_; 232 ObserverList<views::MenuListener> menu_listeners_;
232 233
233 content::NotificationRegistrar registrar_; 234 content::NotificationRegistrar registrar_;
234 235
235 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); 236 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView);
236 }; 237 };
237 238
238 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_ 239 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698