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

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

Issue 3033036: Toolbar layout changes for M6 theme. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 months 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
« no previous file with comments | « no previous file | chrome/browser/views/toolbar_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_VIEWS_TOOLBAR_VIEW_H_ 5 #ifndef CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H_
6 #define CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H_ 6 #define CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 virtual bool GetAcceleratorForCommandId(int command_id, 110 virtual bool GetAcceleratorForCommandId(int command_id,
111 menus::Accelerator* accelerator); 111 menus::Accelerator* accelerator);
112 virtual void ExecuteCommand(int command_id); 112 virtual void ExecuteCommand(int command_id);
113 113
114 // Overridden from views::View: 114 // Overridden from views::View:
115 virtual gfx::Size GetPreferredSize(); 115 virtual gfx::Size GetPreferredSize();
116 virtual void Layout(); 116 virtual void Layout();
117 virtual void Paint(gfx::Canvas* canvas); 117 virtual void Paint(gfx::Canvas* canvas);
118 virtual void OnThemeChanged(); 118 virtual void OnThemeChanged();
119 119
120 // The apparent horizontal space between most items, and the vertical padding
121 // above and below them.
122 static const int kStandardSpacing;
123 // The top of the toolbar has an edge we have to skip over in addition to the
124 // standard spacing.
125 static const int kVertSpacing;
126
120 protected: 127 protected:
121 128
122 // Overridden from AccessibleToolbarView 129 // Overridden from AccessibleToolbarView
123 virtual views::View* GetDefaultFocusableChild(); 130 virtual views::View* GetDefaultFocusableChild();
124 virtual void RemoveToolbarFocus(); 131 virtual void RemoveToolbarFocus();
125 132
126 private: 133 private:
127 // Returns the number of pixels above the location bar in non-normal display. 134 // Returns the number of pixels above the location bar in non-normal display.
128 int PopupTopSpacing() const; 135 int PopupTopSpacing() const;
129 136
(...skipping 12 matching lines...) Expand all
142 149
143 // Starts the recurring timer that periodically asks the upgrade notifier 150 // Starts the recurring timer that periodically asks the upgrade notifier
144 // to pulsate. 151 // to pulsate.
145 void ShowUpgradeReminder(); 152 void ShowUpgradeReminder();
146 153
147 // Show the reminder, tempting the user to upgrade by pulsating. 154 // Show the reminder, tempting the user to upgrade by pulsating.
148 void PulsateUpgradeNotifier(); 155 void PulsateUpgradeNotifier();
149 156
150 // Gets a canvas with the icon for the app menu. It will possibly contain 157 // Gets a canvas with the icon for the app menu. It will possibly contain
151 // an overlaid badge if an update is recommended. 158 // an overlaid badge if an update is recommended.
152 SkBitmap GetAppMenuIcon(); 159 SkBitmap GetAppMenuIcon(views::CustomButton::ButtonState state);
153 160
154 scoped_ptr<BackForwardMenuModel> back_menu_model_; 161 scoped_ptr<BackForwardMenuModel> back_menu_model_;
155 scoped_ptr<BackForwardMenuModel> forward_menu_model_; 162 scoped_ptr<BackForwardMenuModel> forward_menu_model_;
156 163
157 // The model that contains the security level, text, icon to display... 164 // The model that contains the security level, text, icon to display...
158 ToolbarModel* model_; 165 ToolbarModel* model_;
159 166
160 // Controls 167 // Controls
161 views::ImageButton* back_; 168 views::ImageButton* back_;
162 views::ImageButton* forward_; 169 views::ImageButton* forward_;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 207
201 // If non-null the destructor sets this to true. This is set to a non-null 208 // If non-null the destructor sets this to true. This is set to a non-null
202 // while the menu is showing and used to detect if the menu was deleted while 209 // while the menu is showing and used to detect if the menu was deleted while
203 // running. 210 // running.
204 bool* destroyed_flag_; 211 bool* destroyed_flag_;
205 212
206 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); 213 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView);
207 }; 214 };
208 215
209 #endif // CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H_ 216 #endif // CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/views/toolbar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698