| 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_AURA_H_ | 5 #ifndef UI_NATIVE_THEME_NATIVE_THEME_AURA_H_ |
| 6 #define UI_NATIVE_THEME_NATIVE_THEME_AURA_H_ | 6 #define UI_NATIVE_THEME_NATIVE_THEME_AURA_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 // Aura implementation of native theme support. | 13 // Aura implementation of native theme support. |
| 14 class NATIVE_THEME_EXPORT NativeThemeAura : public NativeThemeBase { | 14 class NATIVE_THEME_EXPORT NativeThemeAura : public NativeThemeBase { |
| 15 protected: | 15 protected: |
| 16 friend class NativeTheme; | 16 friend class NativeTheme; |
| 17 friend class NativeThemeAuraTest; | 17 friend class NativeThemeAuraTest; |
| 18 | 18 |
| 19 explicit NativeThemeAura(bool use_overlay_scrollbars); | 19 explicit NativeThemeAura(bool use_overlay_scrollbars); |
| 20 ~NativeThemeAura() override; | 20 ~NativeThemeAura() override; |
| 21 | 21 |
| 22 static NativeThemeAura* instance(); | 22 static NativeThemeAura* instance(); |
| 23 static NativeThemeAura* web_instance(); | 23 static NativeThemeAura* web_instance(); |
| 24 | 24 |
| 25 // Overridden from NativeThemeBase: | 25 // Overridden from NativeThemeBase: |
| 26 SkColor GetSystemColor(ColorId color_id) const override; | 26 SkColor GetSystemColor(ColorId color_id) const override; |
| 27 void PaintMenuPopupBackground( | 27 void PaintMenuPopupBackground( |
| 28 SkCanvas* canvas, | 28 cc::PaintCanvas* canvas, |
| 29 const gfx::Size& size, | 29 const gfx::Size& size, |
| 30 const MenuBackgroundExtraParams& menu_background) const override; | 30 const MenuBackgroundExtraParams& menu_background) const override; |
| 31 void PaintMenuItemBackground( | 31 void PaintMenuItemBackground( |
| 32 SkCanvas* canvas, | 32 cc::PaintCanvas* canvas, |
| 33 State state, | 33 State state, |
| 34 const gfx::Rect& rect, | 34 const gfx::Rect& rect, |
| 35 const MenuItemExtraParams& menu_item) const override; | 35 const MenuItemExtraParams& menu_item) const override; |
| 36 void PaintArrowButton(SkCanvas* gc, | 36 void PaintArrowButton(cc::PaintCanvas* gc, |
| 37 const gfx::Rect& rect, | 37 const gfx::Rect& rect, |
| 38 Part direction, | 38 Part direction, |
| 39 State state) const override; | 39 State state) const override; |
| 40 void PaintScrollbarTrack(SkCanvas* canvas, | 40 void PaintScrollbarTrack(cc::PaintCanvas* canvas, |
| 41 Part part, | 41 Part part, |
| 42 State state, | 42 State state, |
| 43 const ScrollbarTrackExtraParams& extra_params, | 43 const ScrollbarTrackExtraParams& extra_params, |
| 44 const gfx::Rect& rect) const override; | 44 const gfx::Rect& rect) const override; |
| 45 void PaintScrollbarThumb(SkCanvas* canvas, | 45 void PaintScrollbarThumb(cc::PaintCanvas* canvas, |
| 46 Part part, | 46 Part part, |
| 47 State state, | 47 State state, |
| 48 const gfx::Rect& rect, | 48 const gfx::Rect& rect, |
| 49 ScrollbarOverlayColorTheme theme) const override; | 49 ScrollbarOverlayColorTheme theme) const override; |
| 50 void PaintScrollbarCorner(SkCanvas* canvas, | 50 void PaintScrollbarCorner(cc::PaintCanvas* canvas, |
| 51 State state, | 51 State state, |
| 52 const gfx::Rect& rect) const override; | 52 const gfx::Rect& rect) const override; |
| 53 gfx::Size GetPartSize(Part part, | 53 gfx::Size GetPartSize(Part part, |
| 54 State state, | 54 State state, |
| 55 const ExtraParams& extra) const override; | 55 const ExtraParams& extra) const override; |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 bool use_overlay_scrollbars_; | 58 bool use_overlay_scrollbars_; |
| 59 | 59 |
| 60 DISALLOW_COPY_AND_ASSIGN(NativeThemeAura); | 60 DISALLOW_COPY_AND_ASSIGN(NativeThemeAura); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 } // namespace ui | 63 } // namespace ui |
| 64 | 64 |
| 65 #endif // UI_NATIVE_THEME_NATIVE_THEME_AURA_H_ | 65 #endif // UI_NATIVE_THEME_NATIVE_THEME_AURA_H_ |
| OLD | NEW |