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

Unified Diff: ppapi/proxy/ppb_image_data_proxy.h

Issue 8790009: Regularize how ImageData and Graphics2D are created. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment Created 9 years 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
Index: ppapi/proxy/ppb_image_data_proxy.h
diff --git a/ppapi/proxy/ppb_image_data_proxy.h b/ppapi/proxy/ppb_image_data_proxy.h
index bf9b33b09cca48ca7fed35c482e8e53e1dda3100..9250948d4bfcb4af90a49ed1a130c34dfff7a0e4 100644
--- a/ppapi/proxy/ppb_image_data_proxy.h
+++ b/ppapi/proxy/ppb_image_data_proxy.h
@@ -32,6 +32,8 @@ class HostResource;
namespace proxy {
+// The proxied image data resource. Unlike most resources, this needs to be
+// public in the header since a number of other resources need to access it.
class ImageData : public ppapi::Resource,
public ppapi::thunk::PPB_ImageData_API,
public ppapi::ImageDataImpl {
@@ -68,6 +70,34 @@ class ImageData : public ppapi::Resource,
DISALLOW_COPY_AND_ASSIGN(ImageData);
};
+class PPB_ImageData_Proxy : public InterfaceProxy {
+ public:
+ PPB_ImageData_Proxy(Dispatcher* dispatcher);
+ virtual ~PPB_ImageData_Proxy();
+
+ static PP_Resource CreateProxyResource(PP_Instance instance,
+ PP_ImageDataFormat format,
+ const PP_Size& size,
+ PP_Bool init_to_zero);
+
+ // InterfaceProxy implementation.
+ virtual bool OnMessageReceived(const IPC::Message& msg);
+
+ static const ApiID kApiID = API_ID_PPB_IMAGE_DATA;
+
+ private:
+ // Message handler.
+ void OnHostMsgCreate(PP_Instance instance,
+ int32_t format,
+ const PP_Size& size,
+ PP_Bool init_to_zero,
+ HostResource* result,
+ std::string* image_data_desc,
+ ImageHandle* result_image_handle);
+
+ DISALLOW_COPY_AND_ASSIGN(PPB_ImageData_Proxy);
+};
+
} // namespace proxy
} // namespace ppapi

Powered by Google App Engine
This is Rietveld 408576698