summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins/pepper_image_data.h
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue/plugins/pepper_image_data.h')
-rw-r--r--webkit/glue/plugins/pepper_image_data.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/webkit/glue/plugins/pepper_image_data.h b/webkit/glue/plugins/pepper_image_data.h
index 7652b80..f2a110b 100644
--- a/webkit/glue/plugins/pepper_image_data.h
+++ b/webkit/glue/plugins/pepper_image_data.h
@@ -15,6 +15,7 @@ namespace skia {
class PlatformCanvas;
}
+struct PPB_ImageDataTrusted;
class SkBitmap;
namespace pepper {
@@ -37,12 +38,17 @@ class ImageData : public Resource {
// invalid or not mapped. See ImageDataAutoMapper below.
bool is_mapped() const { return !!mapped_canvas_.get(); }
+ PluginDelegate::PlatformImage2D* platform_image() const {
+ return platform_image_.get();
+ }
+
// Returns a pointer to the interface implementing PPB_ImageData that is
// exposed to the plugin.
static const PPB_ImageData* GetInterface();
+ static const PPB_ImageDataTrusted* GetTrustedInterface();
// Resource overrides.
- ImageData* AsImageData() { return this; }
+ virtual ImageData* AsImageData() { return this; }
// PPB_ImageData implementation.
bool Init(PP_ImageDataFormat format,
@@ -52,6 +58,9 @@ class ImageData : public Resource {
void* Map();
void Unmap();
+ // PPB_ImageDataTrusted implementation.
+ uint64 GetNativeMemoryHandle() const;
+
// The mapped bitmap and canvas will be NULL if the image is not mapped.
skia::PlatformCanvas* mapped_canvas() const { return mapped_canvas_.get(); }
const SkBitmap* GetMappedBitmap() const;