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

Unified Diff: content/browser/renderer_host/render_message_filter.cc

Issue 11316316: Implement an IsAllowed function in the pepper PPB_Broker_Trusted API (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/render_message_filter.cc
diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc
index 9bcd74ebd6fb4ef2a718b3cdd691edfc75c2e5c1..0823310897e723e7b076dd8c4b8d6ebaa3a5df2b 100644
--- a/content/browser/renderer_host/render_message_filter.cc
+++ b/content/browser/renderer_host/render_message_filter.cc
@@ -711,7 +711,7 @@ void RenderMessageFilter::OnOpenChannelToPepperPlugin(
void RenderMessageFilter::OnDidCreateOutOfProcessPepperInstance(
int plugin_child_id,
int32 pp_instance,
- int render_view_id,
+ PepperRendererInstanceData instance_data,
bool is_external) {
// It's important that we supply the render process ID ourselves based on the
// channel the message arrived on. We use the
@@ -719,16 +719,18 @@ void RenderMessageFilter::OnDidCreateOutOfProcessPepperInstance(
// mapping to decide how to handle messages received from the (untrusted)
// plugin, so an exploited renderer must not be able to insert fake mappings
// that may allow it access to other render processes.
+ DCHECK(instance_data.render_process_id == 0);
+ instance_data.render_process_id = render_process_id_;
if (is_external) {
// We provide the BrowserPpapiHost to the embedder, so it's safe to cast.
BrowserPpapiHostImpl* host = static_cast<BrowserPpapiHostImpl*>(
GetContentClient()->browser()->GetExternalBrowserPpapiHost(
plugin_child_id));
if (host)
- host->AddInstanceForView(pp_instance, render_process_id_, render_view_id);
+ host->AddInstance(pp_instance, instance_data);
} else {
PpapiPluginProcessHost::DidCreateOutOfProcessInstance(
- plugin_child_id, pp_instance, render_process_id_, render_view_id);
+ plugin_child_id, pp_instance, instance_data);
}
}
@@ -742,7 +744,7 @@ void RenderMessageFilter::OnDidDeleteOutOfProcessPepperInstance(
GetContentClient()->browser()->GetExternalBrowserPpapiHost(
plugin_child_id));
if (host)
- host->DeleteInstanceForView(pp_instance);
+ host->DeleteInstance(pp_instance);
} else {
PpapiPluginProcessHost::DidDeleteOutOfProcessInstance(
plugin_child_id, pp_instance);
« no previous file with comments | « content/browser/renderer_host/render_message_filter.h ('k') | content/common/pepper_renderer_instance_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698