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

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

Issue 2417693002: Allow MimeHandlerViewGuest be embedded inside OOPIFs (Closed)
Patch Set: Rebased 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..315ea635bfd49e4d1ff029709ff9c39e657d48b8 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->GetOwnerSiteInstance()->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()
« no previous file with comments | « components/guest_view/browser/guest_view_base.cc ('k') | content/browser/browser_plugin/browser_plugin_guest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698