OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/compositor/layer_animator.h" | 5 #include "ui/compositor/layer_animator.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 LayerAnimationSequence* sequence) OVERRIDE { | 105 LayerAnimationSequence* sequence) OVERRIDE { |
106 animator_->StopAnimating(); | 106 animator_->StopAnimating(); |
107 } | 107 } |
108 | 108 |
109 virtual void OnLayerAnimationScheduled( | 109 virtual void OnLayerAnimationScheduled( |
110 LayerAnimationSequence* sequence) OVERRIDE { | 110 LayerAnimationSequence* sequence) OVERRIDE { |
111 } | 111 } |
112 | 112 |
113 private: | 113 private: |
114 LayerAnimator* animator_; | 114 LayerAnimator* animator_; |
115 LayerAnimationSequence* sequence_; | |
116 | 115 |
117 DISALLOW_COPY_AND_ASSIGN(DeletingLayerAnimationObserver); | 116 DISALLOW_COPY_AND_ASSIGN(DeletingLayerAnimationObserver); |
118 }; | 117 }; |
119 | 118 |
120 class TestLayerAnimator : public LayerAnimator { | 119 class TestLayerAnimator : public LayerAnimator { |
121 public: | 120 public: |
122 TestLayerAnimator() : LayerAnimator(base::TimeDelta::FromSeconds(0)) {} | 121 TestLayerAnimator() : LayerAnimator(base::TimeDelta::FromSeconds(0)) {} |
123 | 122 |
124 protected: | 123 protected: |
125 virtual ~TestLayerAnimator() {} | 124 virtual ~TestLayerAnimator() {} |
(...skipping 2244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2370 | 2369 |
2371 settings.SetPreemptionStrategy( | 2370 settings.SetPreemptionStrategy( |
2372 LayerAnimator::ENQUEUE_NEW_ANIMATION); | 2371 LayerAnimator::ENQUEUE_NEW_ANIMATION); |
2373 settings.SetTransitionDuration(base::TimeDelta()); | 2372 settings.SetTransitionDuration(base::TimeDelta()); |
2374 animator->SetOpacity(magic_opacity); | 2373 animator->SetOpacity(magic_opacity); |
2375 | 2374 |
2376 EXPECT_EQ(start_opacity, delegate.GetOpacityForAnimation()); | 2375 EXPECT_EQ(start_opacity, delegate.GetOpacityForAnimation()); |
2377 } | 2376 } |
2378 | 2377 |
2379 } // namespace ui | 2378 } // namespace ui |
OLD | NEW |