Chromium Code Reviews| 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" |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 162 | 162 |
| 163 // Paints the arrow used on the scrollbar and spinner. | 163 // Paints the arrow used on the scrollbar and spinner. |
| 164 void PaintArrow(SkCanvas* canvas, | 164 void PaintArrow(SkCanvas* canvas, |
| 165 const gfx::Rect& rect, | 165 const gfx::Rect& rect, |
| 166 Part direction, | 166 Part direction, |
| 167 SkColor color) const; | 167 SkColor color) const; |
| 168 | 168 |
| 169 // Returns the color used to draw the arrow. | 169 // Returns the color used to draw the arrow. |
| 170 SkColor GetArrowColor(State state) const; | 170 SkColor GetArrowColor(State state) const; |
| 171 | 171 |
| 172 unsigned int scrollbar_width_; | |
|
Peter Kasting
2016/10/17 19:10:25
Nit: unsigned int is banned. I know you are just
bokan
2016/10/17 23:21:04
Done. (also for button length below)
| |
| 173 | |
| 172 private: | 174 private: |
| 173 friend class NativeThemeAuraTest; | 175 friend class NativeThemeAuraTest; |
| 174 | 176 |
| 175 SkPath PathForArrow(const gfx::Rect& rect, Part direction) const; | 177 SkPath PathForArrow(const gfx::Rect& rect, Part direction) const; |
| 176 gfx::Rect BoundingRectForArrow(const gfx::Rect& rect) const; | 178 gfx::Rect BoundingRectForArrow(const gfx::Rect& rect) const; |
| 177 | 179 |
| 178 void DrawVertLine(SkCanvas* canvas, | 180 void DrawVertLine(SkCanvas* canvas, |
| 179 int x, | 181 int x, |
| 180 int y1, | 182 int y1, |
| 181 int y2, | 183 int y2, |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 194 SkColor OutlineColor(SkScalar* hsv1, SkScalar* hsv2) const; | 196 SkColor OutlineColor(SkScalar* hsv1, SkScalar* hsv2) const; |
| 195 | 197 |
| 196 // Paint the common parts of the checkboxes and radio buttons. | 198 // Paint the common parts of the checkboxes and radio buttons. |
| 197 // borderRadius specifies how rounded the corners should be. | 199 // borderRadius specifies how rounded the corners should be. |
| 198 SkRect PaintCheckboxRadioCommon( | 200 SkRect PaintCheckboxRadioCommon( |
| 199 SkCanvas* canvas, | 201 SkCanvas* canvas, |
| 200 State state, | 202 State state, |
| 201 const gfx::Rect& rect, | 203 const gfx::Rect& rect, |
| 202 const SkScalar borderRadius) const; | 204 const SkScalar borderRadius) const; |
| 203 | 205 |
| 204 unsigned int scrollbar_width_; | |
| 205 | |
| 206 // 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. |
| 207 unsigned int scrollbar_button_length_; | 207 unsigned int scrollbar_button_length_; |
| 208 | 208 |
| 209 DISALLOW_COPY_AND_ASSIGN(NativeThemeBase); | 209 DISALLOW_COPY_AND_ASSIGN(NativeThemeBase); |
| 210 }; | 210 }; |
| 211 | 211 |
| 212 } // namespace ui | 212 } // namespace ui |
| 213 | 213 |
| 214 #endif // UI_NATIVE_THEME_NATIVE_THEME_BASE_H_ | 214 #endif // UI_NATIVE_THEME_NATIVE_THEME_BASE_H_ |
| OLD | NEW |