Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(499)

Side by Side Diff: media/blink/multibuffer_data_source.h

Issue 2357773003: Fix a timing bug in multibuffer. (Closed)
Patch Set: comments addressed Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | media/blink/multibuffer_data_source.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 // Check if we've moved to a new url and update has_signgle_origin_. 159 // Check if we've moved to a new url and update has_signgle_origin_.
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 void UpdateLoadingState(bool force_loading); 168 // Caller must hold |lock_|.
169 void UpdateLoadingState_Locked(bool force_loading);
169 170
170 // Update |reader_|'s preload and buffer settings. 171 // Update |reader_|'s preload and buffer settings.
171 void UpdateBufferSizes(); 172 void UpdateBufferSizes();
172 173
173 // crossorigin attribute on the corresponding HTML media element, if any. 174 // crossorigin attribute on the corresponding HTML media element, if any.
174 UrlData::CORSMode cors_mode_; 175 UrlData::CORSMode cors_mode_;
175 176
176 // URL of the resource requested. 177 // URL of the resource requested.
177 scoped_refptr<UrlData> url_data_; 178 scoped_refptr<UrlData> url_data_;
178 179
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 // reaching into this class from multiple threads to attain a WeakPtr. 263 // reaching into this class from multiple threads to attain a WeakPtr.
263 base::WeakPtr<MultibufferDataSource> weak_ptr_; 264 base::WeakPtr<MultibufferDataSource> weak_ptr_;
264 base::WeakPtrFactory<MultibufferDataSource> weak_factory_; 265 base::WeakPtrFactory<MultibufferDataSource> weak_factory_;
265 266
266 DISALLOW_COPY_AND_ASSIGN(MultibufferDataSource); 267 DISALLOW_COPY_AND_ASSIGN(MultibufferDataSource);
267 }; 268 };
268 269
269 } // namespace media 270 } // namespace media
270 271
271 #endif // MEDIA_BLINK_MULTIBUFFER_DATA_SOURCE_H_ 272 #endif // MEDIA_BLINK_MULTIBUFFER_DATA_SOURCE_H_
OLDNEW
« no previous file with comments | « no previous file | media/blink/multibuffer_data_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698