Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(408)

Side by Side Diff: ui/compositor/test/multi_layer_animator_test_controller.h

Issue 1900283002: Added ui::test::MultiLayerAnimatorTestController and Delegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated gn build. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW
« no previous file with comments | « ui/compositor/compositor.gyp ('k') | ui/compositor/test/multi_layer_animator_test_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698