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

Unified Diff: chrome/browser/ui/views/tabs/base_tab.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/tabs/base_tab.h ('k') | chrome/browser/ui/views/tabs/base_tab_strip.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/base_tab.cc
===================================================================
--- chrome/browser/ui/views/tabs/base_tab.cc (revision 70685)
+++ chrome/browser/ui/views/tabs/base_tab.cc (working copy)
@@ -8,9 +8,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
-#include "app/slide_animation.h"
#include "app/theme_provider.h"
-#include "app/throb_animation.h"
#include "base/command_line.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/tab_contents/tab_contents.h"
@@ -24,6 +22,8 @@
#include "grit/app_resources.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
+#include "ui/base/animation/slide_animation.h"
+#include "ui/base/animation/throb_animation.h"
#include "views/controls/button/image_button.h"
// How long the pulse throb takes.
@@ -81,16 +81,16 @@
// FaviconCrashAnimation
//
// A custom animation subclass to manage the favicon crash animation.
-class BaseTab::FavIconCrashAnimation : public LinearAnimation,
- public AnimationDelegate {
+class BaseTab::FavIconCrashAnimation : public ui::LinearAnimation,
+ public ui::AnimationDelegate {
public:
explicit FavIconCrashAnimation(BaseTab* target)
- : ALLOW_THIS_IN_INITIALIZER_LIST(LinearAnimation(1000, 25, this)),
+ : ALLOW_THIS_IN_INITIALIZER_LIST(ui::LinearAnimation(1000, 25, this)),
target_(target) {
}
virtual ~FavIconCrashAnimation() {}
- // Animation overrides:
+ // ui::Animation overrides:
virtual void AnimateToState(double state) {
const double kHidingOffset = 27;
@@ -105,8 +105,8 @@
}
}
- // AnimationDelegate overrides:
- virtual void AnimationCanceled(const Animation* animation) {
+ // ui::AnimationDelegate overrides:
+ virtual void AnimationCanceled(const ui::Animation* animation) {
target_->SetFavIconHidingOffset(0);
}
@@ -197,7 +197,7 @@
void BaseTab::StartPulse() {
if (!pulse_animation_.get()) {
- pulse_animation_.reset(new ThrobAnimation(this));
+ pulse_animation_.reset(new ui::ThrobAnimation(this));
pulse_animation_->SetSlideDuration(kPulseDurationMs);
if (animation_container_.get())
pulse_animation_->SetContainer(animation_container_.get());
@@ -224,16 +224,16 @@
void BaseTab::OnMouseEntered(const views::MouseEvent& e) {
if (!hover_animation_.get()) {
- hover_animation_.reset(new SlideAnimation(this));
+ hover_animation_.reset(new ui::SlideAnimation(this));
hover_animation_->SetContainer(animation_container_.get());
hover_animation_->SetSlideDuration(kHoverDurationMs);
}
- hover_animation_->SetTweenType(Tween::EASE_OUT);
+ hover_animation_->SetTweenType(ui::Tween::EASE_OUT);
hover_animation_->Show();
}
void BaseTab::OnMouseExited(const views::MouseEvent& e) {
- hover_animation_->SetTweenType(Tween::EASE_IN);
+ hover_animation_->SetTweenType(ui::Tween::EASE_IN);
hover_animation_->Hide();
}
@@ -411,15 +411,15 @@
title_bounds().width(), title_bounds().height());
}
-void BaseTab::AnimationProgressed(const Animation* animation) {
+void BaseTab::AnimationProgressed(const ui::Animation* animation) {
SchedulePaint();
}
-void BaseTab::AnimationCanceled(const Animation* animation) {
+void BaseTab::AnimationCanceled(const ui::Animation* animation) {
SchedulePaint();
}
-void BaseTab::AnimationEnded(const Animation* animation) {
+void BaseTab::AnimationEnded(const ui::Animation* animation) {
SchedulePaint();
}
« no previous file with comments | « chrome/browser/ui/views/tabs/base_tab.h ('k') | chrome/browser/ui/views/tabs/base_tab_strip.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698