Index: extensions/browser/guest_view/web_view/web_view_guest.cc |
diff --git a/extensions/browser/guest_view/web_view/web_view_guest.cc b/extensions/browser/guest_view/web_view/web_view_guest.cc |
index 14917784a30cd27bc5244c1cae4d33572b2642f1..692e490b24e85894f9fd9ce0c30f49204b5521e6 100644 |
--- a/extensions/browser/guest_view/web_view/web_view_guest.cc |
+++ b/extensions/browser/guest_view/web_view/web_view_guest.cc |
@@ -364,7 +364,17 @@ void WebViewGuest::CreateWebContents( |
owner_render_process_host->GetBrowserContext(), |
std::move(guest_site_instance)); |
params.guest_delegate = this; |
- callback.Run(WebContents::Create(params)); |
+ WebContents* new_contents = WebContents::Create(params); |
+ |
+ // Grant access to the origin of the embedder to the guest process. This |
+ // allows blob:/filesystem: URLs with the embedder origin to be created |
+ // inside the guest. It is possible to do this by running embedder code |
+ // through webview accessible_resources. |
+ content::ChildProcessSecurityPolicy::GetInstance()->GrantOrigin( |
+ new_contents->GetMainFrame()->GetProcess()->GetID(), |
+ url::Origin(GetOwnerSiteURL())); |
+ |
+ callback.Run(new_contents); |
} |
void WebViewGuest::DidAttachToEmbedder() { |