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

Unified Diff: content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc

Issue 11359097: Refactored the PPB_Flash_File_ModuleLocal/FileRef to the new ppapi resource model (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years 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
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 3e074c41db1ab0ffb27500bc31a3d0d07cd4392d..4dcb18df87c4119203aaa92d55a12c95cfd550c8 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"
@@ -20,8 +20,14 @@ BrowserPpapiHost* BrowserPpapiHost::CreateExternalPluginProcess(
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 so it doesn't matter.
+ 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);
browser_ppapi_host->set_plugin_process_handle(plugin_child_process);
channel->AddFilter(
@@ -37,9 +43,13 @@ 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)
: ppapi_host_(sender, permissions),
- plugin_process_handle_(base::kNullProcessHandle) {
+ plugin_process_handle_(base::kNullProcessHandle),
+ plugin_name_(plugin_name),
+ profile_data_directory_(profile_data_directory) {
message_filter_ = new HostMessageFilter(&ppapi_host_);
ppapi_host_.AddHostFactoryFilter(scoped_ptr<ppapi::host::HostFactory>(
new ContentBrowserPepperHostFactory(this)));
@@ -80,6 +90,14 @@ bool BrowserPpapiHostImpl::GetRenderViewIDsForInstance(
return true;
}
+const std::string& BrowserPpapiHostImpl::GetPluginName() {
+ return plugin_name_;
+}
+
+const FilePath& BrowserPpapiHostImpl::GetProfileDataDirectory() {
+ return profile_data_directory_;
+}
+
void BrowserPpapiHostImpl::AddInstanceForView(PP_Instance instance,
int render_process_id,
int render_view_id) {

Powered by Google App Engine
This is Rietveld 408576698