| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef UI_VIEWS_CONTROLS_NON_MD_SLIDER_H_ | |
| 6 #define UI_VIEWS_CONTROLS_NON_MD_SLIDER_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "ui/views/controls/slider.h" | |
| 10 #include "ui/views/view.h" | |
| 11 #include "ui/views/views_export.h" | |
| 12 | |
| 13 namespace views { | |
| 14 class Slider; | |
| 15 | |
| 16 class VIEWS_EXPORT NonMdSlider : public Slider { | |
| 17 public: | |
| 18 explicit NonMdSlider(SliderListener* listener); | |
| 19 ~NonMdSlider() override; | |
| 20 | |
| 21 // ui::Slider: | |
| 22 void UpdateState(bool control_on) override; | |
| 23 | |
| 24 // views::View: | |
| 25 void OnPaint(gfx::Canvas* canvas) override; | |
| 26 const char* GetClassName() const override; | |
| 27 | |
| 28 protected: | |
| 29 // ui::Slider: | |
| 30 int GetThumbWidth() override; | |
| 31 | |
| 32 private: | |
| 33 void UpdateSliderAppearance(bool control_on); | |
| 34 | |
| 35 // Array used to hold active slider states and disabled slider states images. | |
| 36 const int* bar_active_images_; | |
| 37 const int* bar_disabled_images_; | |
| 38 const gfx::ImageSkia* thumb_; | |
| 39 | |
| 40 // Array used to hold current state of slider images. | |
| 41 const gfx::ImageSkia* images_[4]; | |
| 42 int bar_height_; | |
| 43 | |
| 44 DISALLOW_COPY_AND_ASSIGN(NonMdSlider); | |
| 45 }; | |
| 46 | |
| 47 } // namespace views | |
| 48 | |
| 49 #endif // UI_VIEWS_CONTROLS_NON_MD_SLIDER_H_ | |
| OLD | NEW |