diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-10 01:16:11 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-10 01:16:11 +0000 |
commit | 709a847ee12e1380df59db8cd3c972ec4f9c674e (patch) | |
tree | 48217fd87c7e1fe15afdd90db26a925f7db28a1b /ppapi/proxy | |
parent | f30e74751217091c0b6050080f46cd6eb4914226 (diff) | |
download | chromium_src-709a847ee12e1380df59db8cd3c972ec4f9c674e.zip chromium_src-709a847ee12e1380df59db8cd3c972ec4f9c674e.tar.gz chromium_src-709a847ee12e1380df59db8cd3c972ec4f9c674e.tar.bz2 |
Implement a new process type for running PPAPI plugins. The process itself is
quite simple and just sets up the PPAPI dispatcher and loads the library.
There is a new command line switch --ppapi-out-of-process which runs PPAPI
plugins out of process using the new code path. There is some logic in
RenderView and PepperPluginModule for setting up this connection, but it should
be straightforward.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/3915002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65614 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy')
-rw-r--r-- | ppapi/proxy/dispatcher.cc | 3 | ||||
-rw-r--r-- | ppapi/proxy/plugin_dispatcher.cc | 7 | ||||
-rw-r--r-- | ppapi/proxy/ppapi_param_traits.h | 2 | ||||
-rw-r--r-- | ppapi/proxy/ppb_image_data_proxy.cc | 8 | ||||
-rw-r--r-- | ppapi/proxy/ppb_url_request_info_proxy.h | 2 | ||||
-rw-r--r-- | ppapi/proxy/ppp_instance_proxy.cc | 2 | ||||
-rw-r--r-- | ppapi/proxy/serialized_var.cc | 2 |
7 files changed, 16 insertions, 10 deletions
diff --git a/ppapi/proxy/dispatcher.cc b/ppapi/proxy/dispatcher.cc index 3a0f5a4..476f403 100644 --- a/ppapi/proxy/dispatcher.cc +++ b/ppapi/proxy/dispatcher.cc @@ -8,6 +8,7 @@ #include <map> +#include "base/compiler_specific.h" #include "base/logging.h" #include "ipc/ipc_message.h" #include "ipc/ipc_sync_channel.h" @@ -45,7 +46,7 @@ Dispatcher::Dispatcher(GetInterfaceFunc local_get_interface) disallow_trusted_interfaces_(true), local_get_interface_(local_get_interface), declared_supported_remote_interfaces_(false), - callback_tracker_(this) { + callback_tracker_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { memset(id_to_proxy_, 0, static_cast<int>(INTERFACE_ID_COUNT) * sizeof(InterfaceProxy*)); } diff --git a/ppapi/proxy/plugin_dispatcher.cc b/ppapi/proxy/plugin_dispatcher.cc index 1997dc4..085c15c 100644 --- a/ppapi/proxy/plugin_dispatcher.cc +++ b/ppapi/proxy/plugin_dispatcher.cc @@ -6,6 +6,7 @@ #include <map> +#include "base/compiler_specific.h" #include "base/logging.h" #include "ipc/ipc_message.h" #include "ipc/ipc_sync_channel.h" @@ -35,8 +36,10 @@ PluginDispatcher::PluginDispatcher(GetInterfaceFunc get_interface, : Dispatcher(get_interface), init_module_(init_module), shutdown_module_(shutdown_module), - plugin_resource_tracker_(new PluginResourceTracker(this)), - plugin_var_tracker_(new PluginVarTracker(this)) { + plugin_resource_tracker_(new PluginResourceTracker( + ALLOW_THIS_IN_INITIALIZER_LIST(this))), + plugin_var_tracker_(new PluginVarTracker( + ALLOW_THIS_IN_INITIALIZER_LIST(this))) { SetSerializationRules( new PluginVarSerializationRules(plugin_var_tracker_.get())); diff --git a/ppapi/proxy/ppapi_param_traits.h b/ppapi/proxy/ppapi_param_traits.h index 0c13ff5..2bb2a7a 100644 --- a/ppapi/proxy/ppapi_param_traits.h +++ b/ppapi/proxy/ppapi_param_traits.h @@ -17,7 +17,7 @@ struct PP_ObjectProperty; namespace pp { namespace proxy { struct PPBFont_DrawTextAt_Params; -class SerializedFontDescription; +struct SerializedFontDescription; class SerializedVar; } } diff --git a/ppapi/proxy/ppb_image_data_proxy.cc b/ppapi/proxy/ppb_image_data_proxy.cc index 27d78726..54032ee 100644 --- a/ppapi/proxy/ppb_image_data_proxy.cc +++ b/ppapi/proxy/ppb_image_data_proxy.cc @@ -70,7 +70,8 @@ void* ImageData::Map() { mapped_data_ = address; return address; #else - #error write this + NOTIMPLEMENTED(); + return NULL; #endif } @@ -79,7 +80,7 @@ void ImageData::Unmap() { if (mapped_data_) shmdt(mapped_data_); #else - #error write this + NOTIMPLEMENTED(); #endif mapped_data_ = NULL; } @@ -225,8 +226,9 @@ void PPB_ImageData_Proxy::OnMsgCreate(PP_Module module, const PPB_ImageDataTrusted* trusted = reinterpret_cast<const PPB_ImageDataTrusted*>( dispatcher()->GetLocalInterface(PPB_IMAGEDATA_TRUSTED_INTERFACE)); + uint32_t byte_count = 0; if (trusted) - *result_shm_handle = trusted->GetNativeMemoryHandle(*result); + *result_shm_handle = trusted->GetNativeMemoryHandle(*result, &byte_count); } } diff --git a/ppapi/proxy/ppb_url_request_info_proxy.h b/ppapi/proxy/ppb_url_request_info_proxy.h index c0f98e9..6acfd75 100644 --- a/ppapi/proxy/ppb_url_request_info_proxy.h +++ b/ppapi/proxy/ppb_url_request_info_proxy.h @@ -39,7 +39,7 @@ class PPB_URLRequestInfo_Proxy : public InterfaceProxy { int32_t property, SerializedVarReceiveInput value); void OnMsgAppendDataToBody(PP_Resource request, - const std::string& request); + const std::string& data); void OnMsgAppendFileToBody(PP_Resource request, PP_Resource file_ref, int64_t start_offset, diff --git a/ppapi/proxy/ppp_instance_proxy.cc b/ppapi/proxy/ppp_instance_proxy.cc index ccc6803..8551d2b 100644 --- a/ppapi/proxy/ppp_instance_proxy.cc +++ b/ppapi/proxy/ppp_instance_proxy.cc @@ -77,7 +77,7 @@ PP_Var GetInstanceObject(PP_Instance instance) { Dispatcher* dispatcher = HostDispatcher::GetForInstance(instance); ReceiveSerializedVarReturnValue result; dispatcher->Send(new PpapiMsg_PPPInstance_GetInstanceObject( - instance, INTERFACE_ID_PPP_INSTANCE, &result)); + INTERFACE_ID_PPP_INSTANCE, instance, &result)); return result.Return(dispatcher); } diff --git a/ppapi/proxy/serialized_var.cc b/ppapi/proxy/serialized_var.cc index ef968ea..a5356c5 100644 --- a/ppapi/proxy/serialized_var.cc +++ b/ppapi/proxy/serialized_var.cc @@ -123,7 +123,7 @@ void SerializedVar::Inner::WriteToMessage(IPC::Message* m) const { // just serialized. break; case PP_VARTYPE_BOOL: - m->WriteBool(var_.value.as_bool); + m->WriteBool(PPBoolToBool(var_.value.as_bool)); break; case PP_VARTYPE_INT32: m->WriteInt(var_.value.as_int); |