OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "webkit/glue/media/simple_data_source.h" | 5 #include "webkit/glue/media/simple_data_source.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/process_util.h" | 8 #include "base/process_util.h" |
9 #include "media/base/filter_host.h" | 9 #include "media/base/filter_host.h" |
10 #include "net/base/data_url.h" | 10 #include "net/base/data_url.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 132 |
133 bool SimpleDataSource::GetSize(int64* size_out) { | 133 bool SimpleDataSource::GetSize(int64* size_out) { |
134 *size_out = size_; | 134 *size_out = size_; |
135 return true; | 135 return true; |
136 } | 136 } |
137 | 137 |
138 bool SimpleDataSource::IsStreaming() { | 138 bool SimpleDataSource::IsStreaming() { |
139 return false; | 139 return false; |
140 } | 140 } |
141 | 141 |
| 142 void SimpleDataSource::SetPreload(media::Preload preload) {} |
| 143 |
142 void SimpleDataSource::SetURLLoaderForTest(WebKit::WebURLLoader* mock_loader) { | 144 void SimpleDataSource::SetURLLoaderForTest(WebKit::WebURLLoader* mock_loader) { |
143 url_loader_.reset(mock_loader); | 145 url_loader_.reset(mock_loader); |
144 keep_test_loader_ = true; | 146 keep_test_loader_ = true; |
145 } | 147 } |
146 | 148 |
147 void SimpleDataSource::willSendRequest( | 149 void SimpleDataSource::willSendRequest( |
148 WebKit::WebURLLoader* loader, | 150 WebKit::WebURLLoader* loader, |
149 WebKit::WebURLRequest& newRequest, | 151 WebKit::WebURLRequest& newRequest, |
150 const WebKit::WebURLResponse& redirectResponse) { | 152 const WebKit::WebURLResponse& redirectResponse) { |
151 DCHECK(MessageLoop::current() == render_loop_); | 153 DCHECK(MessageLoop::current() == render_loop_); |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 void SimpleDataSource::UpdateHostState() { | 342 void SimpleDataSource::UpdateHostState() { |
341 if (host()) { | 343 if (host()) { |
342 host()->SetTotalBytes(size_); | 344 host()->SetTotalBytes(size_); |
343 host()->SetBufferedBytes(size_); | 345 host()->SetBufferedBytes(size_); |
344 // If scheme is file or data, say we are loaded. | 346 // If scheme is file or data, say we are loaded. |
345 host()->SetLoaded(url_.SchemeIsFile() || url_.SchemeIs(kDataScheme)); | 347 host()->SetLoaded(url_.SchemeIsFile() || url_.SchemeIs(kDataScheme)); |
346 } | 348 } |
347 } | 349 } |
348 | 350 |
349 } // namespace webkit_glue | 351 } // namespace webkit_glue |
OLD | NEW |