Chromium Code Reviews| 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/scrollbar_theme_painter.h" | |
| 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebScrollbarThemePa inter.h" | |
|
enne (OOO)
2012/12/17 20:48:55
Is it possible to not pollute the header with this
danakj
2012/12/17 21:45:09
Done.
| |
| 11 | |
| 12 namespace WebKit { | |
| 13 | |
| 14 class WebToCCScrollbarThemePainterAdapter : public cc::ScrollbarThemePainter { | |
| 15 public: | |
| 16 static scoped_ptr<WebToCCScrollbarThemePainterAdapter> Create( | |
| 17 const WebScrollbarThemePainter& webPainter) { | |
| 18 return make_scoped_ptr(new WebToCCScrollbarThemePainterAdapter(webPainter)); | |
| 19 } | |
| 20 | |
| 21 virtual void PaintScrollbarBackground(SkCanvas* canvas, const gfx::Rect& rect) | |
| 22 OVERRIDE; | |
| 23 virtual void PaintTrackBackground(SkCanvas* canvas, const gfx::Rect& rect) | |
| 24 OVERRIDE; | |
| 25 virtual void PaintBackTrackPart(SkCanvas* canvas, const gfx::Rect& rect) | |
| 26 OVERRIDE; | |
| 27 virtual void PaintForwardTrackPart(SkCanvas* canvas, const gfx::Rect& rect) | |
| 28 OVERRIDE; | |
| 29 virtual void PaintBackButtonStart(SkCanvas* canvas, const gfx::Rect& rect) | |
| 30 OVERRIDE; | |
| 31 virtual void PaintBackButtonEnd(SkCanvas* canvas, const gfx::Rect& rect) | |
| 32 OVERRIDE; | |
| 33 virtual void PaintForwardButtonStart(SkCanvas* canvas, const gfx::Rect& rect) | |
| 34 OVERRIDE; | |
| 35 virtual void PaintForwardButtonEnd(SkCanvas* canvas, const gfx::Rect& rect) | |
| 36 OVERRIDE; | |
| 37 virtual void PaintTickmarks(SkCanvas* canvas, const gfx::Rect& rect) | |
| 38 OVERRIDE; | |
| 39 virtual void PaintThumb(SkCanvas* canvas, const gfx::Rect& rect) | |
| 40 OVERRIDE; | |
| 41 | |
| 42 private: | |
| 43 WebToCCScrollbarThemePainterAdapter( | |
| 44 const WebScrollbarThemePainter& webPainter) | |
| 45 : m_painter(webPainter) {} | |
| 46 | |
| 47 WebScrollbarThemePainter m_painter; | |
| 48 }; | |
| 49 | |
| 50 } // namespace WebKit | |
| 51 | |
| 52 #endif // WEBKIT_COMPOSITOR_BINDINGS_WEB_TO_CCSCROLLBAR_THEME_PAINTER_ADAPTER_H _ | |
| OLD | NEW |