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

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

Issue 1509663003: make multibuffer work with layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@media_cache.integrate3
Patch Set: merged & formatted Created 5 years 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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // BufferedResourceLoader::Start() callback for initial load. 135 // BufferedResourceLoader::Start() callback for initial load.
136 void StartCallback(); 136 void StartCallback();
137 137
138 // Check if we've moved to a new url and update has_signgle_origin_. 138 // Check if we've moved to a new url and update has_signgle_origin_.
139 void UpdateSingleOrigin(); 139 void UpdateSingleOrigin();
140 140
141 // MultiBufferReader progress callback. 141 // MultiBufferReader progress callback.
142 void ProgressCallback(int64 begin, int64 end); 142 void ProgressCallback(int64 begin, int64 end);
143 143
144 // call downloading_cb_ if needed. 144 // call downloading_cb_ if needed.
145 void UpdateLoadingState(); 145 // If |force_loading| is true, we call downloading_cb_ and tell it that
146 // we are currently loading, regardless of what reader_->IsLoading() says.
147 void UpdateLoadingState(bool force_loading);
146 148
147 // Update |reader_|'s preload and buffer settings. 149 // Update |reader_|'s preload and buffer settings.
148 void UpdateBufferSizes(); 150 void UpdateBufferSizes();
149 151
150 // crossorigin attribute on the corresponding HTML media element, if any. 152 // crossorigin attribute on the corresponding HTML media element, if any.
151 UrlData::CORSMode cors_mode_; 153 UrlData::CORSMode cors_mode_;
152 154
153 // URL of the resource requested. 155 // URL of the resource requested.
154 scoped_refptr<UrlData> url_data_; 156 scoped_refptr<UrlData> url_data_;
155 157
156 // The total size of the resource. Set during StartCallback() if the size is 158 // The total size of the resource. Set during StartCallback() if the size is
157 // known, otherwise it will remain kPositionNotSpecified until the size is 159 // known, otherwise it will remain kPositionNotSpecified until the size is
158 // determined by reaching EOF. 160 // determined by reaching EOF.
159 int64 total_bytes_; 161 int64 total_bytes_;
160 162
161 // This value will be true if this data source can only support streaming. 163 // This value will be true if this data source can only support streaming.
162 // i.e. range request is not supported. 164 // i.e. range request is not supported.
163 bool streaming_; 165 bool streaming_;
164 166
167 // This is the loading state that we last reported to our owner through
168 // |downloading_cb_|.
165 bool loading_; 169 bool loading_;
166 170
167 // The task runner of the render thread. 171 // The task runner of the render thread.
168 const scoped_refptr<base::SingleThreadTaskRunner> render_task_runner_; 172 const scoped_refptr<base::SingleThreadTaskRunner> render_task_runner_;
169 173
170 // Shared cache. 174 // Shared cache.
171 linked_ptr<UrlIndex> url_index_; 175 linked_ptr<UrlIndex> url_index_;
172 176
173 // A webframe for loading. 177 // A webframe for loading.
174 blink::WebFrame* frame_; 178 blink::WebFrame* frame_;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 // reaching into this class from multiple threads to attain a WeakPtr. 238 // reaching into this class from multiple threads to attain a WeakPtr.
235 base::WeakPtr<MultibufferDataSource> weak_ptr_; 239 base::WeakPtr<MultibufferDataSource> weak_ptr_;
236 base::WeakPtrFactory<MultibufferDataSource> weak_factory_; 240 base::WeakPtrFactory<MultibufferDataSource> weak_factory_;
237 241
238 DISALLOW_COPY_AND_ASSIGN(MultibufferDataSource); 242 DISALLOW_COPY_AND_ASSIGN(MultibufferDataSource);
239 }; 243 };
240 244
241 } // namespace media 245 } // namespace media
242 246
243 #endif // MEDIA_BLINK_MULTIBUFFER_DATA_SOURCE_H_ 247 #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