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/media/simple_data_source.h" | 5 #include "webkit/media/simple_data_source.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/process_util.h" | 9 #include "base/process_util.h" |
10 #include "media/base/filter_host.h" | 10 #include "media/base/filter_host.h" |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 } | 345 } |
346 | 346 |
347 initialize_cb_.Run(status); | 347 initialize_cb_.Run(status); |
348 initialize_cb_.Reset(); | 348 initialize_cb_.Reset(); |
349 } | 349 } |
350 | 350 |
351 void SimpleDataSource::UpdateHostState() { | 351 void SimpleDataSource::UpdateHostState() { |
352 if (host()) { | 352 if (host()) { |
353 host()->SetTotalBytes(size_); | 353 host()->SetTotalBytes(size_); |
354 host()->SetBufferedBytes(size_); | 354 host()->SetBufferedBytes(size_); |
355 // If scheme is file or data, say we are loaded. | |
356 host()->SetLoaded(url_.SchemeIsFile() || url_.SchemeIs(kDataScheme)); | |
357 } | 355 } |
358 } | 356 } |
359 | 357 |
360 } // namespace webkit_media | 358 } // namespace webkit_media |
OLD | NEW |