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

Unified Diff: chrome/browser/gtk/tabs/tab_renderer_gtk.h

Issue 115489: Implement the sad tab crash animation for tabs in linux. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/gtk/tabs/tab_renderer_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/tabs/tab_renderer_gtk.h
===================================================================
--- chrome/browser/gtk/tabs/tab_renderer_gtk.h (revision 16331)
+++ chrome/browser/gtk/tabs/tab_renderer_gtk.h (working copy)
@@ -145,6 +145,8 @@
void OnMouseExited();
private:
+ class FavIconCrashAnimation;
+
// Model data. We store this here so that we don't need to ask the underlying
// model, which is tricky since instances of this object can outlive the
// corresponding objects in the underlying model.
@@ -172,6 +174,19 @@
virtual void AnimationCanceled(const Animation* animation);
virtual void AnimationEnded(const Animation* animation);
+ // Starts/Stops the crash animation.
+ void StartCrashAnimation();
+ void StopCrashAnimation();
+
+ // Return true if the crash animation is currently running.
+ bool IsPerformingCrashAnimation() const;
+
+ // Set the temporary offset for the favicon. This is used during animation.
+ void SetFavIconHidingOffset(int offset);
+
+ void DisplayCrashedFavIcon();
+ void ResetCrashedFavIcon();
+
// Generates the bounds for the interior items of the tab.
void Layout();
@@ -242,6 +257,9 @@
// The offset used to animate the favicon location.
int fav_icon_hiding_offset_;
+ // The animation object used to swap the favicon with the sad tab icon.
+ scoped_ptr<FavIconCrashAnimation> crash_animation_;
+
// Set when the crashed favicon should be displayed.
bool should_display_crashed_favicon_;
« no previous file with comments | « no previous file | chrome/browser/gtk/tabs/tab_renderer_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698