Commit 905bf177 authored by Lukasz Anforowicz's avatar Lukasz Anforowicz Committed by Commit Bot

Return frame/origin-bound URLLoaderFactory from WebViewPlugin/Helper.

This CL modifies WebViewPlugin::WebViewHelper::CreateURLLoaderFactory
method so that it delegates creation of URLLoaderFactory to the frame
that hosts the plugin.

Bug: 891872
Change-Id: I002503730f98adbced92d61c7d74eb53f4865e98
Reviewed-on: https://chromium-review.googlesource.com/c/1259824Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608632}
parent 8cd3170a
......@@ -345,7 +345,11 @@ void WebViewPlugin::WebViewHelper::ScheduleAnimation() {
std::unique_ptr<blink::WebURLLoaderFactory>
WebViewPlugin::WebViewHelper::CreateURLLoaderFactory() {
return blink::Platform::Current()->CreateDefaultURLLoaderFactory();
return plugin_->Container()
->GetDocument()
.GetFrame()
->Client()
->CreateURLLoaderFactory();
}
void WebViewPlugin::WebViewHelper::DidClearWindowObject() {
......
......@@ -344,7 +344,7 @@ class BLINK_PLATFORM_EXPORT Platform {
// get a factory bundle from the browser process, and compose a new factory
// using both the bundle and this default.
//
// TODO(kinuko): See if we can deprecate this too.
// TODO(kinuko): https://crbug.com/891872: See if we can deprecate this too.
virtual std::unique_ptr<WebURLLoaderFactory> CreateDefaultURLLoaderFactory() {
return nullptr;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment