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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/test/multi_layer_animator_test_controller.h
diff --git a/ui/compositor/test/multi_layer_animator_test_controller.h b/ui/compositor/test/multi_layer_animator_test_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..d12c11c763adc27a850fd65a1b5e8ee86528b4eb
--- /dev/null
+++ b/ui/compositor/test/multi_layer_animator_test_controller.h
@@ -0,0 +1,54 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_COMPOSITOR_TEST_MULTI_LAYER_ANIMATOR_TEST_CONTROLLER_H_
+#define UI_COMPOSITOR_TEST_MULTI_LAYER_ANIMATOR_TEST_CONTROLLER_H_
+
+#include <vector>
+
+#include "base/macros.h"
+#include "base/time/time.h"
+
+namespace ui {
+class LayerAnimator;
+
+namespace test {
+class MultiLayerAnimatorTestControllerDelegate;
+
+// Test API class to control multiple LayerAnimators.
+class MultiLayerAnimatorTestController {
+ public:
+ explicit MultiLayerAnimatorTestController(
+ MultiLayerAnimatorTestControllerDelegate* delegate);
+ virtual ~MultiLayerAnimatorTestController();
+
+ // Disables the animation timers when |disable_timers| is true.
+ void SetDisableAnimationTimers(bool disable_timers);
+
+ // Returns true if any animations are active.
+ bool HasActiveAnimations() const;
+
+ // Completes all running animations.
+ void CompleteAnimations();
+
+ private:
+ // Get a list of all the LayerAnimator's used. Delegates to |delegate_|.
+ std::vector<LayerAnimator*> GetLayerAnimators();
+ std::vector<LayerAnimator*> GetLayerAnimators() const;
+
+ // Progresses all running LayerAnimationSequences by the given |duration|.
+ //
+ // NOTE: This function will NOT progress LayerAnimationSequences that are
+ // queued, only the running ones will be progressed.
+ void StepAnimations(const base::TimeDelta& duration);
+
+ MultiLayerAnimatorTestControllerDelegate* delegate_;
+
+ DISALLOW_COPY_AND_ASSIGN(MultiLayerAnimatorTestController);
+};
+
+} // namespace test
+} // namespace ui
+
+#endif // UI_COMPOSITOR_TEST_MULTI_LAYER_ANIMATOR_TEST_CONTROLLER_H_
« 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