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 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
852 event = GetMostRecentPropertyUpdateEvent(events.get()); | 852 event = GetMostRecentPropertyUpdateEvent(events.get()); |
853 EXPECT_FALSE(event); | 853 EXPECT_FALSE(event); |
854 } | 854 } |
855 | 855 |
856 class FakeAnimationDelegate : public AnimationDelegate { | 856 class FakeAnimationDelegate : public AnimationDelegate { |
857 public: | 857 public: |
858 FakeAnimationDelegate() | 858 FakeAnimationDelegate() |
859 : started_(false), | 859 : started_(false), |
860 finished_(false) {} | 860 finished_(false) {} |
861 | 861 |
862 virtual void NotifyAnimationStarted(TimeTicks monotonic_time, | 862 void NotifyAnimationStarted(TimeTicks monotonic_time, |
863 Animation::TargetProperty target_property, | 863 Animation::TargetProperty target_property, |
864 int group) override { | 864 int group) override { |
865 started_ = true; | 865 started_ = true; |
866 } | 866 } |
867 | 867 |
868 virtual void NotifyAnimationFinished( | 868 void NotifyAnimationFinished(TimeTicks monotonic_time, |
869 TimeTicks monotonic_time, | 869 Animation::TargetProperty target_property, |
870 Animation::TargetProperty target_property, | 870 int group) override { |
871 int group) override { | |
872 finished_ = true; | 871 finished_ = true; |
873 } | 872 } |
874 | 873 |
875 bool started() { return started_; } | 874 bool started() { return started_; } |
876 | 875 |
877 bool finished() { return finished_; } | 876 bool finished() { return finished_; } |
878 | 877 |
879 private: | 878 private: |
880 bool started_; | 879 bool started_; |
881 bool finished_; | 880 bool finished_; |
(...skipping 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2340 EXPECT_FALSE(controller->IsAnimatingProperty(Animation::Opacity)); | 2339 EXPECT_FALSE(controller->IsAnimatingProperty(Animation::Opacity)); |
2341 EXPECT_FALSE(controller->IsAnimatingProperty(Animation::Filter)); | 2340 EXPECT_FALSE(controller->IsAnimatingProperty(Animation::Filter)); |
2342 | 2341 |
2343 controller->Animate(kInitialTickTime + TimeDelta::FromMilliseconds(2000)); | 2342 controller->Animate(kInitialTickTime + TimeDelta::FromMilliseconds(2000)); |
2344 controller->UpdateState(true, nullptr); | 2343 controller->UpdateState(true, nullptr); |
2345 EXPECT_TRUE(controller->IsAnimatingProperty(Animation::Opacity)); | 2344 EXPECT_TRUE(controller->IsAnimatingProperty(Animation::Opacity)); |
2346 } | 2345 } |
2347 | 2346 |
2348 } // namespace | 2347 } // namespace |
2349 } // namespace cc | 2348 } // namespace cc |
OLD | NEW |