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_IMPL_TEST_API_H_ | 5 #ifndef UI_VIEWS_ANIMATION_TEST_INK_DROP_IMPL_TEST_API_H_ |
6 #define UI_VIEWS_ANIMATION_TEST_INK_DROP_IMPL_TEST_API_H_ | 6 #define UI_VIEWS_ANIMATION_TEST_INK_DROP_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 InkDropImpl; | 19 class InkDropImpl; |
20 class InkDropHover; | 20 class InkDropHighlight; |
21 | 21 |
22 namespace test { | 22 namespace test { |
23 | 23 |
24 // Test API to provide internal access to an InkDropImpl instance. This can also | 24 // Test API to provide internal access to an InkDropImpl instance. This can also |
25 // be used to control the InkDropRipple and InkDropHover animations via the | 25 // be used to control the InkDropRipple and InkDropHighlight animations via the |
26 // ui::test::MultiLayerAnimatorTestController API. | 26 // ui::test::MultiLayerAnimatorTestController API. |
27 class InkDropImplTestApi | 27 class InkDropImplTestApi |
28 : public ui::test::MultiLayerAnimatorTestController, | 28 : public ui::test::MultiLayerAnimatorTestController, |
29 public ui::test::MultiLayerAnimatorTestControllerDelegate { | 29 public ui::test::MultiLayerAnimatorTestControllerDelegate { |
30 public: | 30 public: |
31 explicit InkDropImplTestApi(InkDropImpl* ink_drop); | 31 explicit InkDropImplTestApi(InkDropImpl* ink_drop); |
32 ~InkDropImplTestApi() override; | 32 ~InkDropImplTestApi() override; |
33 | 33 |
34 // Wrappers to InkDropImpl internals: | 34 // Wrappers to InkDropImpl internals: |
35 const InkDropHover* hover() const; | 35 const InkDropHighlight* highlight() const; |
36 bool IsHoverFadingInOrVisible() const; | 36 bool IsHighlightFadingInOrVisible() const; |
37 | 37 |
38 protected: | 38 protected: |
39 // MultiLayerAnimatorTestControllerDelegate: | 39 // MultiLayerAnimatorTestControllerDelegate: |
40 std::vector<ui::LayerAnimator*> GetLayerAnimators() override; | 40 std::vector<ui::LayerAnimator*> GetLayerAnimators() override; |
41 | 41 |
42 private: | 42 private: |
43 // The InkDrop to provide internal access to. | 43 // The InkDrop to provide internal access to. |
44 InkDropImpl* ink_drop_; | 44 InkDropImpl* ink_drop_; |
45 | 45 |
46 DISALLOW_COPY_AND_ASSIGN(InkDropImplTestApi); | 46 DISALLOW_COPY_AND_ASSIGN(InkDropImplTestApi); |
47 }; | 47 }; |
48 | 48 |
49 } // namespace test | 49 } // namespace test |
50 } // namespace views | 50 } // namespace views |
51 | 51 |
52 #endif // UI_VIEWS_ANIMATION_TEST_INK_DROP_IMPL_TEST_API_H_ | 52 #endif // UI_VIEWS_ANIMATION_TEST_INK_DROP_IMPL_TEST_API_H_ |
OLD | NEW |