From 4ce7e15da651c6221720e33dc8c500830d4b6b8a Mon Sep 17 00:00:00 2001 From: "sky@chromium.org" Date: Wed, 5 May 2010 03:43:55 +0000 Subject: 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 --- chrome/browser/chromeos/panels/panel_scroller.cc | 10 ++-------- chrome/browser/chromeos/panels/panel_scroller.h | 4 +--- 2 files changed, 3 insertions(+), 11 deletions(-) (limited to 'chrome/browser/chromeos/panels') diff --git a/chrome/browser/chromeos/panels/panel_scroller.cc b/chrome/browser/chromeos/panels/panel_scroller.cc index ec681f3..daaa3fc 100644 --- a/chrome/browser/chromeos/panels/panel_scroller.cc +++ b/chrome/browser/chromeos/panels/panel_scroller.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this +// Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. @@ -26,7 +26,7 @@ PanelScroller::PanelScroller() ALLOW_THIS_IN_INITIALIZER_LIST(animation_(this)), animated_scroll_begin_(0), animated_scroll_end_(0) { - animation_.SetTweenType(SlideAnimation::EASE_IN_OUT); + animation_.SetTweenType(Tween::EASE_IN_OUT); animation_.SetSlideDuration(300); Panel* panel = new Panel; @@ -237,9 +237,6 @@ void PanelScroller::ScrollToPanel(int index) { animation_.Show(); } -void PanelScroller::AnimationEnded(const Animation* animation) { -} - void PanelScroller::AnimationProgressed(const Animation* animation) { scroll_pos_ = static_cast( static_cast(animated_scroll_end_ - animated_scroll_begin_) * @@ -248,6 +245,3 @@ void PanelScroller::AnimationProgressed(const Animation* animation) { Layout(); SchedulePaint(); } - -void PanelScroller::AnimationCanceled(const Animation* animation) { -} diff --git a/chrome/browser/chromeos/panels/panel_scroller.h b/chrome/browser/chromeos/panels/panel_scroller.h index a3db3db..51eedff 100644 --- a/chrome/browser/chromeos/panels/panel_scroller.h +++ b/chrome/browser/chromeos/panels/panel_scroller.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this +// Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. @@ -38,9 +38,7 @@ class PanelScroller : public views::View, public AnimationDelegate { struct Panel; // AnimationDelegate overrides. - virtual void AnimationEnded(const Animation* animation); virtual void AnimationProgressed(const Animation* animation); - virtual void AnimationCanceled(const Animation* animation); // Scrolls to the panel at the given index. It will be moved to the top. void ScrollToPanel(int index); -- cgit v1.1