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_MULTIBUFFER_DATA_SOURCE_H_ | 5 #ifndef MEDIA_BLINK_MULTIBUFFER_DATA_SOURCE_H_ |
6 #define MEDIA_BLINK_MULTIBUFFER_DATA_SOURCE_H_ | 6 #define MEDIA_BLINK_MULTIBUFFER_DATA_SOURCE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 void UpdateSingleOrigin(); | 160 void UpdateSingleOrigin(); |
161 | 161 |
162 // MultiBufferReader progress callback. | 162 // MultiBufferReader progress callback. |
163 void ProgressCallback(int64_t begin, int64_t end); | 163 void ProgressCallback(int64_t begin, int64_t end); |
164 | 164 |
165 // call downloading_cb_ if needed. | 165 // call downloading_cb_ if needed. |
166 // If |force_loading| is true, we call downloading_cb_ and tell it that | 166 // If |force_loading| is true, we call downloading_cb_ and tell it that |
167 // we are currently loading, regardless of what reader_->IsLoading() says. | 167 // we are currently loading, regardless of what reader_->IsLoading() says. |
168 // Caller must hold |lock_|. | 168 // Caller must hold |lock_|. |
169 void UpdateLoadingState_Locked(bool force_loading); | 169 void UpdateLoadingState_Locked(bool force_loading); |
| 170 void UpdateLoadingState(); |
170 | 171 |
171 // Update |reader_|'s preload and buffer settings. | 172 // Update |reader_|'s preload and buffer settings. |
172 void UpdateBufferSizes(); | 173 void UpdateBufferSizes(); |
173 | 174 |
174 // crossorigin attribute on the corresponding HTML media element, if any. | 175 // crossorigin attribute on the corresponding HTML media element, if any. |
175 UrlData::CORSMode cors_mode_; | 176 UrlData::CORSMode cors_mode_; |
176 | 177 |
177 // URL of the resource requested. | 178 // URL of the resource requested. |
178 scoped_refptr<UrlData> url_data_; | 179 scoped_refptr<UrlData> url_data_; |
179 | 180 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 // reaching into this class from multiple threads to attain a WeakPtr. | 264 // reaching into this class from multiple threads to attain a WeakPtr. |
264 base::WeakPtr<MultibufferDataSource> weak_ptr_; | 265 base::WeakPtr<MultibufferDataSource> weak_ptr_; |
265 base::WeakPtrFactory<MultibufferDataSource> weak_factory_; | 266 base::WeakPtrFactory<MultibufferDataSource> weak_factory_; |
266 | 267 |
267 DISALLOW_COPY_AND_ASSIGN(MultibufferDataSource); | 268 DISALLOW_COPY_AND_ASSIGN(MultibufferDataSource); |
268 }; | 269 }; |
269 | 270 |
270 } // namespace media | 271 } // namespace media |
271 | 272 |
272 #endif // MEDIA_BLINK_MULTIBUFFER_DATA_SOURCE_H_ | 273 #endif // MEDIA_BLINK_MULTIBUFFER_DATA_SOURCE_H_ |
OLD | NEW |