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

Unified Diff: ppapi/proxy/resource_creation_proxy.cc

Issue 7874002: This patch tries to remove most of the manual registration for Pepper interfaces, and replaces it... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 months 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 | « ppapi/proxy/resource_creation_proxy.h ('k') | ppapi/thunk/enter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/resource_creation_proxy.cc
===================================================================
--- ppapi/proxy/resource_creation_proxy.cc (revision 100758)
+++ ppapi/proxy/resource_creation_proxy.cc (working copy)
@@ -45,12 +45,17 @@
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 @@
}
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 @@
// 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
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.h ('k') | ppapi/thunk/enter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698