summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/tabs/tab_renderer_gtk.h
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-18 23:40:54 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-18 23:40:54 +0000
commitd9b46d768e64c24beb0497902e47b2a9d4a54af7 (patch)
tree315ad2dd05dd0168c9fcae9b692a3a071c72fdc7 /chrome/browser/gtk/tabs/tab_renderer_gtk.h
parent3c0b93897f5745a0c18f751938a536a931d10234 (diff)
downloadchromium_src-d9b46d768e64c24beb0497902e47b2a9d4a54af7.zip
chromium_src-d9b46d768e64c24beb0497902e47b2a9d4a54af7.tar.gz
chromium_src-d9b46d768e64c24beb0497902e47b2a9d4a54af7.tar.bz2
Implement the sad tab crash animation for tabs in linux.
BUG=11615 Review URL: http://codereview.chromium.org/115489 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16342 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/tabs/tab_renderer_gtk.h')
-rw-r--r--chrome/browser/gtk/tabs/tab_renderer_gtk.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/chrome/browser/gtk/tabs/tab_renderer_gtk.h b/chrome/browser/gtk/tabs/tab_renderer_gtk.h
index c449a02..f93681d 100644
--- a/chrome/browser/gtk/tabs/tab_renderer_gtk.h
+++ b/chrome/browser/gtk/tabs/tab_renderer_gtk.h
@@ -145,6 +145,8 @@ class TabRendererGtk : public AnimationDelegate {
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 @@ class TabRendererGtk : public AnimationDelegate {
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 @@ class TabRendererGtk : public AnimationDelegate {
// 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_;