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

Unified Diff: ui/views/animation/ink_drop_impl.cc

Issue 2720183002: [Views] Update ink drop for omnibox icons (Closed)
Patch Set: Removed the mask Created 3 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/animation/ink_drop_impl.cc
diff --git a/ui/views/animation/ink_drop_impl.cc b/ui/views/animation/ink_drop_impl.cc
index d5a4d8a3ec5e54a7b6f6ffb1a79c1dc4698792da..c0744356736748ca4eeffb7fa8f0cca069ebfc2c 100644
--- a/ui/views/animation/ink_drop_impl.cc
+++ b/ui/views/animation/ink_drop_impl.cc
@@ -10,6 +10,7 @@
#include "ui/compositor/layer.h"
#include "ui/views/animation/ink_drop_highlight.h"
#include "ui/views/animation/ink_drop_host.h"
+#include "ui/views/animation/ink_drop_observer.h"
#include "ui/views/animation/square_ink_drop_ripple.h"
namespace views {
@@ -667,6 +668,10 @@ void InkDropImpl::SetFocused(bool is_focused) {
highlight_state_->OnFocusChanged();
}
+bool InkDropImpl::IsHighlightFadingInOrVisible() const {
+ return highlight_ && highlight_->IsFadingInOrVisible();
+}
+
void InkDropImpl::DestroyHiddenTargetedAnimations() {
if (ink_drop_ripple_ &&
(ink_drop_ripple_->target_ink_drop_state() == InkDropState::HIDDEN ||
@@ -733,15 +738,13 @@ void InkDropImpl::RemoveRootLayerFromHostIfNeeded() {
}
}
-bool InkDropImpl::IsHighlightFadingInOrVisible() const {
- return highlight_ && highlight_->IsFadingInOrVisible();
-}
-
// -----------------------------------------------------------------------------
// views::InkDropRippleObserver:
void InkDropImpl::AnimationStarted(InkDropState ink_drop_state) {
highlight_state_->AnimationStarted(ink_drop_state);
+ for (InkDropObserver& observer : *observers())
bruthig 2017/04/21 15:05:10 nit: Consider adding an InkDrop::NotifyInkDropAnim
spqchan 2017/04/27 21:40:06 Done.
+ observer.InkDropAnimationStarted();
}
void InkDropImpl::AnimationEnded(InkDropState ink_drop_state,
@@ -766,7 +769,10 @@ void InkDropImpl::AnimationEnded(InkDropState ink_drop_state,
// views::InkDropHighlightObserver:
void InkDropImpl::AnimationStarted(
- InkDropHighlight::AnimationType animation_type) {}
+ InkDropHighlight::AnimationType animation_type) {
+ for (InkDropObserver& observer : *observers())
+ observer.InkDropAnimationStarted();
+}
void InkDropImpl::AnimationEnded(InkDropHighlight::AnimationType animation_type,
InkDropAnimationEndedReason reason) {

Powered by Google App Engine
This is Rietveld 408576698