| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef UI_VIEWS_ANIMATION_TEST_INK_DROP_ANIMATION_CONTROLLER_IMPL_TEST_API_H_ | 5 #ifndef UI_VIEWS_ANIMATION_TEST_INK_DROP_ANIMATION_CONTROLLER_IMPL_TEST_API_H_ |
| 6 #define UI_VIEWS_ANIMATION_TEST_INK_DROP_ANIMATION_CONTROLLER_IMPL_TEST_API_H_ | 6 #define UI_VIEWS_ANIMATION_TEST_INK_DROP_ANIMATION_CONTROLLER_IMPL_TEST_API_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "ui/compositor/test/multi_layer_animator_test_controller.h" | 11 #include "ui/compositor/test/multi_layer_animator_test_controller.h" |
| 12 #include "ui/compositor/test/multi_layer_animator_test_controller_delegate.h" | 12 #include "ui/compositor/test/multi_layer_animator_test_controller_delegate.h" |
| 13 | 13 |
| 14 namespace ui { | 14 namespace ui { |
| 15 class LayerAnimator; | 15 class LayerAnimator; |
| 16 } // namespace ui | 16 } // namespace ui |
| 17 | 17 |
| 18 namespace views { | 18 namespace views { |
| 19 class InkDropAnimationControllerImpl; | 19 class InkDropAnimationControllerImpl; |
| 20 class InkDropHover; | 20 class InkDropHover; |
| 21 | 21 |
| 22 namespace test { | 22 namespace test { |
| 23 | 23 |
| 24 // Test API to provide internal access to an InkDropAnimationControllerImpl | 24 // Test API to provide internal access to an InkDropAnimationControllerImpl |
| 25 // instance. This can also be used to control the InkDropAnimation and | 25 // instance. This can also be used to control the InkDropRipple and |
| 26 // InkDropHover animations via the ui::test::MultiLayerAnimatorTestController | 26 // InkDropHover animations via the ui::test::MultiLayerAnimatorTestController |
| 27 // API. | 27 // API. |
| 28 class InkDropAnimationControllerImplTestApi | 28 class InkDropAnimationControllerImplTestApi |
| 29 : public ui::test::MultiLayerAnimatorTestController, | 29 : public ui::test::MultiLayerAnimatorTestController, |
| 30 public ui::test::MultiLayerAnimatorTestControllerDelegate { | 30 public ui::test::MultiLayerAnimatorTestControllerDelegate { |
| 31 public: | 31 public: |
| 32 explicit InkDropAnimationControllerImplTestApi( | 32 explicit InkDropAnimationControllerImplTestApi( |
| 33 InkDropAnimationControllerImpl* ink_drop_controller_); | 33 InkDropAnimationControllerImpl* ink_drop_controller_); |
| 34 ~InkDropAnimationControllerImplTestApi() override; | 34 ~InkDropAnimationControllerImplTestApi() override; |
| 35 | 35 |
| 36 // Wrappers to InkDropAnimationControllerImpl internals: | 36 // Wrappers to InkDropAnimationControllerImpl internals: |
| 37 const InkDropHover* hover() const; | 37 const InkDropHover* hover() const; |
| 38 bool IsHoverFadingInOrVisible() const; | 38 bool IsHoverFadingInOrVisible() const; |
| 39 | 39 |
| 40 protected: | 40 protected: |
| 41 // MultiLayerAnimatorTestControllerDelegate: | 41 // MultiLayerAnimatorTestControllerDelegate: |
| 42 std::vector<ui::LayerAnimator*> GetLayerAnimators() override; | 42 std::vector<ui::LayerAnimator*> GetLayerAnimators() override; |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 // The InkDropedAnimation to provide internal access to. | 45 // The InkDropAnimationController to provide internal access to. |
| 46 InkDropAnimationControllerImpl* ink_drop_controller_; | 46 InkDropAnimationControllerImpl* ink_drop_controller_; |
| 47 | 47 |
| 48 DISALLOW_COPY_AND_ASSIGN(InkDropAnimationControllerImplTestApi); | 48 DISALLOW_COPY_AND_ASSIGN(InkDropAnimationControllerImplTestApi); |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 } // namespace test | 51 } // namespace test |
| 52 } // namespace views | 52 } // namespace views |
| 53 | 53 |
| 54 #endif // UI_VIEWS_ANIMATION_TEST_INK_DROP_ANIMATION_CONTROLLER_IMPL_TEST_API_H
_ | 54 #endif // UI_VIEWS_ANIMATION_TEST_INK_DROP_ANIMATION_CONTROLLER_IMPL_TEST_API_H
_ |
| OLD | NEW |