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

Side by Side Diff: chrome/browser/ui/views/tabs/tab.h

Issue 1394473004: Fix favicon crash animation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup
Patch Set: Remove unnecessary conditional Created 5 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_TABS_TAB_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_
6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 269
270 // Gets the throb value for the tab. When a tab is not selected the 270 // Gets the throb value for the tab. When a tab is not selected the
271 // active background is drawn at |GetThrobValue()|%. This is used for hover, 271 // active background is drawn at |GetThrobValue()|%. This is used for hover,
272 // mini tab title change and pulsing. 272 // mini tab title change and pulsing.
273 double GetThrobValue(); 273 double GetThrobValue();
274 274
275 // Set the temporary offset for the favicon. This is used during the crash 275 // Set the temporary offset for the favicon. This is used during the crash
276 // animation. 276 // animation.
277 void SetFaviconHidingOffset(int offset); 277 void SetFaviconHidingOffset(int offset);
278 278
279 void DisplayCrashedFavicon(); 279 void set_should_display_crashed_favicon() {
280 void ResetCrashedFavicon(); 280 should_display_crashed_favicon_ = true;
281 281 }
282 void StopCrashAnimation();
283 void StartCrashAnimation();
284
285 // Returns true if the crash animation is currently running.
286 bool IsPerformingCrashAnimation() const;
287 282
288 // Recalculates the correct |button_color_| and resets the title, media 283 // Recalculates the correct |button_color_| and resets the title, media
289 // indicator, and close button colors if necessary. This should be called any 284 // indicator, and close button colors if necessary. This should be called any
290 // time the theme or active state may have changed. 285 // time the theme or active state may have changed.
291 void OnButtonColorMaybeChanged(); 286 void OnButtonColorMaybeChanged();
292 287
293 // Schedules repaint task for icon. 288 // Schedules repaint task for icon.
294 void ScheduleIconPaint(); 289 void ScheduleIconPaint();
295 290
296 // Returns the rect that can be used for content inside the tab borders. 291 // Returns the rect that can be used for content inside the tab borders.
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 SkColor button_color_; 399 SkColor button_color_;
405 400
406 // As the majority of the tabs are inactive, and painting tabs is slowish, 401 // As the majority of the tabs are inactive, and painting tabs is slowish,
407 // we cache a handful of the inactive tab backgrounds here. 402 // we cache a handful of the inactive tab backgrounds here.
408 static ImageCache* image_cache_; 403 static ImageCache* image_cache_;
409 404
410 DISALLOW_COPY_AND_ASSIGN(Tab); 405 DISALLOW_COPY_AND_ASSIGN(Tab);
411 }; 406 };
412 407
413 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ 408 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698