| Index: trunk/src/content/browser/renderer_host/pepper/pepper_renderer_connection.cc
|
| ===================================================================
|
| --- trunk/src/content/browser/renderer_host/pepper/pepper_renderer_connection.cc (revision 221543)
|
| +++ trunk/src/content/browser/renderer_host/pepper/pepper_renderer_connection.cc (working copy)
|
| @@ -16,7 +16,6 @@
|
| #include "ppapi/host/resource_host.h"
|
| #include "ppapi/proxy/ppapi_message_utils.h"
|
| #include "ppapi/proxy/ppapi_messages.h"
|
| -#include "ppapi/proxy/ppapi_message_utils.h"
|
| #include "ppapi/proxy/resource_message_params.h"
|
|
|
| namespace content {
|
| @@ -74,6 +73,8 @@
|
| IPC_BEGIN_MESSAGE_MAP_EX(PepperRendererConnection, msg, *message_was_ok)
|
| IPC_MESSAGE_HANDLER(PpapiHostMsg_CreateResourceHostsFromHost,
|
| OnMsgCreateResourceHostsFromHost)
|
| + IPC_MESSAGE_HANDLER(PpapiHostMsg_FileRef_GetInfoForRenderer,
|
| + OnMsgFileRefGetInfoForRenderer)
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_DidCreateInProcessInstance,
|
| OnMsgDidCreateInProcessInstance)
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_DidDeleteInProcessInstance,
|
| @@ -128,6 +129,40 @@
|
| routing_id, params.sequence(), pending_resource_host_ids));
|
| }
|
|
|
| +void PepperRendererConnection::OnMsgFileRefGetInfoForRenderer(
|
| + int routing_id,
|
| + int child_process_id,
|
| + int32_t sequence,
|
| + const std::vector<PP_Resource>& resources) {
|
| + std::vector<PP_Resource> out_resources;
|
| + std::vector<PP_FileSystemType> fs_types;
|
| + std::vector<std::string> file_system_url_specs;
|
| + std::vector<base::FilePath> external_paths;
|
| +
|
| + BrowserPpapiHostImpl* host = GetHostForChildProcess(child_process_id);
|
| + if (host) {
|
| + for (size_t i = 0; i < resources.size(); ++i) {
|
| + ppapi::host::ResourceHost* resource_host =
|
| + host->GetPpapiHost()->GetResourceHost(resources[i]);
|
| + if (resource_host && resource_host->IsFileRefHost()) {
|
| + PepperFileRefHost* file_ref_host =
|
| + static_cast<PepperFileRefHost*>(resource_host);
|
| + out_resources.push_back(resources[i]);
|
| + fs_types.push_back(file_ref_host->GetFileSystemType());
|
| + file_system_url_specs.push_back(file_ref_host->GetFileSystemURLSpec());
|
| + external_paths.push_back(file_ref_host->GetExternalPath());
|
| + }
|
| + }
|
| + }
|
| + Send(new PpapiHostMsg_FileRef_GetInfoForRendererReply(
|
| + routing_id,
|
| + sequence,
|
| + out_resources,
|
| + fs_types,
|
| + file_system_url_specs,
|
| + external_paths));
|
| +}
|
| +
|
| void PepperRendererConnection::OnMsgDidCreateInProcessInstance(
|
| PP_Instance instance,
|
| const PepperRendererInstanceData& instance_data) {
|
|
|