| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef UI_NATIVE_THEME_NATIVE_THEME_AURAWIN_H_ | |
| 6 #define UI_NATIVE_THEME_NATIVE_THEME_AURAWIN_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "base/compiler_specific.h" | |
| 10 #include "ui/native_theme/native_theme_aura.h" | |
| 11 | |
| 12 namespace gfx { | |
| 13 class NineImagePainter; | |
| 14 } | |
| 15 | |
| 16 namespace ui { | |
| 17 | |
| 18 // Aura implementation of native theme support. | |
| 19 class NATIVE_THEME_EXPORT NativeThemeAuraWin : public NativeThemeAura { | |
| 20 public: | |
| 21 static NativeThemeAuraWin* instance(); | |
| 22 | |
| 23 private: | |
| 24 NativeThemeAuraWin(); | |
| 25 virtual ~NativeThemeAuraWin(); | |
| 26 | |
| 27 // Overridden from NativeThemeBase: | |
| 28 virtual gfx::Size GetPartSize(Part part, | |
| 29 State state, | |
| 30 const ExtraParams& extra) const OVERRIDE; | |
| 31 virtual void PaintArrowButton(SkCanvas* gc, | |
| 32 const gfx::Rect& rect, | |
| 33 Part direction, | |
| 34 State state) const OVERRIDE; | |
| 35 virtual void PaintScrollbarTrack( | |
| 36 SkCanvas* sk_canvas, | |
| 37 Part part, | |
| 38 State state, | |
| 39 const ScrollbarTrackExtraParams& extra_params, | |
| 40 const gfx::Rect& rect) const OVERRIDE; | |
| 41 virtual void PaintScrollbarThumb(SkCanvas* sk_canvas, | |
| 42 Part part, | |
| 43 State state, | |
| 44 const gfx::Rect& rect) const OVERRIDE; | |
| 45 | |
| 46 // Returns the NineImagePainter used to paint the specified state, creating if | |
| 47 // necessary. If no image is provided for the specified state the normal state | |
| 48 // images are used. | |
| 49 gfx::NineImagePainter* GetOrCreatePainter( | |
| 50 const int image_ids[kMaxState][9], | |
| 51 State state, | |
| 52 scoped_ptr<gfx::NineImagePainter> painters[kMaxState]) const; | |
| 53 | |
| 54 // Paints |painter| into the canvas using |rect|. | |
| 55 void PaintPainter(gfx::NineImagePainter* painter, | |
| 56 SkCanvas* sk_canvas, | |
| 57 const gfx::Rect& rect) const; | |
| 58 | |
| 59 mutable scoped_ptr<gfx::NineImagePainter> scrollbar_track_painter_; | |
| 60 | |
| 61 mutable scoped_ptr<gfx::NineImagePainter> | |
| 62 scrollbar_thumb_painters_[kMaxState]; | |
| 63 | |
| 64 mutable scoped_ptr<gfx::NineImagePainter> | |
| 65 scrollbar_arrow_button_painters_[kMaxState]; | |
| 66 | |
| 67 DISALLOW_COPY_AND_ASSIGN(NativeThemeAuraWin); | |
| 68 }; | |
| 69 | |
| 70 } // namespace ui | |
| 71 | |
| 72 #endif // UI_NATIVE_THEME_NATIVE_THEME_AURAWIN_H_ | |
| OLD | NEW |