| 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_GFX_NATIVE_THEME_ANDROID_H_ | 5 #ifndef UI_BASE_NATIVE_THEME_NATIVE_THEME_ANDROID_H_ |
| 6 #define UI_GFX_NATIVE_THEME_ANDROID_H_ | 6 #define UI_BASE_NATIVE_THEME_NATIVE_THEME_ANDROID_H_ |
| 7 #pragma once |
| 7 | 8 |
| 8 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 10 #include "skia/ext/platform_canvas.h" | 11 #include "skia/ext/platform_canvas.h" |
| 11 #include "ui/gfx/native_theme.h" | 12 #include "ui/base/native_theme/native_theme.h" |
| 12 | 13 |
| 13 namespace gfx { | 14 namespace gfx { |
| 14 class Rect; | 15 class Rect; |
| 15 class Size; | 16 class Size; |
| 17 } |
| 18 |
| 19 namespace ui { |
| 16 | 20 |
| 17 // Android theming API. | 21 // Android theming API. |
| 18 class NativeThemeAndroid : public NativeTheme { | 22 class NativeThemeAndroid : public NativeTheme { |
| 19 public: | 23 public: |
| 20 // Gets our singleton instance. | 24 // Gets our singleton instance. |
| 21 static const NativeThemeAndroid* instance(); | 25 static const NativeThemeAndroid* instance(); |
| 22 | 26 |
| 23 // Return the size of the part. | 27 // Return the size of the part. |
| 24 virtual Size GetPartSize(Part part, | 28 virtual gfx::Size GetPartSize(Part part, |
| 25 State state, | 29 State state, |
| 26 const ExtraParams& extra) const OVERRIDE; | 30 const ExtraParams& extra) const OVERRIDE; |
| 27 | 31 |
| 28 // Paint the part to the canvas. | 32 // Paint the part to the canvas. |
| 29 virtual void Paint(SkCanvas* canvas, | 33 virtual void Paint(SkCanvas* canvas, |
| 30 Part part, | 34 Part part, |
| 31 State state, | 35 State state, |
| 32 const gfx::Rect& rect, | 36 const gfx::Rect& rect, |
| 33 const ExtraParams& extra) const OVERRIDE; | 37 const ExtraParams& extra) const OVERRIDE; |
| 34 | 38 |
| 35 virtual SkColor GetSystemColor(ColorId color_id) const OVERRIDE; | 39 virtual SkColor GetSystemColor(ColorId color_id) const OVERRIDE; |
| 36 | 40 |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 // or |max| is returned dependent on which is mostly near the |value|. | 164 // or |max| is returned dependent on which is mostly near the |value|. |
| 161 SkScalar Clamp(SkScalar value, SkScalar min, SkScalar max) const; | 165 SkScalar Clamp(SkScalar value, SkScalar min, SkScalar max) const; |
| 162 | 166 |
| 163 // Used to return the color of scrollbar based on the color of thumb and | 167 // Used to return the color of scrollbar based on the color of thumb and |
| 164 // track. | 168 // track. |
| 165 SkColor OutlineColor(SkScalar* hsv1, SkScalar* hsv2) const; | 169 SkColor OutlineColor(SkScalar* hsv1, SkScalar* hsv2) const; |
| 166 | 170 |
| 167 DISALLOW_COPY_AND_ASSIGN(NativeThemeAndroid); | 171 DISALLOW_COPY_AND_ASSIGN(NativeThemeAndroid); |
| 168 }; | 172 }; |
| 169 | 173 |
| 170 } // namespace gfx | 174 } // namespace ui |
| 171 | 175 |
| 172 #endif // UI_GFX_NATIVE_THEME_ANDROID_H_ | 176 #endif // UI_BASE_NATIVE_THEME_NATIVE_THEME_ANDROID_H_ |
| OLD | NEW |