| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 const gfx::Rect& rect) const { | 144 const gfx::Rect& rect) const { |
| 145 } | 145 } |
| 146 | 146 |
| 147 // Shrinks checkbox/radio button rect, if necessary, to make room for padding | 147 // Shrinks checkbox/radio button rect, if necessary, to make room for padding |
| 148 // and drop shadow. | 148 // and drop shadow. |
| 149 // TODO(mohsen): This is needed because checkboxes/radio buttons on Android | 149 // TODO(mohsen): This is needed because checkboxes/radio buttons on Android |
| 150 // have different padding from those on desktop Chrome. Get rid of this when | 150 // have different padding from those on desktop Chrome. Get rid of this when |
| 151 // crbug.com/530746 is resolved. | 151 // crbug.com/530746 is resolved. |
| 152 virtual void AdjustCheckboxRadioRectForPadding(SkRect* rect) const; | 152 virtual void AdjustCheckboxRadioRectForPadding(SkRect* rect) const; |
| 153 | 153 |
| 154 void set_scrollbar_button_length(unsigned int length) { | |
| 155 scrollbar_button_length_ = length; | |
| 156 } | |
| 157 int scrollbar_button_length() const { return scrollbar_button_length_; } | |
| 158 | |
| 159 SkColor SaturateAndBrighten(SkScalar* hsv, | 154 SkColor SaturateAndBrighten(SkScalar* hsv, |
| 160 SkScalar saturate_amount, | 155 SkScalar saturate_amount, |
| 161 SkScalar brighten_amount) const; | 156 SkScalar brighten_amount) const; |
| 162 | 157 |
| 163 // Paints the arrow used on the scrollbar and spinner. | 158 // Paints the arrow used on the scrollbar and spinner. |
| 164 void PaintArrow(SkCanvas* canvas, | 159 void PaintArrow(SkCanvas* canvas, |
| 165 const gfx::Rect& rect, | 160 const gfx::Rect& rect, |
| 166 Part direction, | 161 Part direction, |
| 167 SkColor color) const; | 162 SkColor color) const; |
| 168 | 163 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 196 // Paint the common parts of the checkboxes and radio buttons. | 191 // Paint the common parts of the checkboxes and radio buttons. |
| 197 // borderRadius specifies how rounded the corners should be. | 192 // borderRadius specifies how rounded the corners should be. |
| 198 SkRect PaintCheckboxRadioCommon( | 193 SkRect PaintCheckboxRadioCommon( |
| 199 SkCanvas* canvas, | 194 SkCanvas* canvas, |
| 200 State state, | 195 State state, |
| 201 const gfx::Rect& rect, | 196 const gfx::Rect& rect, |
| 202 const SkScalar borderRadius) const; | 197 const SkScalar borderRadius) const; |
| 203 | 198 |
| 204 unsigned int scrollbar_width_; | 199 unsigned int scrollbar_width_; |
| 205 | 200 |
| 206 // The length of the arrow buttons, 0 means no buttons are drawn. | |
| 207 unsigned int scrollbar_button_length_; | |
| 208 | |
| 209 DISALLOW_COPY_AND_ASSIGN(NativeThemeBase); | 201 DISALLOW_COPY_AND_ASSIGN(NativeThemeBase); |
| 210 }; | 202 }; |
| 211 | 203 |
| 212 } // namespace ui | 204 } // namespace ui |
| 213 | 205 |
| 214 #endif // UI_NATIVE_THEME_NATIVE_THEME_BASE_H_ | 206 #endif // UI_NATIVE_THEME_NATIVE_THEME_BASE_H_ |
| OLD | NEW |