| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_URL_INDEX_H_ | 5 #ifndef MEDIA_BLINK_URL_INDEX_H_ |
| 6 #define MEDIA_BLINK_URL_INDEX_H_ | 6 #define MEDIA_BLINK_URL_INDEX_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // A multibuffer for loading media resources which knows | 30 // A multibuffer for loading media resources which knows |
| 31 // how to create MultiBufferDataProviders to load data | 31 // how to create MultiBufferDataProviders to load data |
| 32 // into the cache. | 32 // into the cache. |
| 33 class MEDIA_BLINK_EXPORT ResourceMultiBuffer | 33 class MEDIA_BLINK_EXPORT ResourceMultiBuffer |
| 34 : NON_EXPORTED_BASE(public MultiBuffer) { | 34 : NON_EXPORTED_BASE(public MultiBuffer) { |
| 35 public: | 35 public: |
| 36 ResourceMultiBuffer(UrlData* url_data_, int block_shift); | 36 ResourceMultiBuffer(UrlData* url_data_, int block_shift); |
| 37 ~ResourceMultiBuffer() override; | 37 ~ResourceMultiBuffer() override; |
| 38 | 38 |
| 39 // MultiBuffer implementation. | 39 // MultiBuffer implementation. |
| 40 scoped_ptr<MultiBuffer::DataProvider> CreateWriter( | 40 std::unique_ptr<MultiBuffer::DataProvider> CreateWriter( |
| 41 const BlockId& pos) override; | 41 const BlockId& pos) override; |
| 42 bool RangeSupported() const override; | 42 bool RangeSupported() const override; |
| 43 void OnEmpty() override; | 43 void OnEmpty() override; |
| 44 | 44 |
| 45 protected: | 45 protected: |
| 46 // Do not access from destructor, it is a pointer to the | 46 // Do not access from destructor, it is a pointer to the |
| 47 // object that contains us. | 47 // object that contains us. |
| 48 UrlData* url_data_; | 48 UrlData* url_data_; |
| 49 }; | 49 }; |
| 50 | 50 |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 // log2 of block size in multibuffer cache. Defaults to kBlockSizeShift. | 235 // log2 of block size in multibuffer cache. Defaults to kBlockSizeShift. |
| 236 // Currently only changed for testing purposes. | 236 // Currently only changed for testing purposes. |
| 237 const int block_shift_; | 237 const int block_shift_; |
| 238 | 238 |
| 239 protected: | 239 protected: |
| 240 base::WeakPtrFactory<UrlIndex> weak_factory_; | 240 base::WeakPtrFactory<UrlIndex> weak_factory_; |
| 241 }; | 241 }; |
| 242 | 242 |
| 243 } // namespace media | 243 } // namespace media |
| 244 #endif // MEDIA_BLINK_URL_INDEX_H_ | 244 #endif // MEDIA_BLINK_URL_INDEX_H_ |
| OLD | NEW |