OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SLIDER_H_ | 5 #ifndef UI_VIEWS_CONTROLS_SLIDER_H_ |
6 #define UI_VIEWS_CONTROLS_SLIDER_H_ | 6 #define UI_VIEWS_CONTROLS_SLIDER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "ui/gfx/animation/animation_delegate.h" | 9 #include "ui/gfx/animation/animation_delegate.h" |
10 #include "ui/views/view.h" | 10 #include "ui/views/view.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 // gfx::AnimationDelegate overrides: | 115 // gfx::AnimationDelegate overrides: |
116 void AnimationProgressed(const gfx::Animation* animation) override; | 116 void AnimationProgressed(const gfx::Animation* animation) override; |
117 | 117 |
118 void set_listener(SliderListener* listener) { | 118 void set_listener(SliderListener* listener) { |
119 listener_ = listener; | 119 listener_ = listener; |
120 } | 120 } |
121 | 121 |
122 SliderListener* listener_; | 122 SliderListener* listener_; |
123 Orientation orientation_; | 123 Orientation orientation_; |
124 | 124 |
125 scoped_ptr<gfx::SlideAnimation> move_animation_; | 125 std::unique_ptr<gfx::SlideAnimation> move_animation_; |
126 | 126 |
127 float value_; | 127 float value_; |
128 float keyboard_increment_; | 128 float keyboard_increment_; |
129 float animating_value_; | 129 float animating_value_; |
130 bool value_is_valid_; | 130 bool value_is_valid_; |
131 base::string16 accessible_name_; | 131 base::string16 accessible_name_; |
132 bool accessibility_events_enabled_; | 132 bool accessibility_events_enabled_; |
133 SkColor focus_border_color_; | 133 SkColor focus_border_color_; |
134 | 134 |
135 // Relative position of the mouse cursor (or the touch point) on the slider's | 135 // Relative position of the mouse cursor (or the touch point) on the slider's |
136 // button. | 136 // button. |
137 gfx::Point initial_button_offset_; | 137 gfx::Point initial_button_offset_; |
138 | 138 |
139 const int* bar_active_images_; | 139 const int* bar_active_images_; |
140 const int* bar_disabled_images_; | 140 const int* bar_disabled_images_; |
141 const gfx::ImageSkia* thumb_; | 141 const gfx::ImageSkia* thumb_; |
142 const gfx::ImageSkia* images_[4]; | 142 const gfx::ImageSkia* images_[4]; |
143 int bar_height_; | 143 int bar_height_; |
144 | 144 |
145 DISALLOW_COPY_AND_ASSIGN(Slider); | 145 DISALLOW_COPY_AND_ASSIGN(Slider); |
146 }; | 146 }; |
147 | 147 |
148 } // namespace views | 148 } // namespace views |
149 | 149 |
150 #endif // UI_VIEWS_CONTROLS_SLIDER_H_ | 150 #endif // UI_VIEWS_CONTROLS_SLIDER_H_ |
OLD | NEW |