Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: ui/views/animation/ink_drop_animation.cc

Issue 1896953003: Added a views::test::TestInkDropAnimationObserverHelper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed build issue and nit. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/ink_drop_animation.h" 5 #include "ui/views/animation/ink_drop_animation.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "ui/base/ui_base_switches.h" 10 #include "ui/base/ui_base_switches.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 void InkDropAnimation::HideImmediately() { 88 void InkDropAnimation::HideImmediately() {
89 AbortAllAnimations(); 89 AbortAllAnimations();
90 SetStateToHidden(); 90 SetStateToHidden();
91 target_ink_drop_state_ = InkDropState::HIDDEN; 91 target_ink_drop_state_ = InkDropState::HIDDEN;
92 } 92 }
93 93
94 void InkDropAnimation::AnimationStartedCallback( 94 void InkDropAnimation::AnimationStartedCallback(
95 InkDropState ink_drop_state, 95 InkDropState ink_drop_state,
96 const ui::CallbackLayerAnimationObserver& observer) { 96 const ui::CallbackLayerAnimationObserver& observer) {
97 observer_->InkDropAnimationStarted(ink_drop_state); 97 observer_->AnimationStarted(ink_drop_state);
98 } 98 }
99 99
100 bool InkDropAnimation::AnimationEndedCallback( 100 bool InkDropAnimation::AnimationEndedCallback(
101 InkDropState ink_drop_state, 101 InkDropState ink_drop_state,
102 const ui::CallbackLayerAnimationObserver& observer) { 102 const ui::CallbackLayerAnimationObserver& observer) {
103 if (ink_drop_state == InkDropState::HIDDEN) 103 if (ink_drop_state == InkDropState::HIDDEN)
104 SetStateToHidden(); 104 SetStateToHidden();
105 observer_->InkDropAnimationEnded(ink_drop_state, 105 observer_->AnimationEnded(ink_drop_state,
106 observer.aborted_count() 106 observer.aborted_count()
107 ? InkDropAnimationObserver::PRE_EMPTED 107 ? InkDropAnimationEndedReason::PRE_EMPTED
108 : InkDropAnimationObserver::SUCCESS); 108 : InkDropAnimationEndedReason::SUCCESS);
109 // |this| may be deleted! 109 // |this| may be deleted!
110 return true; 110 return true;
111 } 111 }
112 112
113 } // namespace views 113 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/animation/ink_drop_animation.h ('k') | ui/views/animation/ink_drop_animation_controller_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698