| 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 #include "ui/views/animation/test/ink_drop_animation_controller_impl_test_api.h" | |
| 6 | |
| 7 #include "ui/views/animation/ink_drop_animation_controller_impl.h" | |
| 8 #include "ui/views/animation/ink_drop_hover.h" | |
| 9 #include "ui/views/animation/ink_drop_ripple.h" | |
| 10 #include "ui/views/animation/test/ink_drop_hover_test_api.h" | |
| 11 #include "ui/views/animation/test/ink_drop_ripple_test_api.h" | |
| 12 | |
| 13 namespace views { | |
| 14 namespace test { | |
| 15 | |
| 16 InkDropAnimationControllerImplTestApi::InkDropAnimationControllerImplTestApi( | |
| 17 InkDropAnimationControllerImpl* ink_drop_controller) | |
| 18 : ui::test::MultiLayerAnimatorTestController(this), | |
| 19 ink_drop_controller_(ink_drop_controller) {} | |
| 20 | |
| 21 InkDropAnimationControllerImplTestApi:: | |
| 22 ~InkDropAnimationControllerImplTestApi() {} | |
| 23 | |
| 24 const InkDropHover* InkDropAnimationControllerImplTestApi::hover() const { | |
| 25 return ink_drop_controller_->hover_.get(); | |
| 26 } | |
| 27 | |
| 28 bool InkDropAnimationControllerImplTestApi::IsHoverFadingInOrVisible() const { | |
| 29 return ink_drop_controller_->IsHoverFadingInOrVisible(); | |
| 30 } | |
| 31 | |
| 32 std::vector<ui::LayerAnimator*> | |
| 33 InkDropAnimationControllerImplTestApi::GetLayerAnimators() { | |
| 34 std::vector<ui::LayerAnimator*> animators; | |
| 35 | |
| 36 if (ink_drop_controller_->hover_) { | |
| 37 InkDropHoverTestApi* ink_drop_hover_test_api = | |
| 38 ink_drop_controller_->hover_->GetTestApi(); | |
| 39 std::vector<ui::LayerAnimator*> ink_drop_hover_animators = | |
| 40 ink_drop_hover_test_api->GetLayerAnimators(); | |
| 41 animators.insert(animators.end(), ink_drop_hover_animators.begin(), | |
| 42 ink_drop_hover_animators.end()); | |
| 43 } | |
| 44 | |
| 45 if (ink_drop_controller_->ink_drop_ripple_) { | |
| 46 InkDropRippleTestApi* ink_drop_ripple_test_api = | |
| 47 ink_drop_controller_->ink_drop_ripple_->GetTestApi(); | |
| 48 std::vector<ui::LayerAnimator*> ink_drop_ripple_animators = | |
| 49 ink_drop_ripple_test_api->GetLayerAnimators(); | |
| 50 animators.insert(animators.end(), ink_drop_ripple_animators.begin(), | |
| 51 ink_drop_ripple_animators.end()); | |
| 52 } | |
| 53 | |
| 54 return animators; | |
| 55 } | |
| 56 | |
| 57 } // namespace test | |
| 58 } // namespace views | |
| OLD | NEW |