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

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

Issue 4524002: First cut of the about:conflicts page, listing all DLLs loaded in the Chrome ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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 (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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 protected: 135 protected:
136 136
137 // Overridden from AccessiblePaneView 137 // Overridden from AccessiblePaneView
138 virtual views::View* GetDefaultFocusableChild(); 138 virtual views::View* GetDefaultFocusableChild();
139 virtual void RemovePaneFocus(); 139 virtual void RemovePaneFocus();
140 140
141 private: 141 private:
142 // Returns true if we should show the upgrade recommended dot. 142 // Returns true if we should show the upgrade recommended dot.
143 bool IsUpgradeRecommended(); 143 bool IsUpgradeRecommended();
144 144
145 // Returns true if we should show the warning for incompatible software.
146 bool ShouldShowIncompatibilityWarning();
147
145 // Returns the number of pixels above the location bar in non-normal display. 148 // Returns the number of pixels above the location bar in non-normal display.
146 int PopupTopSpacing() const; 149 int PopupTopSpacing() const;
147 150
148 // Loads the images for all the child views. 151 // Loads the images for all the child views.
149 void LoadImages(); 152 void LoadImages();
150 153
151 // Types of display mode this toolbar can have. 154 // Types of display mode this toolbar can have.
152 enum DisplayMode { 155 enum DisplayMode {
153 DISPLAYMODE_NORMAL, // Normal toolbar with buttons, etc. 156 DISPLAYMODE_NORMAL, // Normal toolbar with buttons, etc.
154 DISPLAYMODE_LOCATION // Slimline toolbar showing only compact location 157 DISPLAYMODE_LOCATION // Slimline toolbar showing only compact location
155 // bar, used for popups. 158 // bar, used for popups.
156 }; 159 };
157 bool IsDisplayModeNormal() const { 160 bool IsDisplayModeNormal() const {
158 return display_mode_ == DISPLAYMODE_NORMAL; 161 return display_mode_ == DISPLAYMODE_NORMAL;
159 } 162 }
160 163
161 // Starts the recurring timer that periodically asks the upgrade notifier 164 // Starts the recurring timer that periodically asks the notification dot
162 // to pulsate. 165 // to pulsate.
163 void ShowUpgradeReminder(); 166 void ShowNotificationDot();
164 167
165 // Show the reminder, tempting the user to upgrade by pulsating. 168 // Show the reminder, tempting the user to take a look.
166 void PulsateUpgradeNotifier(); 169 void PulsateNotificationDot();
167 170
168 // Gets a canvas with the icon for the app menu. It will possibly contain 171 // Gets a canvas with the icon for the app menu. It will possibly contain
169 // an overlaid badge if an update is recommended. 172 // an overlaid badge if an update is recommended.
170 SkBitmap GetAppMenuIcon(views::CustomButton::ButtonState state); 173 SkBitmap GetAppMenuIcon(views::CustomButton::ButtonState state);
171 174
172 scoped_ptr<BackForwardMenuModel> back_menu_model_; 175 scoped_ptr<BackForwardMenuModel> back_menu_model_;
173 scoped_ptr<BackForwardMenuModel> forward_menu_model_; 176 scoped_ptr<BackForwardMenuModel> forward_menu_model_;
174 177
175 // The model that contains the security level, text, icon to display... 178 // The model that contains the security level, text, icon to display...
176 ToolbarModel* model_; 179 ToolbarModel* model_;
(...skipping 26 matching lines...) Expand all
203 // MenuLister is managed by Menu2. 206 // MenuLister is managed by Menu2.
204 scoped_ptr<views::Menu2> wrench_menu_2_; 207 scoped_ptr<views::Menu2> wrench_menu_2_;
205 #endif 208 #endif
206 209
207 // Wrench menu. 210 // Wrench menu.
208 scoped_refptr<WrenchMenu> wrench_menu_; 211 scoped_refptr<WrenchMenu> wrench_menu_;
209 212
210 // Vector of listeners to receive callbacks when the menu opens. 213 // Vector of listeners to receive callbacks when the menu opens.
211 std::vector<views::MenuListener*> menu_listeners_; 214 std::vector<views::MenuListener*> menu_listeners_;
212 215
213 // The animation that makes the update reminder pulse. 216 // The animation that makes the notification dot pulse.
214 scoped_ptr<SlideAnimation> update_reminder_animation_; 217 scoped_ptr<SlideAnimation> notification_dot_animation_;
215 218
216 // We periodically restart the animation after it has been showed 219 // We periodically restart the animation after it has been showed
217 // once, to create a pulsating effect. 220 // once, to create a pulsating effect.
218 base::RepeatingTimer<ToolbarView> upgrade_reminder_pulse_timer_; 221 base::RepeatingTimer<ToolbarView> notification_dot_pulse_timer_;
219 222
220 // Used to post tasks to switch to the next/previous menu. 223 // Used to post tasks to switch to the next/previous menu.
221 ScopedRunnableMethodFactory<ToolbarView> method_factory_; 224 ScopedRunnableMethodFactory<ToolbarView> method_factory_;
222 225
223 NotificationRegistrar registrar_; 226 NotificationRegistrar registrar_;
224 227
225 // If non-null the destructor sets this to true. This is set to a non-null 228 // If non-null the destructor sets this to true. This is set to a non-null
226 // while the menu is showing and used to detect if the menu was deleted while 229 // while the menu is showing and used to detect if the menu was deleted while
227 // running. 230 // running.
228 bool* destroyed_flag_; 231 bool* destroyed_flag_;
229 232
230 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); 233 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView);
231 }; 234 };
232 235
233 #endif // CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H_ 236 #endif // CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698