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 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
759 event = GetMostRecentPropertyUpdateEvent(events.get()); | 759 event = GetMostRecentPropertyUpdateEvent(events.get()); |
760 EXPECT_FALSE(event); | 760 EXPECT_FALSE(event); |
761 } | 761 } |
762 | 762 |
763 class FakeAnimationDelegate : public AnimationDelegate { | 763 class FakeAnimationDelegate : public AnimationDelegate { |
764 public: | 764 public: |
765 FakeAnimationDelegate() | 765 FakeAnimationDelegate() |
766 : started_(false), | 766 : started_(false), |
767 finished_(false) {} | 767 finished_(false) {} |
768 | 768 |
769 virtual void NotifyAnimationStarted(double time) OVERRIDE { | 769 virtual void NotifyAnimationStarted( |
| 770 double wall_clock_time, |
| 771 base::TimeTicks monotonic_time, |
| 772 Animation::TargetProperty target_property) OVERRIDE { |
770 started_ = true; | 773 started_ = true; |
771 } | 774 } |
772 | 775 |
773 virtual void NotifyAnimationFinished(double time) OVERRIDE { | 776 virtual void NotifyAnimationFinished( |
| 777 double wall_clock_time, |
| 778 base::TimeTicks monotonic_time, |
| 779 Animation::TargetProperty target_property) OVERRIDE { |
774 finished_ = true; | 780 finished_ = true; |
775 } | 781 } |
776 | 782 |
777 bool started() { return started_; } | 783 bool started() { return started_; } |
778 | 784 |
779 bool finished() { return finished_; } | 785 bool finished() { return finished_; } |
780 | 786 |
781 private: | 787 private: |
782 bool started_; | 788 bool started_; |
783 bool finished_; | 789 bool finished_; |
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1673 // animation, and an Aborted event for the opacity animation. | 1679 // animation, and an Aborted event for the opacity animation. |
1674 EXPECT_EQ(2u, events->size()); | 1680 EXPECT_EQ(2u, events->size()); |
1675 EXPECT_EQ(AnimationEvent::Finished, (*events)[0].type); | 1681 EXPECT_EQ(AnimationEvent::Finished, (*events)[0].type); |
1676 EXPECT_EQ(Animation::Transform, (*events)[0].target_property); | 1682 EXPECT_EQ(Animation::Transform, (*events)[0].target_property); |
1677 EXPECT_EQ(AnimationEvent::Aborted, (*events)[1].type); | 1683 EXPECT_EQ(AnimationEvent::Aborted, (*events)[1].type); |
1678 EXPECT_EQ(Animation::Opacity, (*events)[1].target_property); | 1684 EXPECT_EQ(Animation::Opacity, (*events)[1].target_property); |
1679 } | 1685 } |
1680 | 1686 |
1681 } // namespace | 1687 } // namespace |
1682 } // namespace cc | 1688 } // namespace cc |
OLD | NEW |