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/chromeos/panels | |
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/chromeos/panels')
-rw-r--r-- | chrome/browser/chromeos/panels/panel_scroller.cc | 10 | ||||
-rw-r--r-- | chrome/browser/chromeos/panels/panel_scroller.h | 4 |
2 files changed, 3 insertions, 11 deletions
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<int>( static_cast<double>(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); |