OLD | NEW |
| (Empty) |
1 // Copyright 2012 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 WEBKIT_COMPOSITOR_BINDINGS_WEB_TO_CCSCROLLBAR_THEME_PAINTER_ADAPTER_H_ | |
6 #define WEBKIT_COMPOSITOR_BINDINGS_WEB_TO_CCSCROLLBAR_THEME_PAINTER_ADAPTER_H_ | |
7 | |
8 #include "base/memory/scoped_ptr.h" | |
9 #include "cc/layers/scrollbar_theme_painter.h" | |
10 | |
11 namespace WebKit { class WebScrollbarThemePainter; } | |
12 | |
13 namespace webkit { | |
14 | |
15 class WebToCCScrollbarThemePainterAdapter : public cc::ScrollbarThemePainter { | |
16 public: | |
17 static scoped_ptr<WebToCCScrollbarThemePainterAdapter> Create( | |
18 scoped_ptr<WebKit::WebScrollbarThemePainter> web_painter) { | |
19 return make_scoped_ptr( | |
20 new WebToCCScrollbarThemePainterAdapter(web_painter.Pass())); | |
21 } | |
22 virtual ~WebToCCScrollbarThemePainterAdapter(); | |
23 | |
24 virtual void PaintScrollbarBackground(SkCanvas* canvas, | |
25 gfx::Rect rect) OVERRIDE; | |
26 virtual void PaintTrackBackground(SkCanvas* canvas, gfx::Rect rect) OVERRIDE; | |
27 virtual void PaintBackTrackPart(SkCanvas* canvas, gfx::Rect rect) OVERRIDE; | |
28 virtual void PaintForwardTrackPart(SkCanvas* canvas, gfx::Rect rect) OVERRIDE; | |
29 virtual void PaintBackButtonStart(SkCanvas* canvas, gfx::Rect rect) OVERRIDE; | |
30 virtual void PaintBackButtonEnd(SkCanvas* canvas, gfx::Rect rect) OVERRIDE; | |
31 virtual void PaintForwardButtonStart(SkCanvas* canvas, gfx::Rect rect) | |
32 OVERRIDE; | |
33 virtual void PaintForwardButtonEnd(SkCanvas* canvas, gfx::Rect rect) OVERRIDE; | |
34 virtual void PaintTickmarks(SkCanvas* canvas, gfx::Rect rect) OVERRIDE; | |
35 virtual void PaintThumb(SkCanvas* canvas, gfx::Rect rect) OVERRIDE; | |
36 | |
37 private: | |
38 explicit WebToCCScrollbarThemePainterAdapter( | |
39 scoped_ptr<WebKit::WebScrollbarThemePainter> web_painter); | |
40 | |
41 scoped_ptr<WebKit::WebScrollbarThemePainter> painter_; | |
42 | |
43 DISALLOW_COPY_AND_ASSIGN(WebToCCScrollbarThemePainterAdapter); | |
44 }; | |
45 | |
46 } // namespace webkit | |
47 | |
48 #endif // WEBKIT_COMPOSITOR_BINDINGS_WEB_TO_CCSCROLLBAR_THEME_PAINTER_ADAPTER_H
_ | |
OLD | NEW |