OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "webkit/media/active_loader.h" | 5 #include "webkit/media/active_loader.h" |
6 | 6 |
7 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoader.h" | 7 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLLoader
.h" |
8 #include "webkit/media/buffered_resource_loader.h" | 8 #include "webkit/media/buffered_resource_loader.h" |
9 | 9 |
10 namespace webkit_media { | 10 namespace webkit_media { |
11 | 11 |
12 ActiveLoader::ActiveLoader( | 12 ActiveLoader::ActiveLoader( |
13 const scoped_refptr<BufferedResourceLoader>& parent, | 13 const scoped_refptr<BufferedResourceLoader>& parent, |
14 WebKit::WebURLLoader* loader) | 14 WebKit::WebURLLoader* loader) |
15 : parent_(parent), | 15 : parent_(parent), |
16 loader_(loader), | 16 loader_(loader), |
17 deferred_(false) { | 17 deferred_(false) { |
(...skipping 10 matching lines...) Expand all Loading... |
28 } | 28 } |
29 | 29 |
30 void ActiveLoader::Cancel() { | 30 void ActiveLoader::Cancel() { |
31 // We only need to maintain a reference to our parent while the loader is | 31 // We only need to maintain a reference to our parent while the loader is |
32 // still active. Failing to do so can result in circular refcounts. | 32 // still active. Failing to do so can result in circular refcounts. |
33 loader_->cancel(); | 33 loader_->cancel(); |
34 parent_ = NULL; | 34 parent_ = NULL; |
35 } | 35 } |
36 | 36 |
37 } // namespace webkit_media | 37 } // namespace webkit_media |
OLD | NEW |