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 #ifndef UI_NATIVE_THEME_NATIVE_THEME_BASE_H_ | 5 #ifndef UI_NATIVE_THEME_NATIVE_THEME_BASE_H_ |
6 #define UI_NATIVE_THEME_NATIVE_THEME_BASE_H_ | 6 #define UI_NATIVE_THEME_NATIVE_THEME_BASE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/gtest_prod_util.h" |
11 #include "base/macros.h" | 12 #include "base/macros.h" |
12 #include "skia/ext/platform_canvas.h" | 13 #include "skia/ext/platform_canvas.h" |
13 #include "ui/native_theme/native_theme.h" | 14 #include "ui/native_theme/native_theme.h" |
14 | 15 |
15 namespace gfx { | 16 namespace gfx { |
16 class Canvas; | 17 class Canvas; |
17 class ImageSkia; | 18 class ImageSkia; |
18 class Rect; | 19 class Rect; |
19 class Size; | 20 class Size; |
20 } | 21 } |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 // Paints the arrow used on the scrollbar and spinner. | 163 // Paints the arrow used on the scrollbar and spinner. |
163 void PaintArrow(SkCanvas* canvas, | 164 void PaintArrow(SkCanvas* canvas, |
164 const gfx::Rect& rect, | 165 const gfx::Rect& rect, |
165 Part direction, | 166 Part direction, |
166 SkColor color) const; | 167 SkColor color) const; |
167 | 168 |
168 // Returns the color used to draw the arrow. | 169 // Returns the color used to draw the arrow. |
169 SkColor GetArrowColor(State state) const; | 170 SkColor GetArrowColor(State state) const; |
170 | 171 |
171 private: | 172 private: |
| 173 FRIEND_TEST_ALL_PREFIXES(NativeThemeAuraTest, VerticalArrows); |
| 174 FRIEND_TEST_ALL_PREFIXES(NativeThemeAuraTest, HorizontalArrows); |
| 175 |
| 176 SkPath PathForArrow(const gfx::Rect& rect, Part direction) const; |
| 177 |
172 void DrawVertLine(SkCanvas* canvas, | 178 void DrawVertLine(SkCanvas* canvas, |
173 int x, | 179 int x, |
174 int y1, | 180 int y1, |
175 int y2, | 181 int y2, |
176 const SkPaint& paint) const; | 182 const SkPaint& paint) const; |
177 void DrawHorizLine(SkCanvas* canvas, | 183 void DrawHorizLine(SkCanvas* canvas, |
178 int x1, | 184 int x1, |
179 int x2, | 185 int x2, |
180 int y, | 186 int y, |
181 const SkPaint& paint) const; | 187 const SkPaint& paint) const; |
(...skipping 17 matching lines...) Expand all Loading... |
199 | 205 |
200 // The length of the arrow buttons, 0 means no buttons are drawn. | 206 // The length of the arrow buttons, 0 means no buttons are drawn. |
201 unsigned int scrollbar_button_length_; | 207 unsigned int scrollbar_button_length_; |
202 | 208 |
203 DISALLOW_COPY_AND_ASSIGN(NativeThemeBase); | 209 DISALLOW_COPY_AND_ASSIGN(NativeThemeBase); |
204 }; | 210 }; |
205 | 211 |
206 } // namespace ui | 212 } // namespace ui |
207 | 213 |
208 #endif // UI_NATIVE_THEME_NATIVE_THEME_BASE_H_ | 214 #endif // UI_NATIVE_THEME_NATIVE_THEME_BASE_H_ |
OLD | NEW |