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

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

Issue 2335513002: Adding ripple effect for clicks on MD slider (Closed)
Patch Set: imporve animation 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..c2453cfe5c7ee3990280376a3e92031c3cfd609c 100644
--- a/ui/views/controls/slider.h
+++ b/ui/views/controls/slider.h
@@ -73,14 +73,20 @@ class VIEWS_EXPORT Slider : public View, public gfx::AnimationDelegate {
protected:
explicit Slider(SliderListener* listener);
+ virtual void SetHighlighted(bool focus);
bruthig 2016/09/22 21:05:24 nit: Rename |focus| param to be consistent with fu
yiyix 2016/09/23 20:35:37 Done.
// Returns the current position of the thumb on the slider.
float GetAnimatingValue() const;
virtual int GetThumbWidth() = 0;
+ // gfx::AnimationDelegate:
+ void AnimationProgressed(const gfx::Animation* animation) override;
+
// views::View:
void OnPaint(gfx::Canvas* canvas) override;
+ bool OnMousePressed(const ui::MouseEvent& event) override;
+ void OnMouseReleased(const ui::MouseEvent& event) override;
private:
friend class test::SliderTestApi;
@@ -106,9 +112,7 @@ class VIEWS_EXPORT Slider : public View, public gfx::AnimationDelegate {
// views::View:
const char* GetClassName() const override;
gfx::Size GetPreferredSize() const override;
- bool OnMousePressed(const ui::MouseEvent& event) override;
bool OnMouseDragged(const ui::MouseEvent& event) override;
- void OnMouseReleased(const ui::MouseEvent& event) override;
bool OnKeyPressed(const ui::KeyEvent& event) override;
void GetAccessibleState(ui::AXViewState* state) override;
void OnFocus() override;
@@ -117,9 +121,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;
}

Powered by Google App Engine
This is Rietveld 408576698