Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(567)

Unified Diff: webkit/plugins/ppapi/plugin_delegate.h

Issue 11053003: Migrate Graphics2D to new design. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/plugins/ppapi/mock_plugin_delegate.cc ('k') | webkit/plugins/ppapi/plugin_module.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/plugin_delegate.h
diff --git a/webkit/plugins/ppapi/plugin_delegate.h b/webkit/plugins/ppapi/plugin_delegate.h
index 5995febb071077301ed0198be0dd4e36e468865f..58c65d46f074d28ad2097c8e69b41f0ba367c122 100644
--- a/webkit/plugins/ppapi/plugin_delegate.h
+++ b/webkit/plugins/ppapi/plugin_delegate.h
@@ -72,6 +72,7 @@ class ResourceCreationAPI;
} // namespace ppapi
namespace WebKit {
+typedef SkCanvas WebCanvas;
class WebGamepads;
class WebPlugin;
struct WebCompositionUnderline;
@@ -92,6 +93,8 @@ class FullscreenContainer;
class PluginInstance;
class PluginModule;
class PPB_Broker_Impl;
+class PPB_Flash_Menu_Impl;
+class PPB_ImageData_Impl;
class PPB_TCPSocket_Private_Impl;
class PPB_UDPSocket_Private_Impl;
@@ -167,6 +170,33 @@ class PluginDelegate {
virtual TransportDIB* GetTransportDIB() const = 0;
};
+ class PlatformGraphics2D {
+ public:
+ virtual bool ReadImageData(PP_Resource image, const PP_Point* top_left) = 0;
+
+ // Assciates this device with the given plugin instance. You can pass NULL
+ // to clear the existing device. Returns true on success. In this case, a
+ // repaint of the page will also be scheduled. Failure means that the device
+ // is already bound to a different instance, and nothing will happen.
+ virtual bool BindToInstance(PluginInstance* new_instance) = 0;
+
+ // Paints the current backing store to the web page.
+ virtual void Paint(WebKit::WebCanvas* canvas,
+ const gfx::Rect& plugin_rect,
+ const gfx::Rect& paint_rect) = 0;
+
+ // Notifications about the view's progress painting. See PluginInstance.
+ // These messages are used to send Flush callbacks to the plugin.
+ virtual void ViewWillInitiatePaint() = 0;
+ virtual void ViewInitiatedPaint() = 0;
+ virtual void ViewFlushedPaint() = 0;
+
+ virtual bool IsAlwaysOpaque() const = 0;
+ virtual void SetScale(float scale) = 0;
+ virtual float GetScale() const = 0;
+ virtual PPB_ImageData_Impl* ImageData() = 0;
+ };
+
class PlatformContext3D {
public:
virtual ~PlatformContext3D() {}
@@ -358,6 +388,10 @@ class PluginDelegate {
// The caller will own the pointer returned from this.
virtual PlatformImage2D* CreateImage2D(int width, int height) = 0;
+ // Returns the internal PlatformGraphics2D implementation.
+ virtual PlatformGraphics2D* GetGraphics2D(PluginInstance* instance,
+ PP_Resource graphics_2d) = 0;
+
// The caller will own the pointer returned from this.
virtual PlatformContext3D* CreateContext3D() = 0;
« no previous file with comments | « webkit/plugins/ppapi/mock_plugin_delegate.cc ('k') | webkit/plugins/ppapi/plugin_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698