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

Unified Diff: ui/views/animation/ink_drop_animation_controller_impl.h

Issue 1757993004: Added ink drop hover/ripple to menu hosting bookmark buttons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed sky@ & varkha@ comments. Created 4 years, 9 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_animation_controller_impl.h
diff --git a/ui/views/animation/ink_drop_animation_controller_impl.h b/ui/views/animation/ink_drop_animation_controller_impl.h
index 92feae614f73748418cb4c1bb35faf36055a70a8..8aaf6bc5ddc96a0632bfed1ed19453403b034c32 100644
--- a/ui/views/animation/ink_drop_animation_controller_impl.h
+++ b/ui/views/animation/ink_drop_animation_controller_impl.h
@@ -37,12 +37,17 @@ class VIEWS_EXPORT InkDropAnimationControllerImpl
InkDropState GetTargetInkDropState() const override;
bool IsVisible() const override;
void AnimateToState(InkDropState ink_drop_state) override;
+ void SnapToActivated() override;
void SetHovered(bool is_hovered) override;
private:
friend class InkDropAnimationControllerFactoryTest;
friend class InkDropAnimationControllerImplTest;
+ // Forcibly transition to the HIDDEN state if completing the current animation
+ // sequence would eventually be HIDDEN.
+ void CompleteHiddenTargetedAnimations();
+
// Creates a new InkDropAnimation and sets it to |ink_drop_animation_|. If
// |ink_drop_animation_| wasn't null then it will be destroyed using
// DestroyInkDropAnimation().
@@ -94,6 +99,10 @@ class VIEWS_EXPORT InkDropAnimationControllerImpl
// The current InkDropHover. Lazily created using CreateInkDropHover();
scoped_ptr<InkDropHover> hover_;
+ // Tracks the logical hovered state of |this| as manipulated by the public
+ // SetHovered() function.
+ bool is_hovered_;
+
// The current InkDropAnimation. Created on demand using
// CreateInkDropAnimation().
scoped_ptr<InkDropAnimation> ink_drop_animation_;
« no previous file with comments | « ui/views/animation/ink_drop_animation_controller_factory.cc ('k') | ui/views/animation/ink_drop_animation_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698