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

Unified Diff: ui/views/controls/slider.h

Issue 2335513002: Adding ripple effect for clicks on MD slider (Closed)
Patch Set: address comments 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/controls/slider.h
diff --git a/ui/views/controls/slider.h b/ui/views/controls/slider.h
index e90da3a4ab1ae20426f114e9c184a7dbd6d6bef5..961f96ddcf4032348405ba166d35e8bb6eab3b05 100644
--- a/ui/views/controls/slider.h
+++ b/ui/views/controls/slider.h
@@ -77,11 +77,20 @@ class VIEWS_EXPORT Slider : public View, public gfx::AnimationDelegate {
// Returns the current position of the thumb on the slider.
float GetAnimatingValue() const;
+ // Shows or hides the highlight on the slider thumb. The default
+ // implementation does nothing.
+ virtual void SetHighlighted(bool is_highlighted);
+
+ // Gets the size of the slider's thumb.
virtual int GetThumbWidth() = 0;
// views::View:
void OnPaint(gfx::Canvas* canvas) override;
+ // gfx::AnimationDelegate:
+ void AnimationProgressed(const gfx::Animation* animation) override;
+ void AnimationEnded(const gfx::Animation* animation) override;
+
private:
friend class test::SliderTestApi;
@@ -117,9 +126,6 @@ class VIEWS_EXPORT Slider : public View, public gfx::AnimationDelegate {
// ui::EventHandler:
void OnGestureEvent(ui::GestureEvent* event) override;
- // gfx::AnimationDelegate:
- void AnimationProgressed(const gfx::Animation* animation) override;
-
void set_listener(SliderListener* listener) {
listener_ = listener;
}
@@ -130,7 +136,7 @@ class VIEWS_EXPORT Slider : public View, public gfx::AnimationDelegate {
float value_;
float keyboard_increment_;
- float animating_value_;
+ float initial_animating_value_;
bool value_is_valid_;
base::string16 accessible_name_;
bool accessibility_events_enabled_;

Powered by Google App Engine
This is Rietveld 408576698