| 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 "cc/paint/paint_flags.h" | 13 #include "cc/paint/paint_flags.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_node_data.h" | 17 #include "ui/accessibility/ax_node_data.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/canvas.h" | 20 #include "ui/gfx/canvas.h" |
| 21 #include "ui/gfx/geometry/point.h" | 21 #include "ui/gfx/geometry/point.h" |
| 22 #include "ui/gfx/geometry/rect.h" | 22 #include "ui/gfx/geometry/rect.h" |
| 23 #include "ui/native_theme/native_theme.h" | 23 #include "ui/native_theme/native_theme.h" |
| 24 #include "ui/resources/grit/ui_resources.h" | |
| 25 #include "ui/views/resources/grit/views_resources.h" | |
| 26 #include "ui/views/widget/widget.h" | 24 #include "ui/views/widget/widget.h" |
| 27 | 25 |
| 28 namespace { | 26 namespace { |
| 29 const int kSlideValueChangeDurationMs = 150; | 27 const int kSlideValueChangeDurationMs = 150; |
| 30 | 28 |
| 31 // The image chunks. | 29 // The image chunks. |
| 32 enum BorderElements { | 30 enum BorderElements { |
| 33 LEFT, | 31 LEFT, |
| 34 CENTER_LEFT, | 32 CENTER_LEFT, |
| 35 CENTER_RIGHT, | 33 CENTER_RIGHT, |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 event->SetHandled(); | 353 event->SetHandled(); |
| 356 if (event->details().touch_points() <= 1) | 354 if (event->details().touch_points() <= 1) |
| 357 OnSliderDragEnded(); | 355 OnSliderDragEnded(); |
| 358 break; | 356 break; |
| 359 default: | 357 default: |
| 360 break; | 358 break; |
| 361 } | 359 } |
| 362 } | 360 } |
| 363 | 361 |
| 364 } // namespace views | 362 } // namespace views |
| OLD | NEW |