| 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_FLOOD_FILL_INK_DROP_ANIMATION_TEST_API_H_ | |
| 6 #define UI_VIEWS_ANIMATION_TEST_FLOOD_FILL_INK_DROP_ANIMATION_TEST_API_H_ | |
| 7 | |
| 8 #include <vector> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #include "ui/gfx/geometry/size.h" | |
| 12 #include "ui/views/animation/flood_fill_ink_drop_animation.h" | |
| 13 #include "ui/views/animation/test/ink_drop_animation_test_api.h" | |
| 14 | |
| 15 namespace ui { | |
| 16 class LayerAnimator; | |
| 17 } // namespace ui | |
| 18 | |
| 19 namespace views { | |
| 20 namespace test { | |
| 21 | |
| 22 // Test API to provide internal access to a FloodFillInkDropAnimation. | |
| 23 class FloodFillInkDropAnimationTestApi : public InkDropAnimationTestApi { | |
| 24 public: | |
| 25 explicit FloodFillInkDropAnimationTestApi( | |
| 26 FloodFillInkDropAnimation* ink_drop_animation); | |
| 27 ~FloodFillInkDropAnimationTestApi() override; | |
| 28 | |
| 29 // Wrapper functions to the wrapped InkDropAnimation: | |
| 30 gfx::Transform CalculateTransform(float target_radius) const; | |
| 31 | |
| 32 // InkDropAnimationTestApi: | |
| 33 float GetCurrentOpacity() const override; | |
| 34 | |
| 35 protected: | |
| 36 // InkDropAnimationTestApi: | |
| 37 std::vector<ui::LayerAnimator*> GetLayerAnimators() override; | |
| 38 | |
| 39 private: | |
| 40 FloodFillInkDropAnimation* ink_drop_animation() { | |
| 41 return static_cast<const FloodFillInkDropAnimationTestApi*>(this) | |
| 42 ->ink_drop_animation(); | |
| 43 } | |
| 44 | |
| 45 FloodFillInkDropAnimation* ink_drop_animation() const { | |
| 46 return static_cast<FloodFillInkDropAnimation*>( | |
| 47 InkDropAnimationTestApi::ink_drop_animation()); | |
| 48 } | |
| 49 | |
| 50 DISALLOW_COPY_AND_ASSIGN(FloodFillInkDropAnimationTestApi); | |
| 51 }; | |
| 52 | |
| 53 } // namespace test | |
| 54 } // namespace views | |
| 55 | |
| 56 #endif // UI_VIEWS_ANIMATION_TEST_FLOOD_FILL_INK_DROP_ANIMATION_TEST_API_H_ | |
| OLD | NEW |