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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 // Paints the arrow used on the scrollbar and spinner. | 173 // Paints the arrow used on the scrollbar and spinner. |
173 void PaintArrow(SkCanvas* canvas, | 174 void PaintArrow(SkCanvas* canvas, |
174 const gfx::Rect& rect, | 175 const gfx::Rect& rect, |
175 Part direction, | 176 Part direction, |
176 SkColor color) const; | 177 SkColor color) const; |
177 | 178 |
178 // Returns the color used to draw the arrow. | 179 // Returns the color used to draw the arrow. |
179 SkColor GetArrowColor(State state) const; | 180 SkColor GetArrowColor(State state) const; |
180 | 181 |
181 private: | 182 private: |
| 183 FRIEND_TEST_ALL_PREFIXES(NativeThemeAuraTest, VerticalArrows); |
| 184 FRIEND_TEST_ALL_PREFIXES(NativeThemeAuraTest, HorizontalArrows); |
| 185 |
| 186 SkPath PathForArrow(const gfx::Rect& rect, Part direction) const; |
| 187 |
182 void DrawVertLine(SkCanvas* canvas, | 188 void DrawVertLine(SkCanvas* canvas, |
183 int x, | 189 int x, |
184 int y1, | 190 int y1, |
185 int y2, | 191 int y2, |
186 const SkPaint& paint) const; | 192 const SkPaint& paint) const; |
187 void DrawHorizLine(SkCanvas* canvas, | 193 void DrawHorizLine(SkCanvas* canvas, |
188 int x1, | 194 int x1, |
189 int x2, | 195 int x2, |
190 int y, | 196 int y, |
191 const SkPaint& paint) const; | 197 const SkPaint& paint) const; |
(...skipping 17 matching lines...) Expand all Loading... |
209 | 215 |
210 // The length of the arrow buttons, 0 means no buttons are drawn. | 216 // The length of the arrow buttons, 0 means no buttons are drawn. |
211 unsigned int scrollbar_button_length_; | 217 unsigned int scrollbar_button_length_; |
212 | 218 |
213 DISALLOW_COPY_AND_ASSIGN(NativeThemeBase); | 219 DISALLOW_COPY_AND_ASSIGN(NativeThemeBase); |
214 }; | 220 }; |
215 | 221 |
216 } // namespace ui | 222 } // namespace ui |
217 | 223 |
218 #endif // UI_NATIVE_THEME_NATIVE_THEME_BASE_H_ | 224 #endif // UI_NATIVE_THEME_NATIVE_THEME_BASE_H_ |
OLD | NEW |