| 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/test_ink_drop_animation_observer.h" | |
| 6 | |
| 7 #include "ui/views/animation/ink_drop_animation.h" | |
| 8 | |
| 9 namespace views { | |
| 10 namespace test { | |
| 11 | |
| 12 TestInkDropAnimationObserver::TestInkDropAnimationObserver() | |
| 13 : target_state_at_last_animation_started_(InkDropState::HIDDEN), | |
| 14 target_state_at_last_animation_ended_(InkDropState::HIDDEN) {} | |
| 15 | |
| 16 TestInkDropAnimationObserver::~TestInkDropAnimationObserver() {} | |
| 17 | |
| 18 void TestInkDropAnimationObserver::AnimationStarted( | |
| 19 InkDropState ink_drop_state) { | |
| 20 ObserverHelper::OnAnimationStarted(ink_drop_state); | |
| 21 if (ink_drop_animation_) { | |
| 22 target_state_at_last_animation_started_ = | |
| 23 ink_drop_animation_->target_ink_drop_state(); | |
| 24 } | |
| 25 } | |
| 26 | |
| 27 void TestInkDropAnimationObserver::AnimationEnded( | |
| 28 InkDropState ink_drop_state, | |
| 29 InkDropAnimationEndedReason reason) { | |
| 30 ObserverHelper::OnAnimationEnded(ink_drop_state, reason); | |
| 31 if (ink_drop_animation_) { | |
| 32 target_state_at_last_animation_ended_ = | |
| 33 ink_drop_animation_->target_ink_drop_state(); | |
| 34 } | |
| 35 } | |
| 36 | |
| 37 } // namespace test | |
| 38 } // namespace views | |
| OLD | NEW |