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

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: Account for maximized state. 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 HomeButton;
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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 void UpdateAppMenuState(); 204 void UpdateAppMenuState();
204 205
205 // Updates the severity level on the wrench menu button. 206 // Updates the severity level on the wrench menu button.
206 void UpdateWrenchButtonSeverity(); 207 void UpdateWrenchButtonSeverity();
207 208
208 void OnShowHomeButtonChanged(); 209 void OnShowHomeButtonChanged();
209 210
210 int content_shadow_height() const; 211 int content_shadow_height() const;
211 212
212 // Controls 213 // Controls
213 views::ImageButton* back_; 214 ToolbarButton* back_;
214 views::ImageButton* forward_; 215 ToolbarButton* forward_;
215 ReloadButton* reload_; 216 ReloadButton* reload_;
216 HomeImageButton* home_; 217 HomeButton* home_;
217 LocationBarView* location_bar_; 218 LocationBarView* location_bar_;
218 BrowserActionsContainer* browser_actions_; 219 BrowserActionsContainer* browser_actions_;
219 WrenchToolbarButton* app_menu_; 220 WrenchToolbarButton* app_menu_;
220 Browser* browser_; 221 Browser* browser_;
221 222
222 // Controls whether or not a home button should be shown on the toolbar. 223 // Controls whether or not a home button should be shown on the toolbar.
223 BooleanPrefMember show_home_button_; 224 BooleanPrefMember show_home_button_;
224 225
225 // The display mode used when laying out the toolbar. 226 // The display mode used when laying out the toolbar.
226 DisplayMode display_mode_; 227 DisplayMode display_mode_;
227 228
228 // Wrench model and menu. 229 // Wrench model and menu.
229 // Note that the menu should be destroyed before the model it uses, so the 230 // Note that the menu should be destroyed before the model it uses, so the
230 // menu should be listed later. 231 // menu should be listed later.
231 scoped_ptr<WrenchMenuModel> wrench_menu_model_; 232 scoped_ptr<WrenchMenuModel> wrench_menu_model_;
232 scoped_ptr<WrenchMenu> wrench_menu_; 233 scoped_ptr<WrenchMenu> wrench_menu_;
233 234
234 // A list of listeners to call when the menu opens. 235 // A list of listeners to call when the menu opens.
235 ObserverList<views::MenuListener> menu_listeners_; 236 ObserverList<views::MenuListener> menu_listeners_;
236 237
237 content::NotificationRegistrar registrar_; 238 content::NotificationRegistrar registrar_;
238 239
239 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); 240 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView);
240 }; 241 };
241 242
242 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_ 243 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698