Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(649)

Unified Diff: ui/native_theme/native_theme_base.h

Issue 143953007: Changes look for scrollbars on windows (2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/native_theme/native_theme_aurawin.cc ('k') | ui/native_theme/native_theme_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « ui/native_theme/native_theme_aurawin.cc ('k') | ui/native_theme/native_theme_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698