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

Unified Diff: chrome/browser/gtk/tabs/tab_strip_gtk.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
Index: chrome/browser/gtk/tabs/tab_strip_gtk.cc
===================================================================
--- chrome/browser/gtk/tabs/tab_strip_gtk.cc (revision 70685)
+++ chrome/browser/gtk/tabs/tab_strip_gtk.cc (working copy)
@@ -6,10 +6,8 @@
#include <algorithm>
-#include "app/animation_delegate.h"
#include "app/gtk_dnd_util.h"
#include "app/resource_bundle.h"
-#include "app/slide_animation.h"
#include "base/i18n/rtl.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
@@ -34,6 +32,8 @@
#include "gfx/point.h"
#include "grit/app_resources.h"
#include "grit/theme_resources.h"
+#include "ui/base/animation/animation_delegate.h"
+#include "ui/base/animation/slide_animation.h"
namespace {
@@ -107,7 +107,7 @@
//
// A base class for all TabStrip animations.
//
-class TabStripGtk::TabAnimation : public AnimationDelegate {
+class TabStripGtk::TabAnimation : public ui::AnimationDelegate {
public:
friend class TabStripGtk;
@@ -137,7 +137,7 @@
void Start() {
animation_.SetSlideDuration(GetDuration());
- animation_.SetTweenType(Tween::EASE_OUT);
+ animation_.SetTweenType(ui::Tween::EASE_OUT);
if (!animation_.IsShowing()) {
animation_.Reset();
animation_.Show();
@@ -176,17 +176,17 @@
return tab_width;
}
- // Overridden from AnimationDelegate:
- virtual void AnimationProgressed(const Animation* animation) {
+ // Overridden from ui::AnimationDelegate:
+ virtual void AnimationProgressed(const ui::Animation* animation) {
tabstrip_->AnimationLayout(end_unselected_width_);
}
- virtual void AnimationEnded(const Animation* animation) {
+ virtual void AnimationEnded(const ui::Animation* animation) {
tabstrip_->FinishAnimation(this, layout_on_completion_);
// This object is destroyed now, so we can't do anything else after this.
}
- virtual void AnimationCanceled(const Animation* animation) {
+ virtual void AnimationCanceled(const ui::Animation* animation) {
AnimationEnded(animation);
}
@@ -234,7 +234,7 @@
}
TabStripGtk* tabstrip_;
- SlideAnimation animation_;
+ ui::SlideAnimation animation_;
double start_selected_width_;
double start_unselected_width_;
@@ -388,7 +388,7 @@
return start_unselected_width_ + (delta * animation_.GetCurrentValue());
}
- virtual void AnimationEnded(const Animation* animation) {
+ virtual void AnimationEnded(const ui::Animation* animation) {
tabstrip_->RemoveTabAt(index_);
TabStripGtk::TabAnimation::AnimationEnded(animation);
}
@@ -418,8 +418,8 @@
}
virtual ~MoveTabAnimation() {}
- // Overridden from AnimationDelegate:
- virtual void AnimationProgressed(const Animation* animation) {
+ // Overridden from ui::AnimationDelegate:
+ virtual void AnimationProgressed(const ui::Animation* animation) {
// Position Tab A
double distance = start_tab_b_bounds_.x() - start_tab_a_bounds_.x();
double delta = distance * animation_.GetCurrentValue();
@@ -469,8 +469,8 @@
}
virtual ~ResizeLayoutAnimation() {}
- // Overridden from AnimationDelegate:
- virtual void AnimationEnded(const Animation* animation) {
+ // Overridden from ui::AnimationDelegate:
+ virtual void AnimationEnded(const ui::Animation* animation) {
tabstrip_->needs_resize_layout_ = false;
TabStripGtk::TabAnimation::AnimationEnded(animation);
}
@@ -603,8 +603,8 @@
tab_->set_animating_mini_change(true);
}
- // Overridden from AnimationDelegate:
- virtual void AnimationProgressed(const Animation* animation) {
+ // Overridden from ui::AnimationDelegate:
+ virtual void AnimationProgressed(const ui::Animation* animation) {
// Do the normal layout.
TabAnimation::AnimationProgressed(animation);
@@ -618,7 +618,7 @@
tabstrip_->SetTabBounds(tab_, tab_bounds);
}
- virtual void AnimationEnded(const Animation* animation) {
+ virtual void AnimationEnded(const ui::Animation* animation) {
tabstrip_->needs_resize_layout_ = false;
TabStripGtk::TabAnimation::AnimationEnded(animation);
}
« no previous file with comments | « chrome/browser/gtk/tabs/tab_renderer_gtk.cc ('k') | chrome/browser/gtk/translate/translate_infobar_base_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698