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

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

Issue 2250783002: Allow InkDropRipple to co-exist with highlight (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove EmptyInkDropRipple Created 4 years, 3 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
« no previous file with comments | « ui/views/animation/ink_drop_ripple.h ('k') | ui/views/animation/square_ink_drop_ripple.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_ripple.h" 5 #include "ui/views/animation/ink_drop_ripple.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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 new ui::CallbackLayerAnimationObserver( 77 new ui::CallbackLayerAnimationObserver(
78 base::Bind(&InkDropRipple::AnimationStartedCallback, 78 base::Bind(&InkDropRipple::AnimationStartedCallback,
79 base::Unretained(this), InkDropState::ACTIVATED), 79 base::Unretained(this), InkDropState::ACTIVATED),
80 base::Bind(&InkDropRipple::AnimationEndedCallback, 80 base::Bind(&InkDropRipple::AnimationEndedCallback,
81 base::Unretained(this), InkDropState::ACTIVATED)); 81 base::Unretained(this), InkDropState::ACTIVATED));
82 GetRootLayer()->SetVisible(true); 82 GetRootLayer()->SetVisible(true);
83 target_ink_drop_state_ = InkDropState::ACTIVATED; 83 target_ink_drop_state_ = InkDropState::ACTIVATED;
84 animation_observer->SetActive(); 84 animation_observer->SetActive();
85 } 85 }
86 86
87 bool InkDropRipple::IsVisible() {
88 return GetRootLayer()->visible();
89 }
90
87 void InkDropRipple::HideImmediately() { 91 void InkDropRipple::HideImmediately() {
88 AbortAllAnimations(); 92 AbortAllAnimations();
89 SetStateToHidden(); 93 SetStateToHidden();
90 target_ink_drop_state_ = InkDropState::HIDDEN; 94 target_ink_drop_state_ = InkDropState::HIDDEN;
91 } 95 }
92 96
93 test::InkDropRippleTestApi* InkDropRipple::GetTestApi() { 97 test::InkDropRippleTestApi* InkDropRipple::GetTestApi() {
94 return nullptr; 98 return nullptr;
95 } 99 }
96 100
(...skipping 10 matching lines...) Expand all
107 SetStateToHidden(); 111 SetStateToHidden();
108 observer_->AnimationEnded(ink_drop_state, 112 observer_->AnimationEnded(ink_drop_state,
109 observer.aborted_count() 113 observer.aborted_count()
110 ? InkDropAnimationEndedReason::PRE_EMPTED 114 ? InkDropAnimationEndedReason::PRE_EMPTED
111 : InkDropAnimationEndedReason::SUCCESS); 115 : InkDropAnimationEndedReason::SUCCESS);
112 // |this| may be deleted! 116 // |this| may be deleted!
113 return true; 117 return true;
114 } 118 }
115 119
116 } // namespace views 120 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/animation/ink_drop_ripple.h ('k') | ui/views/animation/square_ink_drop_ripple.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698