diff options
Diffstat (limited to 'webkit/glue/plugins/pepper_plugin_delegate.h')
-rw-r--r-- | webkit/glue/plugins/pepper_plugin_delegate.h | 49 |
1 files changed, 36 insertions, 13 deletions
diff --git a/webkit/glue/plugins/pepper_plugin_delegate.h b/webkit/glue/plugins/pepper_plugin_delegate.h index 7738fbf..5e6f9a2 100644 --- a/webkit/glue/plugins/pepper_plugin_delegate.h +++ b/webkit/glue/plugins/pepper_plugin_delegate.h @@ -13,10 +13,11 @@ #include "base/shared_memory.h" #include "base/sync_socket.h" #include "base/task.h" +#include "gfx/size.h" #include "googleurl/src/gurl.h" -#include "third_party/ppapi/c/pp_completion_callback.h" -#include "third_party/ppapi/c/pp_errors.h" -#include "third_party/ppapi/c/pp_stdint.h" +#include "ppapi/c/pp_completion_callback.h" +#include "ppapi/c/pp_errors.h" +#include "ppapi/c/pp_stdint.h" #include "webkit/fileapi/file_system_types.h" #include "webkit/glue/plugins/pepper_dir_contents.h" @@ -37,7 +38,9 @@ class Rect; } namespace gpu { -class CommandBuffer; +namespace gles2 { +class GLES2Implementation; +} } namespace skia { @@ -75,9 +78,10 @@ class PluginDelegate { virtual skia::PlatformCanvas* Map() = 0; // Returns the platform-specific shared memory handle of the data backing - // this image. This is used by NativeClient to send the image to the - // out-of-process plugin. Returns 0 on failure. - virtual intptr_t GetSharedMemoryHandle() const = 0; + // this image. This is used by PPAPI proxying to send the image to the + // out-of-process plugin. On success, the size in bytes will be placed into + // |*bytes_count|. Returns 0 on failure. + virtual intptr_t GetSharedMemoryHandle(uint32* byte_count) const = 0; virtual TransportDIB* GetTransportDIB() const = 0; }; @@ -87,14 +91,30 @@ class PluginDelegate { virtual ~PlatformContext3D() {} // Initialize the context. - virtual bool Init(const gfx::Rect& position, const gfx::Rect& clip) = 0; + virtual bool Init() = 0; + + // Present the rendered frame to the compositor. + virtual bool SwapBuffers() = 0; + + // Get the last EGL error. + virtual unsigned GetError() = 0; - // This call will return the address of the command buffer object that is - // constructed in Initialize() and is valid until this context is destroyed. - virtual gpu::CommandBuffer* GetCommandBuffer() = 0; + // Resize the backing texture used as a back buffer by OpenGL. + virtual void ResizeBackingTexture(const gfx::Size& size) = 0; - // Sets the function to be called on repaint. - virtual void SetNotifyRepaintTask(Task* task) = 0; + // Set an optional callback that will be invoked when the side effects of + // a SwapBuffers call become visible to the compositor. Takes ownership + // of the callback. + virtual void SetSwapBuffersCallback(Callback0::Type* callback) = 0; + + // If the plugin instance is backed by an OpenGL, return its ID in the + // compositors namespace. Otherwise return 0. Returns 0 by default. + virtual unsigned GetBackingTextureId() = 0; + + // This call will return the address of the GLES2 implementation for this + // context that is constructed in Initialize() and is valid until this + // context is destroyed. + virtual gpu::gles2::GLES2Implementation* GetGLES2Implementation() = 0; }; class PlatformAudio { @@ -198,6 +218,9 @@ class PluginDelegate { virtual bool Rename(const FilePath& file_path, const FilePath& new_file_path, fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; + virtual bool ReadDirectory( + const FilePath& directory_path, + fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; virtual base::PlatformFileError OpenModuleLocalFile( const std::string& module_name, |