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

Unified Diff: content/browser/ppapi_plugin_process_host.cc

Issue 10387195: Open pepper files directly in browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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
Index: content/browser/ppapi_plugin_process_host.cc
===================================================================
--- content/browser/ppapi_plugin_process_host.cc (revision 140544)
+++ content/browser/ppapi_plugin_process_host.cc (working copy)
@@ -74,8 +74,8 @@
const content::PepperPluginInfo& info,
const FilePath& profile_data_directory,
net::HostResolver* host_resolver) {
- PpapiPluginProcessHost* plugin_host =
- new PpapiPluginProcessHost(profile_data_directory, host_resolver);
+ PpapiPluginProcessHost* plugin_host = new PpapiPluginProcessHost(
+ info.name, profile_data_directory, host_resolver);
if (plugin_host->Init(info))
return plugin_host;
@@ -112,16 +112,23 @@
}
PpapiPluginProcessHost::PpapiPluginProcessHost(
+ const std::string& plugin_name,
const FilePath& profile_data_directory,
net::HostResolver* host_resolver)
- : filter_(new PepperMessageFilter(PepperMessageFilter::PLUGIN,
- host_resolver)),
- network_observer_(new PluginNetworkObserver(this)),
+ : network_observer_(new PluginNetworkObserver(this)),
profile_data_directory_(profile_data_directory),
is_broker_(false) {
process_.reset(new BrowserChildProcessHostImpl(
content::PROCESS_TYPE_PPAPI_PLUGIN, this));
+
+ filter_ = new PepperMessageFilter(
+ PepperMessageFilter::PLUGIN, host_resolver);
+
+ file_filter_ = new PepperTrustedFileMessageFilter(
+ process_->GetData().id, plugin_name, profile_data_directory);
+
process_->GetHost()->AddFilter(filter_.get());
+ process_->GetHost()->AddFilter(file_filter_.get());
}
PpapiPluginProcessHost::PpapiPluginProcessHost()

Powered by Google App Engine
This is Rietveld 408576698