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