OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/string_util.h" | 11 #include "base/string_util.h" |
12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
13 #include "third_party/skia/include/effects/SkBlurMaskFilter.h" | 13 #include "third_party/skia/include/effects/SkBlurMaskFilter.h" |
14 #include "third_party/skia/include/effects/SkGradientShader.h" | 14 #include "third_party/skia/include/effects/SkGradientShader.h" |
15 #include "ui/base/accessibility/accessible_view_state.h" | 15 #include "ui/base/accessibility/accessible_view_state.h" |
16 #include "ui/gfx/canvas_skia.h" | 16 #include "ui/gfx/canvas_skia.h" |
17 #include "ui/gfx/color_utils.h" | 17 #include "ui/gfx/color_utils.h" |
18 #include "ui/gfx/font.h" | 18 #include "ui/gfx/font.h" |
19 #include "ui/gfx/insets.h" | 19 #include "ui/gfx/insets.h" |
20 #include "views/background.h" | 20 #include "ui/views/background.h" |
21 #include "views/border.h" | 21 #include "ui/views/border.h" |
22 #include "views/painter.h" | 22 #include "ui/views/painter.h" |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 // Corner radius for the progress bar's border. | 26 // Corner radius for the progress bar's border. |
27 const int kCornerRadius = 3; | 27 const int kCornerRadius = 3; |
28 | 28 |
29 // Progress bar's border width | 29 // Progress bar's border width |
30 const int kBorderWidth = 1; | 30 const int kBorderWidth = 1; |
31 | 31 |
32 void AddRoundRectPathWithPadding(int x, int y, | 32 void AddRoundRectPathWithPadding(int x, int y, |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 StrokeRoundRect(canvas, | 310 StrokeRoundRect(canvas, |
311 0, 0, | 311 0, 0, |
312 width(), height(), | 312 width(), height(), |
313 kCornerRadius, | 313 kCornerRadius, |
314 border_color, | 314 border_color, |
315 kBorderWidth); | 315 kBorderWidth); |
316 #endif | 316 #endif |
317 } | 317 } |
318 | 318 |
319 } // namespace views | 319 } // namespace views |
OLD | NEW |