| Index: webkit/tools/test_shell/webwidget_host.h
|
| ===================================================================
|
| --- webkit/tools/test_shell/webwidget_host.h (revision 73503)
|
| +++ webkit/tools/test_shell/webwidget_host.h (working copy)
|
| @@ -11,6 +11,7 @@
|
| #include "gfx/native_widget_types.h"
|
| #include "gfx/rect.h"
|
| #include "skia/ext/platform_canvas.h"
|
| +#include "webkit/tools/test_shell/simple_webpaintsurface_impl.h"
|
|
|
| namespace gfx {
|
| class Size;
|
| @@ -31,7 +32,7 @@
|
| #endif
|
|
|
| // This class is a simple NativeView-based host for a WebWidget
|
| -class WebWidgetHost {
|
| +class WebWidgetHost : public SimpleWebPaintSurfaceImpl::Delegate {
|
| public:
|
| // The new instance is deleted once the associated NativeView is destroyed.
|
| // The newly created window should be resized after it is created, using the
|
| @@ -46,8 +47,11 @@
|
| gfx::NativeView view_handle() const { return view_; }
|
| WebKit::WebWidget* webwidget() const { return webwidget_; }
|
|
|
| + WebKit::WebPaintSurface* GetPaintSurface();
|
| +#if !WEBKIT_USING_PAINTSURFACE
|
| void DidInvalidateRect(const gfx::Rect& rect);
|
| void DidScrollRect(int dx, int dy, const gfx::Rect& clip_rect);
|
| +#endif
|
| void ScheduleComposite();
|
| void ScheduleAnimation();
|
| #if defined(OS_WIN)
|
| @@ -126,10 +130,16 @@
|
| #endif
|
| }
|
|
|
| + // SimpleWebPaintSurfaceImpl::Delegate methods:
|
| + virtual void DidModifyPaintSurface(const gfx::Rect& bounds);
|
| +
|
| gfx::NativeView view_;
|
| WebKit::WebWidget* webwidget_;
|
| scoped_ptr<skia::PlatformCanvas> canvas_;
|
|
|
| + scoped_ptr<SimpleWebPaintSurfaceImpl> paint_surface_;
|
| + scoped_ptr<SimpleWebPaintSurfaceImpl> pending_paint_surface_;
|
| +
|
| // specifies the portion of the webwidget that needs painting
|
| gfx::Rect paint_rect_;
|
|
|
|
|