diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-05 03:43:55 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-05 03:43:55 +0000 |
commit | 4ce7e15da651c6221720e33dc8c500830d4b6b8a (patch) | |
tree | 376ef1d7e7951dae3376e65f4edee9e7367adc89 /chrome/browser/gtk/tabs/tab_renderer_gtk.cc | |
parent | 5ee3ca64cdf2d00f82a1bc36f36e8ab5e520b4de (diff) | |
download | chromium_src-4ce7e15da651c6221720e33dc8c500830d4b6b8a.zip chromium_src-4ce7e15da651c6221720e33dc8c500830d4b6b8a.tar.gz chromium_src-4ce7e15da651c6221720e33dc8c500830d4b6b8a.tar.bz2 |
Refactors animation to allow for cleaner subclassing. I'm doing this
for creating a different animation subclass (which you'll see
shortly).
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/1961001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46433 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/tabs/tab_renderer_gtk.cc')
-rw-r--r-- | chrome/browser/gtk/tabs/tab_renderer_gtk.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc index 20307d3..c8a0e6b 100644 --- a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc +++ b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc @@ -200,11 +200,11 @@ void TabRendererGtk::LoadingAnimation::Observe( // FaviconCrashAnimation // // A custom animation subclass to manage the favicon crash animation. -class TabRendererGtk::FavIconCrashAnimation : public Animation, +class TabRendererGtk::FavIconCrashAnimation : public LinearAnimation, public AnimationDelegate { public: explicit FavIconCrashAnimation(TabRendererGtk* target) - : ALLOW_THIS_IN_INITIALIZER_LIST(Animation(1000, 25, this)), + : ALLOW_THIS_IN_INITIALIZER_LIST(LinearAnimation(1000, 25, this)), target_(target) { } virtual ~FavIconCrashAnimation() {} @@ -501,7 +501,7 @@ void TabRendererGtk::StartMiniTabTitleAnimation() { mini_title_animation_->SetThrobDuration(kMiniTitleChangeThrobDuration); } - if (!mini_title_animation_->IsAnimating()) { + if (!mini_title_animation_->is_animating()) { mini_title_animation_->StartThrobbing(2); } else if (mini_title_animation_->cycles_remaining() <= 2) { // The title changed while we're already animating. Add at most one more @@ -575,7 +575,7 @@ void TabRendererGtk::StopCrashAnimation() { } bool TabRendererGtk::IsPerformingCrashAnimation() const { - return crash_animation_.get() && crash_animation_->IsAnimating(); + return crash_animation_.get() && crash_animation_->is_animating(); } void TabRendererGtk::SetFavIconHidingOffset(int offset) { @@ -986,7 +986,7 @@ CustomDrawButton* TabRendererGtk::MakeCloseButton() { } double TabRendererGtk::GetThrobValue() { - if (mini_title_animation_.get() && mini_title_animation_->IsAnimating()) { + if (mini_title_animation_.get() && mini_title_animation_->is_animating()) { return mini_title_animation_->GetCurrentValue() * kMiniTitleChangeThrobOpacity; } @@ -1045,7 +1045,7 @@ void TabRendererGtk::OnSizeAllocate(GtkWidget* widget, gboolean TabRendererGtk::OnEnterNotifyEvent(GtkWidget* widget, GdkEventCrossing* event, TabRendererGtk* tab) { - tab->hover_animation_->SetTweenType(SlideAnimation::EASE_OUT); + tab->hover_animation_->SetTweenType(Tween::EASE_OUT); tab->hover_animation_->Show(); return FALSE; } @@ -1054,7 +1054,7 @@ gboolean TabRendererGtk::OnEnterNotifyEvent(GtkWidget* widget, gboolean TabRendererGtk::OnLeaveNotifyEvent(GtkWidget* widget, GdkEventCrossing* event, TabRendererGtk* tab) { - tab->hover_animation_->SetTweenType(SlideAnimation::EASE_IN); + tab->hover_animation_->SetTweenType(Tween::EASE_IN); tab->hover_animation_->Hide(); return FALSE; } |