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 #include "ui/views/controls/slider.h" | 5 #include "ui/views/controls/slider.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "base/strings/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
13 #include "grit/ui_resources.h" | 13 #include "grit/ui_resources.h" |
14 #include "third_party/skia/include/core/SkCanvas.h" | 14 #include "third_party/skia/include/core/SkCanvas.h" |
15 #include "third_party/skia/include/core/SkColor.h" | 15 #include "third_party/skia/include/core/SkColor.h" |
16 #include "third_party/skia/include/core/SkPaint.h" | 16 #include "third_party/skia/include/core/SkPaint.h" |
17 #include "ui/accessibility/ax_view_state.h" | 17 #include "ui/accessibility/ax_view_state.h" |
18 #include "ui/base/resource/resource_bundle.h" | 18 #include "ui/base/resource/resource_bundle.h" |
19 #include "ui/events/event.h" | 19 #include "ui/events/event.h" |
20 #include "ui/gfx/animation/slide_animation.h" | 20 #include "ui/gfx/animation/slide_animation.h" |
21 #include "ui/gfx/canvas.h" | 21 #include "ui/gfx/canvas.h" |
22 #include "ui/gfx/point.h" | 22 #include "ui/gfx/geometry/point.h" |
23 #include "ui/gfx/rect.h" | 23 #include "ui/gfx/rect.h" |
24 #include "ui/views/widget/widget.h" | 24 #include "ui/views/widget/widget.h" |
25 | 25 |
26 namespace { | 26 namespace { |
27 const int kSlideValueChangeDurationMS = 150; | 27 const int kSlideValueChangeDurationMS = 150; |
28 | 28 |
29 const int kBarImagesActive[] = { | 29 const int kBarImagesActive[] = { |
30 IDR_SLIDER_ACTIVE_LEFT, | 30 IDR_SLIDER_ACTIVE_LEFT, |
31 IDR_SLIDER_ACTIVE_CENTER, | 31 IDR_SLIDER_ACTIVE_CENTER, |
32 IDR_SLIDER_PRESSED_CENTER, | 32 IDR_SLIDER_PRESSED_CENTER, |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 if (listener_) | 355 if (listener_) |
356 listener_->SliderDragStarted(this); | 356 listener_->SliderDragStarted(this); |
357 } | 357 } |
358 | 358 |
359 void Slider::OnSliderDragEnded() { | 359 void Slider::OnSliderDragEnded() { |
360 if (listener_) | 360 if (listener_) |
361 listener_->SliderDragEnded(this); | 361 listener_->SliderDragEnded(this); |
362 } | 362 } |
363 | 363 |
364 } // namespace views | 364 } // namespace views |
OLD | NEW |