OLD | NEW |
| (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_VIEWS_ANIMATION_TEST_INK_DROP_HOVER_TEST_API_H_ | |
6 #define UI_VIEWS_ANIMATION_TEST_INK_DROP_HOVER_TEST_API_H_ | |
7 | |
8 #include <vector> | |
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 LayerAnimator; | |
16 } // namespace ui | |
17 | |
18 namespace views { | |
19 class InkDropHover; | |
20 | |
21 namespace test { | |
22 | |
23 // Test API to provide internal access to an InkDropHover instance. This can | |
24 // also be used to control the animations via the | |
25 // ui::test::MultiLayerAnimatorTestController API. | |
26 class InkDropHoverTestApi | |
27 : public ui::test::MultiLayerAnimatorTestController, | |
28 public ui::test::MultiLayerAnimatorTestControllerDelegate { | |
29 public: | |
30 explicit InkDropHoverTestApi(InkDropHover* ink_drop_hover); | |
31 ~InkDropHoverTestApi() override; | |
32 | |
33 // MultiLayerAnimatorTestControllerDelegate: | |
34 std::vector<ui::LayerAnimator*> GetLayerAnimators() override; | |
35 | |
36 protected: | |
37 InkDropHover* ink_drop_hover() { | |
38 return static_cast<const InkDropHoverTestApi*>(this)->ink_drop_hover(); | |
39 } | |
40 | |
41 InkDropHover* ink_drop_hover() const { return ink_drop_hover_; } | |
42 | |
43 private: | |
44 // The InkDropHover to provide internal access to. | |
45 InkDropHover* ink_drop_hover_; | |
46 | |
47 DISALLOW_COPY_AND_ASSIGN(InkDropHoverTestApi); | |
48 }; | |
49 | |
50 } // namespace test | |
51 } // namespace views | |
52 | |
53 #endif // UI_VIEWS_ANIMATION_TEST_INK_DROP_HOVER_TEST_API_H_ | |
OLD | NEW |