OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/chromeos/native_theme_chromeos.h" | 5 #include "chrome/browser/chromeos/native_theme_chromeos.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "gfx/insets.h" | |
9 #include "gfx/rect.h" | |
10 #include "gfx/size.h" | |
11 #include "gfx/skbitmap_operations.h" | |
12 #include "grit/theme_resources.h" | 8 #include "grit/theme_resources.h" |
13 #include "third_party/skia/include/effects/SkGradientShader.h" | 9 #include "third_party/skia/include/effects/SkGradientShader.h" |
14 #include "third_party/skia/include/core/SkPaint.h" | 10 #include "third_party/skia/include/core/SkPaint.h" |
15 #include "third_party/skia/include/core/SkPath.h" | 11 #include "third_party/skia/include/core/SkPath.h" |
16 #include "third_party/skia/include/core/SkShader.h" | 12 #include "third_party/skia/include/core/SkShader.h" |
17 #include "ui/base/resource/resource_bundle.h" | 13 #include "ui/base/resource/resource_bundle.h" |
| 14 #include "ui/gfx/insets.h" |
| 15 #include "ui/gfx/rect.h" |
| 16 #include "ui/gfx/size.h" |
| 17 #include "ui/gfx/skbitmap_operations.h" |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 // Color constants. See theme_draw for details. | 21 // Color constants. See theme_draw for details. |
22 | 22 |
23 // Border color used for many widgets. | 23 // Border color used for many widgets. |
24 const SkColor kBaseStroke = SkColorSetRGB(0x8F, 0x8F, 0x8F); | 24 const SkColor kBaseStroke = SkColorSetRGB(0x8F, 0x8F, 0x8F); |
25 | 25 |
26 // Disabled border color used for many widgets. | 26 // Disabled border color used for many widgets. |
27 const SkColor kDisabledBaseStroke = SkColorSetRGB(0xB7, 0xB7, 0xB7); | 27 const SkColor kDisabledBaseStroke = SkColorSetRGB(0xB7, 0xB7, 0xB7); |
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 GetRoundRectPath(rect, kBorderCornerRadius, &border); | 698 GetRoundRectPath(rect, kBorderCornerRadius, &border); |
699 | 699 |
700 SkPaint fill_paint; | 700 SkPaint fill_paint; |
701 GetButtonGradientPaint(rect, state, &fill_paint); | 701 GetButtonGradientPaint(rect, state, &fill_paint); |
702 canvas->drawPath(border, fill_paint); | 702 canvas->drawPath(border, fill_paint); |
703 | 703 |
704 SkPaint stroke_paint; | 704 SkPaint stroke_paint; |
705 GetStrokePaint(state, &stroke_paint); | 705 GetStrokePaint(state, &stroke_paint); |
706 canvas->drawPath(border, stroke_paint); | 706 canvas->drawPath(border, stroke_paint); |
707 } | 707 } |
OLD | NEW |