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

Unified Diff: content/browser/plugin_service_impl.cc

Issue 10387195: Open pepper files directly in browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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/plugin_service_impl.cc
===================================================================
--- content/browser/plugin_service_impl.cc (revision 138610)
+++ content/browser/plugin_service_impl.cc (working copy)
@@ -242,12 +242,14 @@
}
PpapiPluginProcessHost* PluginServiceImpl::FindPpapiPluginProcess(
- const FilePath& plugin_path) {
+ const FilePath& plugin_path,
+ const FilePath& profile_data_directory_path) {
for (PpapiPluginProcessHostIterator iter; !iter.Done(); ++iter) {
- if (iter->plugin_path() == plugin_path)
+ if (iter->plugin_path() == plugin_path &&
+ iter->profile_data_directory() == profile_data_directory_path) {
return *iter;
+ }
}
-
return NULL;
}
@@ -285,10 +287,12 @@
PpapiPluginProcessHost* PluginServiceImpl::FindOrStartPpapiPluginProcess(
const FilePath& plugin_path,
+ const FilePath& data_directory_path,
PpapiPluginProcessHost::PluginClient* client) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- PpapiPluginProcessHost* plugin_host = FindPpapiPluginProcess(plugin_path);
+ PpapiPluginProcessHost* plugin_host =
+ FindPpapiPluginProcess(plugin_path, data_directory_path);
if (plugin_host)
return plugin_host;
@@ -299,7 +303,7 @@
// This plugin isn't loaded by any plugin process, so create a new process.
return PpapiPluginProcessHost::CreatePluginHost(
- *info,
+ *info, data_directory_path,
client->GetResourceContext()->GetHostResolver());
}
@@ -347,10 +351,11 @@
}
void PluginServiceImpl::OpenChannelToPpapiPlugin(
- const FilePath& path,
+ const FilePath& plugin_path,
+ const FilePath& data_directory_path,
PpapiPluginProcessHost::PluginClient* client) {
- PpapiPluginProcessHost* plugin_host = FindOrStartPpapiPluginProcess(
- path, client);
+ PpapiPluginProcessHost* plugin_host =
+ FindOrStartPpapiPluginProcess(plugin_path, data_directory_path, client);
if (plugin_host) {
plugin_host->OpenChannelToPlugin(client);
} else {

Powered by Google App Engine
This is Rietveld 408576698