Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2017 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 ASH_ROTATOR_TEST_SCREEN_ROTATION_ANIMATOR_TEST_API_H_ | |
| 6 #define ASH_ROTATOR_TEST_SCREEN_ROTATION_ANIMATOR_TEST_API_H_ | |
| 7 | |
| 8 #include <stdint.h> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #include "ui/compositor/test/multi_layer_animator_test_controller.h" | |
| 12 #include "ui/compositor/test/multi_layer_animator_test_controller_delegate.h" | |
| 13 | |
| 14 namespace ui { | |
| 15 class Layer; | |
| 16 } | |
| 17 | |
| 18 namespace ash { | |
| 19 class ScreenRotationAnimator; | |
| 20 | |
| 21 namespace test { | |
| 22 | |
| 23 // Test API to provide internal access to a ScreenRotationAnimator instance. | |
| 24 // This can also be used to control the screen rotation animations via the | |
| 25 // ui::test::MultiLayerAnimatorTestController API. | |
| 26 class ScreenRotationAnimatorTestApi | |
| 27 : public ui::test::MultiLayerAnimatorTestController, | |
| 28 public ui::test::MultiLayerAnimatorTestControllerDelegate { | |
| 29 public: | |
| 30 explicit ScreenRotationAnimatorTestApi(ScreenRotationAnimator* animator); | |
| 31 ~ScreenRotationAnimatorTestApi() override; | |
| 32 | |
| 33 // Wrapper functions for ScreenRotationAnimator. | |
| 34 ui::Layer* GetOldLayerTreeRootLayer(); | |
| 35 void SetDisableAnimationTimers(bool disable_timers); | |
| 36 | |
| 37 protected: | |
|
oshima
2017/03/16 20:13:10
why protected?
wutao
2017/03/17 00:01:04
Moved to private.
| |
| 38 // MultiLayerAnimatorTestControllerDelegate: | |
| 39 std::vector<ui::LayerAnimator*> GetLayerAnimators() override; | |
| 40 | |
| 41 private: | |
| 42 ScreenRotationAnimator* animator_; | |
| 43 | |
| 44 DISALLOW_COPY_AND_ASSIGN(ScreenRotationAnimatorTestApi); | |
| 45 }; | |
| 46 | |
| 47 } // namespace test | |
| 48 } // namespace ash | |
| 49 | |
| 50 #endif // ASH_ROTATOR_TEST_SCREEN_ROTATION_ANIMATOR_TEST_API_H_ | |
| OLD | NEW |