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

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

Issue 6154001: Move animation code to new ui/base/animation directory.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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/ui/views/browser_actions_container.h ('k') | chrome/browser/ui/views/download_item_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/browser_actions_container.cc
===================================================================
--- chrome/browser/ui/views/browser_actions_container.cc (revision 70685)
+++ chrome/browser/ui/views/browser_actions_container.cc (working copy)
@@ -6,7 +6,6 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
-#include "app/slide_animation.h"
#include "base/stl_util-inl.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
@@ -38,6 +37,7 @@
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkTypeface.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
+#include "ui/base/animation/slide_animation.h"
#include "views/controls/button/menu_button.h"
#include "views/controls/button/text_button.h"
#include "views/controls/menu/menu_2.h"
@@ -366,7 +366,7 @@
model_->AddObserver(this);
}
- resize_animation_.reset(new SlideAnimation(this));
+ resize_animation_.reset(new ui::SlideAnimation(this));
resize_area_ = new views::ResizeArea(this);
resize_area_->SetAccessibleName(
UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_SEPARATOR)));
@@ -799,18 +799,19 @@
int max_width = IconCountToWidth(-1, false);
container_width_ =
std::min(std::max(0, container_width_ - resize_amount), max_width);
- SaveDesiredSizeAndAnimate(Tween::EASE_OUT,
+ SaveDesiredSizeAndAnimate(ui::Tween::EASE_OUT,
WidthToIconCount(container_width_));
}
-void BrowserActionsContainer::AnimationProgressed(const Animation* animation) {
+void BrowserActionsContainer::AnimationProgressed(
+ const ui::Animation* animation) {
DCHECK_EQ(resize_animation_.get(), animation);
resize_amount_ = static_cast<int>(resize_animation_->GetCurrentValue() *
(container_width_ - animation_target_size_));
OnBrowserActionVisibilityChanged();
}
-void BrowserActionsContainer::AnimationEnded(const Animation* animation) {
+void BrowserActionsContainer::AnimationEnded(const ui::Animation* animation) {
container_width_ = animation_target_size_;
animation_target_size_ = 0;
resize_amount_ = 0;
@@ -920,7 +921,7 @@
if ((model_->GetVisibleIconCount() < 0) &&
!profile_->GetExtensionService()->IsBeingUpgraded(extension)) {
suppress_chevron_ = true;
- SaveDesiredSizeAndAnimate(Tween::LINEAR, visible_actions + 1);
+ SaveDesiredSizeAndAnimate(ui::Tween::LINEAR, visible_actions + 1);
} else {
// Just redraw the (possibly modified) visible icon set.
OnBrowserActionVisibilityChanged();
@@ -956,7 +957,7 @@
// Either we went from overflow to no-overflow, or we shrunk the no-
// overflow container by 1. Either way the size changed, so animate.
chevron_->SetVisible(false);
- SaveDesiredSizeAndAnimate(Tween::EASE_OUT,
+ SaveDesiredSizeAndAnimate(ui::Tween::EASE_OUT,
browser_action_views_.size());
}
return;
@@ -1068,7 +1069,7 @@
}
void BrowserActionsContainer::SaveDesiredSizeAndAnimate(
- Tween::Type tween_type,
+ ui::Tween::Type tween_type,
size_t num_visible_icons) {
// Save off the desired number of visible icons. We do this now instead of at
// the end of the animation so that even if the browser is shut down while
« no previous file with comments | « chrome/browser/ui/views/browser_actions_container.h ('k') | chrome/browser/ui/views/download_item_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698