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

Side by Side Diff: webkit/media/simple_data_source.cc

Issue 8661002: Fire CanPlayThrough immediately for local and streaming media files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase ToT Created 9 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 | Annotate | Revision Log
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698