| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_TOGGLE_BUTTON_H_ | 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_TOGGLE_BUTTON_H_ |
| 6 #define UI_VIEWS_CONTROLS_BUTTON_TOGGLE_BUTTON_H_ | 6 #define UI_VIEWS_CONTROLS_BUTTON_TOGGLE_BUTTON_H_ |
| 7 | 7 |
| 8 #include "ui/gfx/animation/slide_animation.h" | 8 #include "ui/gfx/animation/slide_animation.h" |
| 9 #include "ui/views/controls/button/custom_button.h" | 9 #include "ui/views/controls/button/custom_button.h" |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 SkColor GetTrackColor(bool is_on) const; | 36 SkColor GetTrackColor(bool is_on) const; |
| 37 | 37 |
| 38 // CustomButton: | 38 // CustomButton: |
| 39 gfx::Size GetPreferredSize() const override; | 39 gfx::Size GetPreferredSize() const override; |
| 40 const char* GetClassName() const override; | 40 const char* GetClassName() const override; |
| 41 void OnPaint(gfx::Canvas* canvas) override; | 41 void OnPaint(gfx::Canvas* canvas) override; |
| 42 void NotifyClick(const ui::Event& event) override; | 42 void NotifyClick(const ui::Event& event) override; |
| 43 void OnBoundsChanged(const gfx::Rect& previous_bounds) override; | 43 void OnBoundsChanged(const gfx::Rect& previous_bounds) override; |
| 44 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; | 44 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; |
| 45 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; |
| 45 void AddInkDropLayer(ui::Layer* ink_drop_layer) override; | 46 void AddInkDropLayer(ui::Layer* ink_drop_layer) override; |
| 46 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override; | 47 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override; |
| 47 std::unique_ptr<InkDropRipple> CreateInkDropRipple() const override; | 48 std::unique_ptr<InkDropRipple> CreateInkDropRipple() const override; |
| 48 SkColor GetInkDropBaseColor() const override; | 49 SkColor GetInkDropBaseColor() const override; |
| 49 bool ShouldShowInkDropHighlight() const override; | 50 bool ShouldShowInkDropHighlight() const override; |
| 50 | 51 |
| 51 // gfx::AnimationDelegate: | 52 // gfx::AnimationDelegate: |
| 52 void AnimationProgressed(const gfx::Animation* animation) override; | 53 void AnimationProgressed(const gfx::Animation* animation) override; |
| 53 | 54 |
| 54 bool is_on_; | 55 bool is_on_; |
| 55 gfx::SlideAnimation slide_animation_; | 56 gfx::SlideAnimation slide_animation_; |
| 56 ThumbView* thumb_view_; | 57 ThumbView* thumb_view_; |
| 57 | 58 |
| 58 DISALLOW_COPY_AND_ASSIGN(ToggleButton); | 59 DISALLOW_COPY_AND_ASSIGN(ToggleButton); |
| 59 }; | 60 }; |
| 60 | 61 |
| 61 } // namespace views | 62 } // namespace views |
| 62 | 63 |
| 63 #endif // UI_VIEWS_CONTROLS_BUTTON_TOGGLE_BUTTON_H_ | 64 #endif // UI_VIEWS_CONTROLS_BUTTON_TOGGLE_BUTTON_H_ |
| OLD | NEW |