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/progress_bar.h" | 5 #include "ui/views/controls/progress_bar.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "third_party/skia/include/core/SkPaint.h" | 12 #include "third_party/skia/include/core/SkPaint.h" |
13 #include "third_party/skia/include/core/SkPath.h" | 13 #include "third_party/skia/include/core/SkPath.h" |
14 #include "third_party/skia/include/core/SkXfermode.h" | 14 #include "third_party/skia/include/core/SkXfermode.h" |
15 #include "third_party/skia/include/effects/SkGradientShader.h" | 15 #include "third_party/skia/include/effects/SkGradientShader.h" |
| 16 #include "ui/accessibility/ax_enums.h" |
16 #include "ui/accessibility/ax_view_state.h" | 17 #include "ui/accessibility/ax_view_state.h" |
17 #include "ui/gfx/canvas.h" | 18 #include "ui/gfx/canvas.h" |
18 | 19 |
19 namespace { | 20 namespace { |
20 | 21 |
21 // Progress bar's border width. | 22 // Progress bar's border width. |
22 const int kBorderWidth = 1; | 23 const int kBorderWidth = 1; |
23 | 24 |
24 // Corner radius for the progress bar's border. | 25 // Corner radius for the progress bar's border. |
25 const int kCornerRadius = 2; | 26 const int kCornerRadius = 2; |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 // Draw bar stroke | 311 // Draw bar stroke |
311 StrokeRoundRect(canvas, | 312 StrokeRoundRect(canvas, |
312 bar_left, bar_top, progress_width, bar_height, | 313 bar_left, bar_top, progress_width, bar_height, |
313 kCornerRadius, | 314 kCornerRadius, |
314 enabled() ? kBarBorderColor : kDisabledBarBorderColor, | 315 enabled() ? kBarBorderColor : kDisabledBarBorderColor, |
315 kBorderWidth); | 316 kBorderWidth); |
316 } | 317 } |
317 } | 318 } |
318 | 319 |
319 } // namespace views | 320 } // namespace views |
OLD | NEW |