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

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

Issue 2362953002: Fix a timing bug in multibuffer. (Closed)
Patch Set: Created 4 years, 2 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 // Check if we've moved to a new url and update has_signgle_origin_. 165 // Check if we've moved to a new url and update has_signgle_origin_.
166 void UpdateSingleOrigin(); 166 void UpdateSingleOrigin();
167 167
168 // MultiBufferReader progress callback. 168 // MultiBufferReader progress callback.
169 void ProgressCallback(int64_t begin, int64_t end); 169 void ProgressCallback(int64_t begin, int64_t end);
170 170
171 // call downloading_cb_ if needed. 171 // call downloading_cb_ if needed.
172 // If |force_loading| is true, we call downloading_cb_ and tell it that 172 // If |force_loading| is true, we call downloading_cb_ and tell it that
173 // we are currently loading, regardless of what reader_->IsLoading() says. 173 // we are currently loading, regardless of what reader_->IsLoading() says.
174 void UpdateLoadingState(bool force_loading); 174 // Caller must hold |lock_|.
175 void UpdateLoadingState_Locked(bool force_loading);
175 176
176 // Update |reader_|'s preload and buffer settings. 177 // Update |reader_|'s preload and buffer settings.
177 void UpdateBufferSizes(); 178 void UpdateBufferSizes();
178 179
179 // crossorigin attribute on the corresponding HTML media element, if any. 180 // crossorigin attribute on the corresponding HTML media element, if any.
180 UrlData::CORSMode cors_mode_; 181 UrlData::CORSMode cors_mode_;
181 182
182 // URL of the resource requested. 183 // URL of the resource requested.
183 scoped_refptr<UrlData> url_data_; 184 scoped_refptr<UrlData> url_data_;
184 185
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 // reaching into this class from multiple threads to attain a WeakPtr. 269 // reaching into this class from multiple threads to attain a WeakPtr.
269 base::WeakPtr<MultibufferDataSource> weak_ptr_; 270 base::WeakPtr<MultibufferDataSource> weak_ptr_;
270 base::WeakPtrFactory<MultibufferDataSource> weak_factory_; 271 base::WeakPtrFactory<MultibufferDataSource> weak_factory_;
271 272
272 DISALLOW_COPY_AND_ASSIGN(MultibufferDataSource); 273 DISALLOW_COPY_AND_ASSIGN(MultibufferDataSource);
273 }; 274 };
274 275
275 } // namespace media 276 } // namespace media
276 277
277 #endif // MEDIA_BLINK_MULTIBUFFER_DATA_SOURCE_H_ 278 #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