OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "cc/animation/layer_animation_controller.h" | 5 #include "cc/animation/layer_animation_controller.h" |
6 | 6 |
7 #include "cc/animation/animation.h" | 7 #include "cc/animation/animation.h" |
8 #include "cc/animation/animation_curve.h" | 8 #include "cc/animation/animation_curve.h" |
9 #include "cc/animation/animation_delegate.h" | 9 #include "cc/animation/animation_delegate.h" |
10 #include "cc/animation/animation_registrar.h" | 10 #include "cc/animation/animation_registrar.h" |
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
860 } | 860 } |
861 | 861 |
862 class FakeAnimationDelegate : public AnimationDelegate { | 862 class FakeAnimationDelegate : public AnimationDelegate { |
863 public: | 863 public: |
864 FakeAnimationDelegate() | 864 FakeAnimationDelegate() |
865 : started_(false), | 865 : started_(false), |
866 finished_(false) {} | 866 finished_(false) {} |
867 | 867 |
868 virtual void NotifyAnimationStarted( | 868 virtual void NotifyAnimationStarted( |
869 TimeTicks monotonic_time, | 869 TimeTicks monotonic_time, |
870 Animation::TargetProperty target_property) OVERRIDE { | 870 Animation::TargetProperty target_property) override { |
871 started_ = true; | 871 started_ = true; |
872 } | 872 } |
873 | 873 |
874 virtual void NotifyAnimationFinished( | 874 virtual void NotifyAnimationFinished( |
875 TimeTicks monotonic_time, | 875 TimeTicks monotonic_time, |
876 Animation::TargetProperty target_property) OVERRIDE { | 876 Animation::TargetProperty target_property) override { |
877 finished_ = true; | 877 finished_ = true; |
878 } | 878 } |
879 | 879 |
880 bool started() { return started_; } | 880 bool started() { return started_; } |
881 | 881 |
882 bool finished() { return finished_; } | 882 bool finished() { return finished_; } |
883 | 883 |
884 private: | 884 private: |
885 bool started_; | 885 bool started_; |
886 bool finished_; | 886 bool finished_; |
(...skipping 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2254 // been ticked at the new animation's starting point. | 2254 // been ticked at the new animation's starting point. |
2255 EXPECT_EQ(Animation::Running, | 2255 EXPECT_EQ(Animation::Running, |
2256 controller_impl->GetAnimation(second_animation_group_id, | 2256 controller_impl->GetAnimation(second_animation_group_id, |
2257 Animation::Opacity)->run_state()); | 2257 Animation::Opacity)->run_state()); |
2258 EXPECT_EQ(1.f, pending_dummy_impl.opacity()); | 2258 EXPECT_EQ(1.f, pending_dummy_impl.opacity()); |
2259 EXPECT_EQ(1.f, dummy_impl.opacity()); | 2259 EXPECT_EQ(1.f, dummy_impl.opacity()); |
2260 } | 2260 } |
2261 | 2261 |
2262 } // namespace | 2262 } // namespace |
2263 } // namespace cc | 2263 } // namespace cc |
OLD | NEW |