| 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_ANDROID_H_ | 5 #ifndef UI_NATIVE_THEME_NATIVE_THEME_ANDROID_H_ |
| 6 #define UI_NATIVE_THEME_NATIVE_THEME_ANDROID_H_ | 6 #define UI_NATIVE_THEME_NATIVE_THEME_ANDROID_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "ui/native_theme/native_theme_base.h" | 9 #include "ui/native_theme/native_theme_base.h" |
| 10 | 10 |
| 11 namespace ui { | 11 namespace ui { |
| 12 | 12 |
| 13 // Android implementation of native theme support. | 13 // Android implementation of native theme support. |
| 14 class NativeThemeAndroid : public NativeThemeBase { | 14 class NativeThemeAndroid : public NativeThemeBase { |
| 15 public: | 15 public: |
| 16 static NativeThemeAndroid* instance(); | |
| 17 | |
| 18 // NativeThemeBase: | 16 // NativeThemeBase: |
| 19 gfx::Size GetPartSize(Part part, | 17 gfx::Size GetPartSize(Part part, |
| 20 State state, | 18 State state, |
| 21 const ExtraParams& extra) const override; | 19 const ExtraParams& extra) const override; |
| 22 SkColor GetSystemColor(ColorId color_id) const override; | 20 SkColor GetSystemColor(ColorId color_id) const override; |
| 23 | 21 |
| 24 protected: | 22 protected: |
| 23 friend class NativeTheme; |
| 24 static NativeThemeAndroid* instance(); |
| 25 |
| 25 // NativeThemeBase: | 26 // NativeThemeBase: |
| 26 void AdjustCheckboxRadioRectForPadding(SkRect* rect) const override; | 27 void AdjustCheckboxRadioRectForPadding(SkRect* rect) const override; |
| 27 | 28 |
| 28 private: | 29 private: |
| 29 NativeThemeAndroid(); | 30 NativeThemeAndroid(); |
| 30 ~NativeThemeAndroid() override; | 31 ~NativeThemeAndroid() override; |
| 31 | 32 |
| 32 DISALLOW_COPY_AND_ASSIGN(NativeThemeAndroid); | 33 DISALLOW_COPY_AND_ASSIGN(NativeThemeAndroid); |
| 33 }; | 34 }; |
| 34 | 35 |
| 35 } // namespace ui | 36 } // namespace ui |
| 36 | 37 |
| 37 #endif // UI_NATIVE_THEME_NATIVE_THEME_ANDROID_H_ | 38 #endif // UI_NATIVE_THEME_NATIVE_THEME_ANDROID_H_ |
| OLD | NEW |