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

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

Issue 738193002: Update BufferedDataSource class documentation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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/buffered_data_source.cc » ('j') | media/blink/buffered_data_source.cc » ('J')
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_BUFFERED_DATA_SOURCE_H_ 5 #ifndef MEDIA_BLINK_BUFFERED_DATA_SOURCE_H_
6 #define MEDIA_BLINK_BUFFERED_DATA_SOURCE_H_ 6 #define MEDIA_BLINK_BUFFERED_DATA_SOURCE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 24 matching lines...) Expand all
35 // pull-based. http://crbug.com/131444 35 // pull-based. http://crbug.com/131444
36 virtual void AddBufferedByteRange(int64 start, int64 end) = 0; 36 virtual void AddBufferedByteRange(int64 start, int64 end) = 0;
37 37
38 protected: 38 protected:
39 virtual ~BufferedDataSourceHost() {} 39 virtual ~BufferedDataSourceHost() {}
40 }; 40 };
41 41
42 // A data source capable of loading URLs and buffering the data using an 42 // A data source capable of loading URLs and buffering the data using an
43 // in-memory sliding window. 43 // in-memory sliding window.
44 // 44 //
45 // BufferedDataSource must be created and initialized on the render thread 45 // BufferedDataSource is accessed from multiple threads, and it exposes WeakPtrs
46 // before being passed to other threads. It may be deleted on any thread. 46 // for posting methods to be run on the main thread. It must therefore also be
47 // deleted on the main thread.
Wez 2014/11/19 21:38:55 It doesn't look like it actually exposes WeakPtrs;
no sievers 2014/11/19 21:42:48 Done.
47 class MEDIA_EXPORT BufferedDataSource : public DataSource { 48 class MEDIA_EXPORT BufferedDataSource : public DataSource {
48 public: 49 public:
49 // Used to specify video preload states. They are "hints" to the browser about 50 // Used to specify video preload states. They are "hints" to the browser about
50 // how aggressively the browser should load and buffer data. 51 // how aggressively the browser should load and buffer data.
51 // Please see the HTML5 spec for the descriptions of these values: 52 // Please see the HTML5 spec for the descriptions of these values:
52 // http://www.w3.org/TR/html5/video.html#attr-media-preload 53 // http://www.w3.org/TR/html5/video.html#attr-media-preload
53 // 54 //
54 // Enum values must match the values in blink::WebMediaPlayer::Preload and 55 // Enum values must match the values in blink::WebMediaPlayer::Preload and
55 // there will be assertions at compile time if they do not match. 56 // there will be assertions at compile time if they do not match.
56 enum Preload { 57 enum Preload {
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 235
235 // NOTE: Weak pointers must be invalidated before all other member variables. 236 // NOTE: Weak pointers must be invalidated before all other member variables.
236 base::WeakPtrFactory<BufferedDataSource> weak_factory_; 237 base::WeakPtrFactory<BufferedDataSource> weak_factory_;
237 238
238 DISALLOW_COPY_AND_ASSIGN(BufferedDataSource); 239 DISALLOW_COPY_AND_ASSIGN(BufferedDataSource);
239 }; 240 };
240 241
241 } // namespace media 242 } // namespace media
242 243
243 #endif // MEDIA_BLINK_BUFFERED_DATA_SOURCE_H_ 244 #endif // MEDIA_BLINK_BUFFERED_DATA_SOURCE_H_
OLDNEW
« no previous file with comments | « no previous file | media/blink/buffered_data_source.cc » ('j') | media/blink/buffered_data_source.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698