Index: content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc |
diff --git a/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc b/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc |
index c654a77742767f142a9a5f1749691cf68c5a4ab1..24e0bfa9e89e0e427753433f5ce93e57c1c83fdb 100644 |
--- a/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc |
+++ b/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc |
@@ -3,8 +3,8 @@ |
// found in the LICENSE file. |
#include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h" |
-#include "content/browser/renderer_host/pepper/pepper_message_filter.h" |
+#include "content/browser/renderer_host/pepper/pepper_message_filter.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/browser/render_view_host.h" |
#include "ipc/ipc_message_macros.h" |
@@ -16,12 +16,19 @@ BrowserPpapiHost* BrowserPpapiHost::CreateExternalPluginProcess( |
IPC::Sender* sender, |
ppapi::PpapiPermissions permissions, |
base::ProcessHandle plugin_child_process, |
+ int plugin_child_process_id, |
IPC::ChannelProxy* channel, |
net::HostResolver* host_resolver, |
int render_process_id, |
int render_view_id) { |
+ // TODO(raymes): Figure out how to plumb plugin_name and |
+ // profile_data_directory through for NaCl. They are currently only needed for |
+ // PPB_Flash_File interfaces and so it doesn't matter. |
yzshen1
2012/11/21 00:38:59
nit: please remove 'and'.
raymes
2012/11/21 22:44:53
Done.
|
+ std::string plugin_name; |
+ FilePath profile_data_directory; |
BrowserPpapiHostImpl* browser_ppapi_host = |
- new BrowserPpapiHostImpl(sender, permissions); |
+ new BrowserPpapiHostImpl(sender, permissions, plugin_name, |
+ profile_data_directory, plugin_child_process_id); |
browser_ppapi_host->set_plugin_process_handle(plugin_child_process); |
channel->AddFilter( |
@@ -36,9 +43,15 @@ BrowserPpapiHost* BrowserPpapiHost::CreateExternalPluginProcess( |
BrowserPpapiHostImpl::BrowserPpapiHostImpl( |
IPC::Sender* sender, |
- const ppapi::PpapiPermissions& permissions) |
+ const ppapi::PpapiPermissions& permissions, |
+ const std::string& plugin_name, |
+ const FilePath& profile_data_directory, |
+ int plugin_process_id) |
: ppapi_host_(sender, permissions), |
- plugin_process_handle_(base::kNullProcessHandle) { |
+ plugin_process_handle_(base::kNullProcessHandle), |
+ plugin_name_(plugin_name), |
+ profile_data_directory_(profile_data_directory), |
+ plugin_process_id_(plugin_process_id) { |
message_filter_ = new HostMessageFilter(&ppapi_host_); |
ppapi_host_.AddHostFactoryFilter(scoped_ptr<ppapi::host::HostFactory>( |
new ContentBrowserPepperHostFactory(this))); |
@@ -79,6 +92,18 @@ bool BrowserPpapiHostImpl::GetRenderViewIDsForInstance( |
return true; |
} |
+const std::string& BrowserPpapiHostImpl::GetPluginName() { |
+ return plugin_name_; |
+} |
+ |
+const FilePath& BrowserPpapiHostImpl::GetProfileDataDirectory() { |
+ return profile_data_directory_; |
+} |
+ |
+int BrowserPpapiHostImpl::GetPluginProcessID() { |
+ return plugin_process_id_; |
+} |
+ |
void BrowserPpapiHostImpl::AddInstanceForView(PP_Instance instance, |
int render_process_id, |
int render_view_id) { |