summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/browser_actions_container.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-05 03:43:55 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-05 03:43:55 +0000
commit4ce7e15da651c6221720e33dc8c500830d4b6b8a (patch)
tree376ef1d7e7951dae3376e65f4edee9e7367adc89 /chrome/browser/views/browser_actions_container.cc
parent5ee3ca64cdf2d00f82a1bc36f36e8ab5e520b4de (diff)
downloadchromium_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/views/browser_actions_container.cc')
-rw-r--r--chrome/browser/views/browser_actions_container.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/chrome/browser/views/browser_actions_container.cc b/chrome/browser/views/browser_actions_container.cc
index c74e333..f4132bb 100644
--- a/chrome/browser/views/browser_actions_container.cc
+++ b/chrome/browser/views/browser_actions_container.cc
@@ -952,7 +952,7 @@ void BrowserActionsContainer::BrowserActionAdded(Extension* extension,
// in the header for why we do this.
suppress_chevron_ = !chevron_->IsVisible();
- Animate(SlideAnimation::NONE, target_size);
+ Animate(Tween::LINEAR, target_size);
}
}
@@ -990,7 +990,7 @@ void BrowserActionsContainer::BrowserActionRemoved(Extension* extension) {
int target_size =
ClampToNearestIconCount(IconCountToWidth(visible_actions), true);
- Animate(SlideAnimation::EASE_OUT, target_size);
+ Animate(Tween::EASE_OUT, target_size);
return;
}
}
@@ -1048,8 +1048,7 @@ int BrowserActionsContainer::ContainerMinSize() const {
return resize_gripper_->width() + chevron_->width() + kChevronRightMargin;
}
-void BrowserActionsContainer::Animate(
- SlideAnimation::TweenType tween_type, int target_size) {
+void BrowserActionsContainer::Animate(Tween::Type tween_type, int target_size) {
if (!disable_animations_during_testing_) {
// Animate! We have to set the animation_target_size_ after calling Reset(),
// because that could end up calling AnimationEnded which clears the value.
@@ -1093,7 +1092,7 @@ void BrowserActionsContainer::OnResize(int resize_amount, bool done_resizing) {
container_size_.set_width(new_width);
animation_target_size_ = ClampToNearestIconCount(new_width, true);
resize_animation_->Reset();
- resize_animation_->SetTweenType(SlideAnimation::EASE_OUT);
+ resize_animation_->SetTweenType(Tween::EASE_OUT);
resize_animation_->Show();
}
}