summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/media/buffered_data_source.cc5
-rw-r--r--webkit/glue/media/simple_data_source.cc5
2 files changed, 4 insertions, 6 deletions
diff --git a/webkit/glue/media/buffered_data_source.cc b/webkit/glue/media/buffered_data_source.cc
index c5e39b7..ec7a3a0 100644
--- a/webkit/glue/media/buffered_data_source.cc
+++ b/webkit/glue/media/buffered_data_source.cc
@@ -144,17 +144,16 @@ void BufferedResourceLoader::Start(net::CompletionCallback* start_callback,
// Prepare the request.
WebURLRequest request(url_);
+ request.setTargetType(WebURLRequest::TargetIsMedia);
request.setHTTPHeaderField(WebString::fromUTF8("Range"),
WebString::fromUTF8(GenerateHeaders(
first_byte_position_,
last_byte_position_)));
frame->setReferrerForRequest(request, WebKit::WebURL());
- // TODO(annacc): we should be using createAssociatedURLLoader() instead?
- frame->dispatchWillSendRequest(request);
// This flag is for unittests as we don't want to reset |url_loader|
if (!keep_test_loader_)
- url_loader_.reset(WebKit::webKitClient()->createURLLoader());
+ url_loader_.reset(frame->createAssociatedURLLoader());
// Start the resource loading.
url_loader_->loadAsynchronously(request, this);
diff --git a/webkit/glue/media/simple_data_source.cc b/webkit/glue/media/simple_data_source.cc
index 97a9c39..fd69a0a 100644
--- a/webkit/glue/media/simple_data_source.cc
+++ b/webkit/glue/media/simple_data_source.cc
@@ -244,14 +244,13 @@ void SimpleDataSource::StartTask() {
} else {
// Prepare the request.
WebKit::WebURLRequest request(url_);
+ request.setTargetType(WebKit::WebURLRequest::TargetIsMedia);
frame_->setReferrerForRequest(request, WebKit::WebURL());
- // TODO(annacc): we should be using createAssociatedURLLoader() instead?
- frame_->dispatchWillSendRequest(request);
// This flag is for unittests as we don't want to reset |url_loader|
if (!keep_test_loader_)
- url_loader_.reset(WebKit::webKitClient()->createURLLoader());
+ url_loader_.reset(frame_->createAssociatedURLLoader());
// Start the resource loading.
url_loader_->loadAsynchronously(request, this);