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

Unified Diff: content/browser/browser_plugin/browser_plugin_message_filter.cc

Issue 921473006: GuestView: Fix message routing across embedder navigations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated comments CQ'ing Created 5 years, 10 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/browser_plugin/browser_plugin_message_filter.cc
diff --git a/content/browser/browser_plugin/browser_plugin_message_filter.cc b/content/browser/browser_plugin/browser_plugin_message_filter.cc
index 5f044f3df32972e27092b5c590506a90b6307eb9..438e7efffd8d865235803bcf2c64d09432b5dbf5 100644
--- a/content/browser/browser_plugin/browser_plugin_message_filter.cc
+++ b/content/browser/browser_plugin/browser_plugin_message_filter.cc
@@ -54,21 +54,19 @@ void BrowserPluginMessageFilter::OverrideThreadForMessage(
void BrowserPluginMessageFilter::ForwardMessageToGuest(
const IPC::Message& message) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- auto rvh = RenderViewHost::FromID(render_process_id_, message.routing_id());
- if (!rvh)
+ auto rph = RenderProcessHost::FromID(render_process_id_);
+ if (!rph)
return;
- auto embedder_web_contents = WebContents::FromRenderViewHost(rvh);
-
int browser_plugin_instance_id = browser_plugin::kInstanceIDNone;
// All allowed messages must have instance_id as their first parameter.
PickleIterator iter(message);
bool success = iter.ReadInt(&browser_plugin_instance_id);
DCHECK(success);
+
WebContents* guest_web_contents =
- embedder_web_contents->GetBrowserContext()
- ->GetGuestManager()
- ->GetGuestByInstanceID(embedder_web_contents,
+ rph->GetBrowserContext()->GetGuestManager()
+ ->GetGuestByInstanceID(render_process_id_,
browser_plugin_instance_id);
if (!guest_web_contents)
return;
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_embedder.cc ('k') | content/browser/frame_host/frame_accessibility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698