summaryrefslogtreecommitdiffstats
path: root/webkit/media/active_loader.cc
blob: 02d098a3163ba4af672f164d3b7dabe71455ce9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "webkit/media/active_loader.h"

#include "third_party/WebKit/Source/Platform/chromium/public/WebURLLoader.h"
#include "webkit/media/buffered_resource_loader.h"

namespace webkit_media {

ActiveLoader::ActiveLoader(scoped_ptr<WebKit::WebURLLoader> loader)
    : loader_(loader.Pass()),
      deferred_(false) {
}

ActiveLoader::~ActiveLoader() {
  loader_->cancel();
}

void ActiveLoader::SetDeferred(bool deferred) {
  deferred_ = deferred;
  loader_->setDefersLoading(deferred);
}

}  // namespace webkit_media