Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5885)

Unified Diff: chrome/browser/views/browser_actions_container.cc

Issue 1961001: Refactors animation to allow for cleaner subclassing. I'm doing this (Closed)
Patch Set: Incorporated review feedback Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/browser_actions_container.h ('k') | chrome/browser/views/download_item_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/browser_actions_container.cc
diff --git a/chrome/browser/views/browser_actions_container.cc b/chrome/browser/views/browser_actions_container.cc
index c74e33315de865b2174be135e2173a6c37e35e8b..f4132bb7d879d6cb97afb90318a760dcb63f7962 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();
}
}
« no previous file with comments | « chrome/browser/views/browser_actions_container.h ('k') | chrome/browser/views/download_item_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698