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

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

Issue 2034963002: Rename InkDropHover to InkDropHighlight (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: relative patchset Created 4 years, 7 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.h
diff --git a/ui/views/animation/ink_drop_impl.h b/ui/views/animation/ink_drop_impl.h
index e9b2640f363a320b2bfdf8b7212e448fd8d79e65..2cb9fdf97b5997bd7ee86cdb42cf338fd5e707a1 100644
--- a/ui/views/animation/ink_drop_impl.h
+++ b/ui/views/animation/ink_drop_impl.h
@@ -11,7 +11,7 @@
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
#include "ui/views/animation/ink_drop.h"
-#include "ui/views/animation/ink_drop_hover_observer.h"
+#include "ui/views/animation/ink_drop_highlight_observer.h"
#include "ui/views/animation/ink_drop_ripple_observer.h"
#include "ui/views/views_export.h"
@@ -26,13 +26,13 @@ class InkDropImplTestApi;
class InkDropRipple;
class InkDropHost;
-class InkDropHover;
+class InkDropHighlight;
class InkDropFactoryTest;
// A functional implementation of an InkDrop.
class VIEWS_EXPORT InkDropImpl : public InkDrop,
public InkDropRippleObserver,
- public InkDropHoverObserver {
+ public InkDropHighlightObserver {
public:
// Constructs an ink drop that will attach the ink drop to the given
// |ink_drop_host|.
@@ -61,38 +61,41 @@ class VIEWS_EXPORT InkDropImpl : public InkDrop,
// Destroys the current |ink_drop_ripple_|.
void DestroyInkDropRipple();
- // Creates a new InkDropHover and sets it to |hover_|. If |hover_| wasn't null
- // then it will be destroyed using DestroyInkDropHover().
- void CreateInkDropHover();
+ // Creates a new InkDropHighlight and assigns it to |highlight_|. If
+ // |highlight_| wasn't null then it will be destroyed using
+ // DestroyInkDropHighlight().
+ void CreateInkDropHighlight();
- // Destroys the current |hover_|.
- void DestroyInkDropHover();
+ // Destroys the current |highlight_|.
+ void DestroyInkDropHighlight();
// Adds the |root_layer_| to the |ink_drop_host_| if it hasn't already been
// added.
void AddRootLayerToHostIfNeeded();
// Removes the |root_layer_| from the |ink_drop_host_| if no ink drop ripple
- // or hover is active.
+ // or highlight is active.
void RemoveRootLayerFromHostIfNeeded();
- // Returns true if the hover animation is in the process of fading in or
+ // Returns true if the highlight animation is in the process of fading in or
// is visible.
- bool IsHoverFadingInOrVisible() const;
+ bool IsHighlightFadingInOrVisible() const;
// views::InkDropRippleObserver:
void AnimationStarted(InkDropState ink_drop_state) override;
void AnimationEnded(InkDropState ink_drop_state,
InkDropAnimationEndedReason reason) override;
- // views::InkDropHoverObserver:
- void AnimationStarted(InkDropHover::AnimationType animation_type) override;
- void AnimationEnded(InkDropHover::AnimationType animation_type,
+ // views::InkDropHighlightObserver:
+ void AnimationStarted(
+ InkDropHighlight::AnimationType animation_type) override;
+ void AnimationEnded(InkDropHighlight::AnimationType animation_type,
InkDropAnimationEndedReason reason) override;
- // Enables or disables the hover state based on |should_highlight| and if an
+ // Enables or disables the highlight state based on |should_highlight| and if
+ // an
bruthig 2016/06/03 02:50:46 Join lines 96/97.
Evan Stade 2016/06/03 03:01:41 Done.
// animation is triggered it will be scheduled to have the given
- // |animation_duration|. If |explode| is true the hover will expand as it
+ // |animation_duration|. If |explode| is true the highlight will expand as it
// fades out. |explode| is ignored when |should_higlight| is true.
void SetHighlight(bool should_highlight,
base::TimeDelta animation_duration,
@@ -101,30 +104,32 @@ class VIEWS_EXPORT InkDropImpl : public InkDrop,
// Returns true if this ink drop is hovered or focused.
bool ShouldHighlight() const;
- // Starts the |hover_after_ripple_timer_| timer. This will stop the current
- // |hover_after_ripple_timer_| instance if it exists.
- void StartHoverAfterRippleTimer();
+ // Starts the |highlight_after_ripple_timer_| timer. This will stop the
+ // current
+ // |highlight_after_ripple_timer_| instance if it exists.
+ void StartHighlightAfterRippleTimer();
- // Stops and destroys the current |hover_after_ripple_timer_| instance.
- void StopHoverAfterRippleTimer();
+ // Stops and destroys the current |highlight_after_ripple_timer_| instance.
+ void StopHighlightAfterRippleTimer();
- // Callback for when the |hover_after_ripple_timer_| fires.
- void HoverAfterRippleTimerFired();
+ // Callback for when the |highlight_after_ripple_timer_| fires.
+ void HighlightAfterRippleTimerFired();
// The host of the ink drop. Used to poll for information such as whether the
- // hover should be shown or not.
+ // highlight should be shown or not.
InkDropHost* ink_drop_host_;
- // The root Layer that parents the InkDropRipple layers and the InkDropHover
- // layers. The |root_layer_| is the one that is added and removed from the
- // InkDropHost.
+ // The root Layer that parents the InkDropRipple layers and the
+ // InkDropHighlight layers. The |root_layer_| is the one that is added and
+ // removed from the InkDropHost.
std::unique_ptr<ui::Layer> root_layer_;
// True when the |root_layer_| has been added to the |ink_drop_host_|.
bool root_layer_added_to_host_;
- // The current InkDropHover. Lazily created using CreateInkDropHover();
- std::unique_ptr<InkDropHover> hover_;
+ // The current InkDropHighlight. Lazily created using
+ // CreateInkDropHighlight();
+ std::unique_ptr<InkDropHighlight> highlight_;
// Tracks the logical hovered state of |this| as manipulated by the public
// SetHovered() function.
@@ -137,9 +142,9 @@ class VIEWS_EXPORT InkDropImpl : public InkDrop,
// The current InkDropRipple. Created on demand using CreateInkDropRipple().
std::unique_ptr<InkDropRipple> ink_drop_ripple_;
- // The timer used to delay the hover fade in after an ink drop ripple
+ // The timer used to delay the highlight fade in after an ink drop ripple
// animation.
- std::unique_ptr<base::Timer> hover_after_ripple_timer_;
+ std::unique_ptr<base::Timer> highlight_after_ripple_timer_;
DISALLOW_COPY_AND_ASSIGN(InkDropImpl);
};

Powered by Google App Engine
This is Rietveld 408576698