Home | History | Annotate | Download | only in media
      1 // Copyright 2013 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #include "content/renderer/media/active_loader.h"
      6 
      7 #include "content/renderer/media/buffered_resource_loader.h"
      8 #include "third_party/WebKit/public/platform/WebURLLoader.h"
      9 
     10 namespace content {
     11 
     12 ActiveLoader::ActiveLoader(scoped_ptr<blink::WebURLLoader> loader)
     13     : loader_(loader.Pass()),
     14       deferred_(false) {
     15 }
     16 
     17 ActiveLoader::~ActiveLoader() {
     18   loader_->cancel();
     19 }
     20 
     21 void ActiveLoader::SetDeferred(bool deferred) {
     22   deferred_ = deferred;
     23   loader_->setDefersLoading(deferred);
     24 }
     25 
     26 }  // namespace content
     27