Index: ui/native_theme/native_theme_base.h |
diff --git a/ui/native_theme/native_theme_base.h b/ui/native_theme/native_theme_base.h |
index 9e314c333d6bf23329f272f5ad7a011c61c1ca45..d86808622af0d41dd5fd1fe1c796a498735bd180 100644 |
--- a/ui/native_theme/native_theme_base.h |
+++ b/ui/native_theme/native_theme_base.h |
@@ -7,10 +7,12 @@ |
#include "base/basictypes.h" |
#include "base/compiler_specific.h" |
+#include "base/memory/scoped_ptr.h" |
#include "skia/ext/platform_canvas.h" |
#include "ui/native_theme/native_theme.h" |
namespace gfx { |
+class Canvas; |
class ImageSkia; |
class Rect; |
class Size; |
@@ -35,6 +37,9 @@ class NATIVE_THEME_EXPORT NativeThemeBase : public NativeTheme { |
NativeThemeBase(); |
virtual ~NativeThemeBase(); |
+ // Creates a gfx::Canvas wrapping an SkCanvas. |
+ static scoped_ptr<gfx::Canvas> CreateCanvas(SkCanvas* sk_canvas); |
+ |
// Draw the arrow. Used by scrollbar and inner spin button. |
virtual void PaintArrowButton( |
SkCanvas* gc, |
@@ -121,7 +126,6 @@ class NATIVE_THEME_EXPORT NativeThemeBase : public NativeTheme { |
const gfx::Rect& rect, |
const ProgressBarExtraParams& progress_bar) const; |
- protected: |
void set_scrollbar_button_length(unsigned int length) { |
scrollbar_button_length_ = length; |
} |
@@ -142,6 +146,16 @@ class NATIVE_THEME_EXPORT NativeThemeBase : public NativeTheme { |
SkColor SaturateAndBrighten(SkScalar* hsv, |
SkScalar saturate_amount, |
SkScalar brighten_amount) const; |
+ |
+ // Paints the arrow used on the scrollbar and spinner. |
+ void PaintArrow(SkCanvas* canvas, |
+ const gfx::Rect& rect, |
+ Part direction, |
+ SkColor color) const; |
+ |
+ // Returns the color used to draw the arrow. |
+ SkColor GetArrowColor(State state) const; |
+ |
private: |
void DrawVertLine(SkCanvas* canvas, |
int x, |