| Index: webkit/plugins/ppapi/ppb_graphics_2d_impl.h
|
| ===================================================================
|
| --- webkit/plugins/ppapi/ppb_graphics_2d_impl.h (revision 0)
|
| +++ webkit/plugins/ppapi/ppb_graphics_2d_impl.h (working copy)
|
| @@ -2,8 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef WEBKIT_GLUE_PLUGINS_PEPPER_GRAPHICS_2D_H_
|
| -#define WEBKIT_GLUE_PLUGINS_PEPPER_GRAPHICS_2D_H_
|
| +#ifndef WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_2D_IMPL_H_
|
| +#define WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_2D_IMPL_H_
|
|
|
| #include <vector>
|
|
|
| @@ -11,7 +11,7 @@
|
| #include "ppapi/c/pp_completion_callback.h"
|
| #include "ppapi/c/ppb_graphics_2d.h"
|
| #include "third_party/WebKit/WebKit/chromium/public/WebCanvas.h"
|
| -#include "webkit/glue/plugins/pepper_resource.h"
|
| +#include "webkit/plugins/ppapi/resource.h"
|
|
|
| struct PPB_Graphics2D;
|
|
|
| @@ -19,16 +19,17 @@
|
| class Rect;
|
| }
|
|
|
| -namespace pepper {
|
| +namespace webkit {
|
| +namespace ppapi {
|
|
|
| -class ImageData;
|
| +class PPB_ImageData_Impl;
|
| class PluginInstance;
|
| class PluginModule;
|
|
|
| -class Graphics2D : public Resource {
|
| +class PPB_Graphics2D_Impl : public Resource {
|
| public:
|
| - Graphics2D(PluginModule* module);
|
| - virtual ~Graphics2D();
|
| + PPB_Graphics2D_Impl(PluginModule* module);
|
| + virtual ~PPB_Graphics2D_Impl();
|
|
|
| // Returns a pointer to the interface implementing PPB_ImageData that is
|
| // exposed to the plugin.
|
| @@ -39,7 +40,7 @@
|
| bool is_always_opaque() const { return is_always_opaque_; }
|
|
|
| // Resource override.
|
| - virtual Graphics2D* AsGraphics2D() { return this; }
|
| + virtual PPB_Graphics2D_Impl* AsPPB_Graphics2D_Impl();
|
|
|
| // PPB_Graphics2D functions.
|
| PP_Bool Describe(PP_Size* size, PP_Bool* is_always_opaque);
|
| @@ -69,7 +70,7 @@
|
| void ViewInitiatedPaint();
|
| void ViewFlushedPaint();
|
|
|
| - ImageData* image_data() { return image_data_.get(); }
|
| + PPB_ImageData_Impl* image_data() { return image_data_.get(); }
|
|
|
| private:
|
| // Tracks a call to flush that requires a callback.
|
| @@ -106,13 +107,13 @@
|
| // rect argument will be filled by each function with the area affected by
|
| // the update that requires invalidation. If there were no pixels changed,
|
| // this rect can be untouched.
|
| - void ExecutePaintImageData(ImageData* image,
|
| + void ExecutePaintImageData(PPB_ImageData_Impl* image,
|
| int x, int y,
|
| const gfx::Rect& src_rect,
|
| gfx::Rect* invalidated_rect);
|
| void ExecuteScroll(const gfx::Rect& clip, int dx, int dy,
|
| gfx::Rect* invalidated_rect);
|
| - void ExecuteReplaceContents(ImageData* image,
|
| + void ExecuteReplaceContents(PPB_ImageData_Impl* image,
|
| gfx::Rect* invalidated_rect);
|
|
|
| // Schedules the offscreen callback to be fired at a future time. This
|
| @@ -126,7 +127,7 @@
|
| // Returns true if there is any type of flush callback pending.
|
| bool HasPendingFlush() const;
|
|
|
| - scoped_refptr<ImageData> image_data_;
|
| + scoped_refptr<PPB_ImageData_Impl> image_data_;
|
|
|
| // Non-owning pointer to the plugin instance this context is currently bound
|
| // to, if any. If the context is currently unbound, this will be NULL.
|
| @@ -172,9 +173,10 @@
|
| // This allows us to do more optimized painting in some cases.
|
| bool is_always_opaque_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(Graphics2D);
|
| + DISALLOW_COPY_AND_ASSIGN(PPB_Graphics2D_Impl);
|
| };
|
|
|
| -} // namespace pepper
|
| +} // namespace ppapi
|
| +} // namespace webkit
|
|
|
| -#endif // WEBKIT_GLUE_PLUGINS_PEPPER_GRAPHICS_2D_H_
|
| +#endif // WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_2D_IMPL_H_
|
|
|