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

Unified Diff: components/guest_view/browser/guest_view_manager.cc

Issue 2417693002: Allow MimeHandlerViewGuest be embedded inside OOPIFs (Closed)
Patch Set: Fixed an input routing issue with nested browser plugings Created 4 years, 1 month 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: components/guest_view/browser/guest_view_manager.cc
diff --git a/components/guest_view/browser/guest_view_manager.cc b/components/guest_view/browser/guest_view_manager.cc
index 1734c762657e9ae169d5d621fc0c84cd8fbe7d26..a908cb4319cecac721e220e8298daa0dfb9989e6 100644
--- a/components/guest_view/browser/guest_view_manager.cc
+++ b/components/guest_view/browser/guest_view_manager.cc
@@ -463,8 +463,16 @@ bool GuestViewManager::CanEmbedderAccessInstanceID(
if (!guest_view)
return false;
+ if (guest_view->CanBeEmbeddedInsideCrossProcessFrames()) {
+ // MimeHandlerViewGuests (PDF) may be embedded in a cross-process frame.
+ return embedder_render_process_id ==
+ guest_view->GetOwnerFrame()->GetProcess()->GetID();
+ }
+
+ // Other than MimeHandlerViewGuest, all other guest types are only permitted
+ // to run in the main frame.
return embedder_render_process_id ==
- guest_view->owner_web_contents()->GetRenderProcessHost()->GetID();
+ guest_view->owner_web_contents()->GetRenderProcessHost()->GetID();
}
GuestViewManager::ElementInstanceKey::ElementInstanceKey()

Powered by Google App Engine
This is Rietveld 408576698