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

Unified Diff: extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc

Issue 694773003: Allow URL requests for object/embed tags to be intercepted as streams. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor-guest-view-container-3
Patch Set: Created 6 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
« no previous file with comments | « extensions/browser/api/declarative_webrequest/webrequest_condition_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc
diff --git a/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc b/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc
index b3b7d36abfb01e86b688ed5aa5bcc7514662eccb..420b3dfd3eb56c36827b91052130f94b90667c95 100644
--- a/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc
+++ b/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc
@@ -45,11 +45,11 @@ void MimeHandlerViewContainer::Ready() {
options.crossOriginRequestPolicy =
blink::WebURLLoaderOptions::CrossOriginRequestPolicyAllow;
DCHECK(!loader_);
- loader_.reset(frame->createAssociatedURLLoader());
+ loader_.reset(frame->createAssociatedURLLoader(options));
- // TODO(raymes): Currently this URL request won't be correctly intercepted as
- // a stream.
- loader_->loadAsynchronously(blink::WebURLRequest(original_url_), this);
+ blink::WebURLRequest request(original_url_);
+ request.setRequestContext(blink::WebURLRequest::RequestContextObject);
+ loader_->loadAsynchronously(request, this);
}
bool MimeHandlerViewContainer::HandlesMessage(const IPC::Message& message) {
« no previous file with comments | « extensions/browser/api/declarative_webrequest/webrequest_condition_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698