OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef MEDIA_BLINK_ACTIVE_LOADER_H_ | 5 #ifndef MEDIA_BLINK_ACTIVE_LOADER_H_ |
6 #define MEDIA_BLINK_ACTIVE_LOADER_H_ | 6 #define MEDIA_BLINK_ACTIVE_LOADER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 // Creates an ActiveLoader with the given loader. It is assumed that the | 24 // Creates an ActiveLoader with the given loader. It is assumed that the |
25 // initial state of |loader| is loading and not deferred. | 25 // initial state of |loader| is loading and not deferred. |
26 explicit ActiveLoader(std::unique_ptr<blink::WebURLLoader> loader); | 26 explicit ActiveLoader(std::unique_ptr<blink::WebURLLoader> loader); |
27 ~ActiveLoader(); | 27 ~ActiveLoader(); |
28 | 28 |
29 // Starts or stops deferring the resource load. | 29 // Starts or stops deferring the resource load. |
30 void SetDeferred(bool deferred); | 30 void SetDeferred(bool deferred); |
31 bool deferred() { return deferred_; } | 31 bool deferred() { return deferred_; } |
32 | 32 |
33 private: | 33 private: |
34 friend class BufferedDataSourceTest; | |
35 friend class MultibufferDataSourceTest; | 34 friend class MultibufferDataSourceTest; |
36 | 35 |
37 std::unique_ptr<blink::WebURLLoader> loader_; | 36 std::unique_ptr<blink::WebURLLoader> loader_; |
38 bool deferred_; | 37 bool deferred_; |
39 | 38 |
40 DISALLOW_IMPLICIT_CONSTRUCTORS(ActiveLoader); | 39 DISALLOW_IMPLICIT_CONSTRUCTORS(ActiveLoader); |
41 }; | 40 }; |
42 | 41 |
43 } // namespace media | 42 } // namespace media |
44 | 43 |
45 #endif // MEDIA_BLINK_ACTIVE_LOADER_H_ | 44 #endif // MEDIA_BLINK_ACTIVE_LOADER_H_ |
OLD | NEW |