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

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: overriding Created 7 years 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 BackButton;
23 class BrowserActionsContainer; 24 class BrowserActionsContainer;
24 class Browser; 25 class Browser;
25 class HomeImageButton; 26 class HomeButton;
26 class ReloadButton; 27 class ReloadButton;
28 class ToolbarButton;
27 class WrenchMenu; 29 class WrenchMenu;
28 class WrenchMenuModel; 30 class WrenchMenuModel;
29 class WrenchToolbarButton; 31 class WrenchToolbarButton;
30 32
31 namespace views { 33 namespace views {
32 class MenuListener; 34 class MenuListener;
33 } 35 }
34 36
35 // The Browser Window's toolbar. 37 // The Browser Window's toolbar.
36 class ToolbarView : public views::AccessiblePaneView, 38 class ToolbarView : public views::AccessiblePaneView,
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 void UpdateAppMenuState(); 205 void UpdateAppMenuState();
204 206
205 // Updates the severity level on the wrench menu button. 207 // Updates the severity level on the wrench menu button.
206 void UpdateWrenchButtonSeverity(); 208 void UpdateWrenchButtonSeverity();
207 209
208 void OnShowHomeButtonChanged(); 210 void OnShowHomeButtonChanged();
209 211
210 int content_shadow_height() const; 212 int content_shadow_height() const;
211 213
212 // Controls 214 // Controls
213 views::ImageButton* back_; 215 BackButton* back_;
214 views::ImageButton* forward_; 216 ToolbarButton* forward_;
215 ReloadButton* reload_; 217 ReloadButton* reload_;
216 HomeImageButton* home_; 218 HomeButton* home_;
217 LocationBarView* location_bar_; 219 LocationBarView* location_bar_;
218 BrowserActionsContainer* browser_actions_; 220 BrowserActionsContainer* browser_actions_;
219 WrenchToolbarButton* app_menu_; 221 WrenchToolbarButton* app_menu_;
220 Browser* browser_; 222 Browser* browser_;
221 223
222 // Controls whether or not a home button should be shown on the toolbar. 224 // Controls whether or not a home button should be shown on the toolbar.
223 BooleanPrefMember show_home_button_; 225 BooleanPrefMember show_home_button_;
224 226
225 // The display mode used when laying out the toolbar. 227 // The display mode used when laying out the toolbar.
226 DisplayMode display_mode_; 228 DisplayMode display_mode_;
227 229
228 // Wrench model and menu. 230 // Wrench model and menu.
229 // Note that the menu should be destroyed before the model it uses, so the 231 // Note that the menu should be destroyed before the model it uses, so the
230 // menu should be listed later. 232 // menu should be listed later.
231 scoped_ptr<WrenchMenuModel> wrench_menu_model_; 233 scoped_ptr<WrenchMenuModel> wrench_menu_model_;
232 scoped_ptr<WrenchMenu> wrench_menu_; 234 scoped_ptr<WrenchMenu> wrench_menu_;
233 235
234 // A list of listeners to call when the menu opens. 236 // A list of listeners to call when the menu opens.
235 ObserverList<views::MenuListener> menu_listeners_; 237 ObserverList<views::MenuListener> menu_listeners_;
236 238
237 content::NotificationRegistrar registrar_; 239 content::NotificationRegistrar registrar_;
238 240
239 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); 241 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView);
240 }; 242 };
241 243
242 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_ 244 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/toolbar_button_test.cc ('k') | chrome/browser/ui/views/toolbar/toolbar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698