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 /views | |
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 'views')
-rw-r--r-- | views/animation/bounds_animator.cc | 2 | ||||
-rw-r--r-- | views/controls/button/custom_button.cc | 2 | ||||
-rw-r--r-- | views/controls/button/image_button.cc | 2 | ||||
-rw-r--r-- | views/controls/button/text_button.cc | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/views/animation/bounds_animator.cc b/views/animation/bounds_animator.cc index 40cae9c..6a16af5 100644 --- a/views/animation/bounds_animator.cc +++ b/views/animation/bounds_animator.cc @@ -126,7 +126,7 @@ SlideAnimation* BoundsAnimator::CreateAnimation() { SlideAnimation* animation = new SlideAnimation(this); animation->SetContainer(container_.get()); animation->SetSlideDuration(kAnimationDuration); - animation->SetTweenType(SlideAnimation::EASE_OUT); + animation->SetTweenType(Tween::EASE_OUT); return animation; } diff --git a/views/controls/button/custom_button.cc b/views/controls/button/custom_button.cc index ffa5a46..534c8a4 100644 --- a/views/controls/button/custom_button.cc +++ b/views/controls/button/custom_button.cc @@ -20,7 +20,7 @@ CustomButton::~CustomButton() { void CustomButton::SetState(ButtonState state) { if (state != state_) { - if (animate_on_state_change_ || !hover_animation_->IsAnimating()) { + if (animate_on_state_change_ || !hover_animation_->is_animating()) { animate_on_state_change_ = true; if (state_ == BS_NORMAL && state == BS_HOT) { // Button is hovered from a normal state, start hover animation. diff --git a/views/controls/button/image_button.cc b/views/controls/button/image_button.cc index 245942a..0565fae 100644 --- a/views/controls/button/image_button.cc +++ b/views/controls/button/image_button.cc @@ -93,7 +93,7 @@ void ImageButton::Paint(gfx::Canvas* canvas) { SkBitmap ImageButton::GetImageToPaint() { SkBitmap img; - if (!images_[BS_HOT].isNull() && hover_animation_->IsAnimating()) { + if (!images_[BS_HOT].isNull() && hover_animation_->is_animating()) { img = SkBitmapOperations::CreateBlendedBitmap(images_[BS_NORMAL], images_[BS_HOT], hover_animation_->GetCurrentValue()); } else { diff --git a/views/controls/button/text_button.cc b/views/controls/button/text_button.cc index 6435be1..40d4d68 100644 --- a/views/controls/button/text_button.cc +++ b/views/controls/button/text_button.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// 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. @@ -241,7 +241,7 @@ void TextButton::Paint(gfx::Canvas* canvas, bool for_drag) { if (!for_drag) { PaintBackground(canvas); - if (show_highlighted_ && hover_animation_->IsAnimating()) { + if (show_highlighted_ && hover_animation_->is_animating()) { // Draw the hover bitmap into an offscreen buffer, then blend it // back into the current canvas. canvas->saveLayerAlpha(NULL, |