| 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_BASE_NATIVE_THEME_NATIVE_THEME_BASE_H_ | 5 #ifndef UI_BASE_NATIVE_THEME_NATIVE_THEME_BASE_H_ |
| 6 #define UI_BASE_NATIVE_THEME_NATIVE_THEME_BASE_H_ | 6 #define UI_BASE_NATIVE_THEME_NATIVE_THEME_BASE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "skia/ext/platform_canvas.h" | 11 #include "skia/ext/platform_canvas.h" |
| 12 #include "ui/base/native_theme/native_theme.h" | 12 #include "ui/base/native_theme/native_theme.h" |
| 13 | 13 |
| 14 namespace gfx { | 14 namespace gfx { |
| 15 class ImageSkia; |
| 15 class Rect; | 16 class Rect; |
| 16 class Size; | 17 class Size; |
| 17 } | 18 } |
| 18 | 19 |
| 19 namespace ui { | 20 namespace ui { |
| 20 | 21 |
| 21 // Theme support for non-Windows toolkits. | 22 // Theme support for non-Windows toolkits. |
| 22 class NativeThemeBase : public NativeTheme { | 23 class NativeThemeBase : public NativeTheme { |
| 23 public: | 24 public: |
| 24 // NativeTheme implementation: | 25 // NativeTheme implementation: |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 const ProgressBarExtraParams& progress_bar) const; | 121 const ProgressBarExtraParams& progress_bar) const; |
| 121 | 122 |
| 122 protected: | 123 protected: |
| 123 void set_scrollbar_button_length(unsigned int length) { | 124 void set_scrollbar_button_length(unsigned int length) { |
| 124 scrollbar_button_length_ = length; | 125 scrollbar_button_length_ = length; |
| 125 } | 126 } |
| 126 | 127 |
| 127 bool IntersectsClipRectInt(SkCanvas* canvas, | 128 bool IntersectsClipRectInt(SkCanvas* canvas, |
| 128 int x, int y, int w, int h) const; | 129 int x, int y, int w, int h) const; |
| 129 | 130 |
| 130 void DrawBitmapInt(SkCanvas* canvas, const SkBitmap& bitmap, | 131 void DrawBitmapInt(SkCanvas* canvas, const gfx::ImageSkia& image, |
| 131 int src_x, int src_y, int src_w, int src_h, | 132 int src_x, int src_y, int src_w, int src_h, |
| 132 int dest_x, int dest_y, int dest_w, int dest_h) const; | 133 int dest_x, int dest_y, int dest_w, int dest_h) const; |
| 133 | 134 |
| 134 void DrawTiledImage(SkCanvas* canvas, | 135 void DrawTiledImage(SkCanvas* canvas, |
| 135 const SkBitmap& bitmap, | 136 const gfx::ImageSkia& image, |
| 136 int src_x, int src_y, | 137 int src_x, int src_y, |
| 137 float tile_scale_x, float tile_scale_y, | 138 float tile_scale_x, float tile_scale_y, |
| 138 int dest_x, int dest_y, int w, int h) const; | 139 int dest_x, int dest_y, int w, int h) const; |
| 139 | 140 |
| 140 SkColor SaturateAndBrighten(SkScalar* hsv, | 141 SkColor SaturateAndBrighten(SkScalar* hsv, |
| 141 SkScalar saturate_amount, | 142 SkScalar saturate_amount, |
| 142 SkScalar brighten_amount) const; | 143 SkScalar brighten_amount) const; |
| 143 | 144 |
| 144 private: | 145 private: |
| 145 void DrawVertLine(SkCanvas* canvas, | 146 void DrawVertLine(SkCanvas* canvas, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 162 | 163 |
| 163 unsigned int scrollbar_width_; | 164 unsigned int scrollbar_width_; |
| 164 unsigned int scrollbar_button_length_; | 165 unsigned int scrollbar_button_length_; |
| 165 | 166 |
| 166 DISALLOW_COPY_AND_ASSIGN(NativeThemeBase); | 167 DISALLOW_COPY_AND_ASSIGN(NativeThemeBase); |
| 167 }; | 168 }; |
| 168 | 169 |
| 169 } // namespace ui | 170 } // namespace ui |
| 170 | 171 |
| 171 #endif // UI_BASE_NATIVE_THEME_NATIVE_THEME_BASE_H_ | 172 #endif // UI_BASE_NATIVE_THEME_NATIVE_THEME_BASE_H_ |
| OLD | NEW |