summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/resource_creation_proxy.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ppapi/proxy/resource_creation_proxy.cc')
-rw-r--r--ppapi/proxy/resource_creation_proxy.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/ppapi/proxy/resource_creation_proxy.cc b/ppapi/proxy/resource_creation_proxy.cc
index 0a0c791..f3ee425 100644
--- a/ppapi/proxy/resource_creation_proxy.cc
+++ b/ppapi/proxy/resource_creation_proxy.cc
@@ -45,12 +45,17 @@ namespace ppapi {
namespace proxy {
ResourceCreationProxy::ResourceCreationProxy(Dispatcher* dispatcher)
- : dispatcher_(dispatcher) {
+ : InterfaceProxy(dispatcher) {
}
ResourceCreationProxy::~ResourceCreationProxy() {
}
+// static
+InterfaceProxy* ResourceCreationProxy::Create(Dispatcher* dispatcher) {
+ return new ResourceCreationProxy(dispatcher);
+}
+
ResourceCreationAPI* ResourceCreationProxy::AsResourceCreationAPI() {
return this;
}
@@ -337,7 +342,7 @@ PP_Resource ResourceCreationProxy::CreateWheelInputEvent(
}
bool ResourceCreationProxy::Send(IPC::Message* msg) {
- return dispatcher_->Send(msg);
+ return dispatcher()->Send(msg);
}
bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) {
@@ -395,14 +400,14 @@ void ResourceCreationProxy::OnMsgCreateImageData(
// Get the shared memory handle.
const PPB_ImageDataTrusted* trusted =
reinterpret_cast<const PPB_ImageDataTrusted*>(
- dispatcher_->GetLocalInterface(PPB_IMAGEDATA_TRUSTED_INTERFACE));
+ dispatcher()->local_get_interface()(PPB_IMAGEDATA_TRUSTED_INTERFACE));
uint32_t byte_count = 0;
if (trusted) {
int32_t handle;
if (trusted->GetSharedMemory(resource, &handle, &byte_count) == PP_OK) {
#if defined(OS_WIN)
ImageHandle ih = ImageData::HandleFromInt(handle);
- *result_image_handle = dispatcher_->ShareHandleWithRemote(ih, false);
+ *result_image_handle = dispatcher()->ShareHandleWithRemote(ih, false);
#else
*result_image_handle = ImageData::HandleFromInt(handle);
#endif