Chromium Code Reviews| Index: ui/views/controls/slider.h |
| diff --git a/ui/views/controls/slider.h b/ui/views/controls/slider.h |
| index e90da3a4ab1ae20426f114e9c184a7dbd6d6bef5..8ebe0eb707fb6da15a1431d71637965ed892acf0 100644 |
| --- a/ui/views/controls/slider.h |
| +++ b/ui/views/controls/slider.h |
| @@ -72,6 +72,11 @@ class VIEWS_EXPORT Slider : public View, public gfx::AnimationDelegate { |
| virtual void UpdateState(bool control_on) = 0; |
| protected: |
| + virtual void SetFocus(bool focus){}; |
|
bruthig
2016/09/21 00:27:46
The 'focus' concept is already defined on View and
bruthig
2016/09/21 00:27:46
Move definition to .cc file.
yiyix
2016/09/21 15:20:52
Done.
|
| + bool OnMousePressed(const ui::MouseEvent& event) override; |
| + void OnMouseReleased(const ui::MouseEvent& event) override; |
|
bruthig
2016/09/21 00:27:46
OnMousePressed() and OnMouseReleased() should be g
yiyix
2016/09/21 15:20:52
Done.
|
| + |
| + protected: |
|
bruthig
2016/09/21 00:27:46
nit: Remove, protected is already declared on line
yiyix
2016/09/21 15:20:52
Sorry again, It is not a fully finish version when
|
| explicit Slider(SliderListener* listener); |
|
bruthig
2016/09/21 00:27:46
Style guide specifies constructors should be decla
yiyix
2016/09/21 15:20:53
Done.
|
| // Returns the current position of the thumb on the slider. |
| @@ -79,6 +84,9 @@ class VIEWS_EXPORT Slider : public View, public gfx::AnimationDelegate { |
| virtual int GetThumbWidth() = 0; |
| + // gfx::AnimationDelegate: |
| + void AnimationProgressed(const gfx::Animation* animation) override; |
| + |
| // views::View: |
| void OnPaint(gfx::Canvas* canvas) override; |
| @@ -106,9 +114,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 +123,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; |
| } |