| 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 #include "ui/views/animation/test/ink_drop_impl_test_api.h" | 5 #include "ui/views/animation/test/ink_drop_impl_test_api.h" |
| 6 | 6 |
| 7 #include "ui/views/animation/ink_drop_highlight.h" | 7 #include "ui/views/animation/ink_drop_highlight.h" |
| 8 #include "ui/views/animation/ink_drop_impl.h" | 8 #include "ui/views/animation/ink_drop_impl.h" |
| 9 #include "ui/views/animation/ink_drop_ripple.h" | 9 #include "ui/views/animation/ink_drop_ripple.h" |
| 10 #include "ui/views/animation/test/ink_drop_highlight_test_api.h" | 10 #include "ui/views/animation/test/ink_drop_highlight_test_api.h" |
| 11 #include "ui/views/animation/test/ink_drop_ripple_test_api.h" | 11 #include "ui/views/animation/test/ink_drop_ripple_test_api.h" |
| 12 | 12 |
| 13 namespace views { | 13 namespace views { |
| 14 namespace test { | 14 namespace test { |
| 15 | 15 |
| 16 InkDropImplTestApi::InkDropImplTestApi(InkDropImpl* ink_drop) | 16 InkDropImplTestApi::InkDropImplTestApi(InkDropImpl* ink_drop) |
| 17 : ui::test::MultiLayerAnimatorTestController(this), ink_drop_(ink_drop) {} | 17 : ui::test::MultiLayerAnimatorTestController(this), ink_drop_(ink_drop) {} |
| 18 | 18 |
| 19 InkDropImplTestApi::~InkDropImplTestApi() {} | 19 InkDropImplTestApi::~InkDropImplTestApi() {} |
| 20 | 20 |
| 21 const InkDropHighlight* InkDropImplTestApi::highlight() const { | 21 const InkDropHighlight* InkDropImplTestApi::highlight() const { |
| 22 return ink_drop_->highlight_.get(); | 22 return ink_drop_->highlight_.get(); |
| 23 } | 23 } |
| 24 | 24 |
| 25 const InkDropRipple* InkDropImplTestApi::ripple() const { |
| 26 return ink_drop_->ink_drop_ripple_.get(); |
| 27 } |
| 28 |
| 25 bool InkDropImplTestApi::IsHighlightFadingInOrVisible() const { | 29 bool InkDropImplTestApi::IsHighlightFadingInOrVisible() const { |
| 26 return ink_drop_->IsHighlightFadingInOrVisible(); | 30 return ink_drop_->IsHighlightFadingInOrVisible(); |
| 27 } | 31 } |
| 28 | 32 |
| 29 std::vector<ui::LayerAnimator*> InkDropImplTestApi::GetLayerAnimators() { | 33 std::vector<ui::LayerAnimator*> InkDropImplTestApi::GetLayerAnimators() { |
| 30 std::vector<ui::LayerAnimator*> animators; | 34 std::vector<ui::LayerAnimator*> animators; |
| 31 | 35 |
| 32 if (ink_drop_->highlight_) { | 36 if (ink_drop_->highlight_) { |
| 33 InkDropHighlightTestApi* ink_drop_highlight_test_api = | 37 InkDropHighlightTestApi* ink_drop_highlight_test_api = |
| 34 ink_drop_->highlight_->GetTestApi(); | 38 ink_drop_->highlight_->GetTestApi(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 45 ink_drop_ripple_test_api->GetLayerAnimators(); | 49 ink_drop_ripple_test_api->GetLayerAnimators(); |
| 46 animators.insert(animators.end(), ink_drop_ripple_animators.begin(), | 50 animators.insert(animators.end(), ink_drop_ripple_animators.begin(), |
| 47 ink_drop_ripple_animators.end()); | 51 ink_drop_ripple_animators.end()); |
| 48 } | 52 } |
| 49 | 53 |
| 50 return animators; | 54 return animators; |
| 51 } | 55 } |
| 52 | 56 |
| 53 } // namespace test | 57 } // namespace test |
| 54 } // namespace views | 58 } // namespace views |
| OLD | NEW |