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

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, 2 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: 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..3e553f3ef28ef444c1f076e0e6df3a350dc3eb4a 100644
--- a/components/guest_view/browser/guest_view_manager.cc
+++ b/components/guest_view/browser/guest_view_manager.cc
@@ -463,8 +463,14 @@ bool GuestViewManager::CanEmbedderAccessInstanceID(
if (!guest_view)
return false;
+ if (guest_view->IsViewType("mimehandler")) {
+ // MimeHandlerViewGuests (PDF) may be embedded in a cross origin frame.
+ return embedder_render_process_id ==
+ guest_view->GetEmbedderFrame()->GetProcess()->GetID();
nasko 2016/10/27 21:03:40 Why shouldn't this always be the case? Why make it
EhsanK 2016/10/27 22:06:48 I think other guests are not supposed to be embedd
+ }
+
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