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

Unified Diff: views/layer_property_setter.cc

Issue 7972023: Implicit animations through Layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More tweaks Created 9 years, 3 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 | « views/layer_property_setter.h ('k') | views/widget/native_widget_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/layer_property_setter.cc
diff --git a/views/layer_property_setter.cc b/views/layer_property_setter.cc
index 12061f3f3c846e0cc0a03b04f85eded4e4331c90..26f203f727da1a36ed61e28b1c8b7d95f01ec595 100644
--- a/views/layer_property_setter.cc
+++ b/views/layer_property_setter.cc
@@ -7,7 +7,6 @@
#include "base/memory/scoped_ptr.h"
#include "ui/gfx/compositor/compositor.h"
#include "ui/gfx/compositor/layer.h"
-#include "ui/gfx/compositor/layer_animator.h"
namespace views {
@@ -48,48 +47,6 @@ void DefaultSetter::SetBounds(ui::Layer* layer, const gfx::Rect& bounds) {
layer->SetBounds(bounds);
}
-// AnimatingSetter -------------------------------------------------------------
-
-class AnimatingSetter : public LayerPropertySetter {
- public:
- AnimatingSetter();
-
- // LayerPropertySetter:
- virtual void Installed(ui::Layer* layer) OVERRIDE;
- virtual void Uninstalled(ui::Layer* layer) OVERRIDE;
- virtual void SetTransform(ui::Layer* layer,
- const ui::Transform& transform) OVERRIDE;
- virtual void SetBounds(ui::Layer* layer, const gfx::Rect& bounds) OVERRIDE;
-
- private:
- scoped_ptr<ui::LayerAnimator> animator_;
-
- DISALLOW_COPY_AND_ASSIGN(AnimatingSetter);
-};
-
-AnimatingSetter::AnimatingSetter() {
-}
-
-void AnimatingSetter::Installed(ui::Layer* layer) {
- animator_.reset(new ui::LayerAnimator(layer));
-}
-
-void AnimatingSetter::Uninstalled(ui::Layer* layer) {
- animator_.reset();
-}
-
-void AnimatingSetter::SetTransform(ui::Layer* layer,
- const ui::Transform& transform) {
- animator_->AnimateTransform(transform);
-}
-
-void AnimatingSetter::SetBounds(ui::Layer* layer, const gfx::Rect& bounds) {
- if (bounds.size() == animator_->layer()->bounds().size())
- animator_->AnimateToPoint(bounds.origin());
- else
- animator_->StopAnimatingToPoint();
-}
-
} // namespace
// LayerPropertySetter ---------------------------------------------------------
@@ -99,9 +56,4 @@ LayerPropertySetter* LayerPropertySetter::CreateDefaultSetter() {
return new DefaultSetter;
}
-// static
-LayerPropertySetter* LayerPropertySetter::CreateAnimatingSetter() {
- return new AnimatingSetter();
-}
-
} // namespace views
« no previous file with comments | « views/layer_property_setter.h ('k') | views/widget/native_widget_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698