| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_COMPOSITOR_TEST_MULTI_LAYER_ANIMATOR_TEST_CONTROLLER_H_ |
| 6 #define UI_COMPOSITOR_TEST_MULTI_LAYER_ANIMATOR_TEST_CONTROLLER_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "base/time/time.h" |
| 12 |
| 13 namespace ui { |
| 14 class LayerAnimator; |
| 15 |
| 16 namespace test { |
| 17 class MultiLayerAnimatorTestControllerDelegate; |
| 18 |
| 19 // Test API class to control multiple LayerAnimators. |
| 20 class MultiLayerAnimatorTestController { |
| 21 public: |
| 22 explicit MultiLayerAnimatorTestController( |
| 23 MultiLayerAnimatorTestControllerDelegate* delegate); |
| 24 virtual ~MultiLayerAnimatorTestController(); |
| 25 |
| 26 // Disables the animation timers when |disable_timers| is true. |
| 27 void SetDisableAnimationTimers(bool disable_timers); |
| 28 |
| 29 // Returns true if any animations are active. |
| 30 bool HasActiveAnimations() const; |
| 31 |
| 32 // Completes all running animations. |
| 33 void CompleteAnimations(); |
| 34 |
| 35 private: |
| 36 // Get a list of all the LayerAnimator's used. Delegates to |delegate_|. |
| 37 std::vector<LayerAnimator*> GetLayerAnimators(); |
| 38 std::vector<LayerAnimator*> GetLayerAnimators() const; |
| 39 |
| 40 // Progresses all running LayerAnimationSequences by the given |duration|. |
| 41 // |
| 42 // NOTE: This function will NOT progress LayerAnimationSequences that are |
| 43 // queued, only the running ones will be progressed. |
| 44 void StepAnimations(const base::TimeDelta& duration); |
| 45 |
| 46 MultiLayerAnimatorTestControllerDelegate* delegate_; |
| 47 |
| 48 DISALLOW_COPY_AND_ASSIGN(MultiLayerAnimatorTestController); |
| 49 }; |
| 50 |
| 51 } // namespace test |
| 52 } // namespace ui |
| 53 |
| 54 #endif // UI_COMPOSITOR_TEST_MULTI_LAYER_ANIMATOR_TEST_CONTROLLER_H_ |
| OLD | NEW |