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

Unified Diff: webkit/glue/webmediaplayer_impl.cc

Issue 6625059: Implementing preload=metadata for video (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes based on code review Created 9 years, 9 months 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 side-by-side diff with in-line comments
Download patch
« media/base/filters.h ('K') | « webkit/glue/webmediaplayer_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webmediaplayer_impl.cc
diff --git a/webkit/glue/webmediaplayer_impl.cc b/webkit/glue/webmediaplayer_impl.cc
index 54bc600d461fb31c159f0ad9cef13696eb1f7491..25b3c9b7006b0bb214527395b759c1d7c30a6e5d 100644
--- a/webkit/glue/webmediaplayer_impl.cc
+++ b/webkit/glue/webmediaplayer_impl.cc
@@ -382,6 +382,8 @@ void WebMediaPlayerImpl::load(const WebKit::WebURL& url) {
// Handle any volume changes that occured before load().
setVolume(GetClient()->volume());
+ // Get the preload value.
+ setPreload(GetClient()->preload());
// Initialize the pipeline.
SetNetworkState(WebKit::WebMediaPlayer::Loading);
@@ -495,10 +497,10 @@ void WebMediaPlayerImpl::setVisible(bool visible) {
return;
}
-bool WebMediaPlayerImpl::setAutoBuffer(bool autoBuffer) {
+void WebMediaPlayerImpl::setPreload(WebKit::WebMediaPlayer::Preload preload) {
DCHECK(MessageLoop::current() == main_loop_);
- return false;
+ pipeline_->SetPreload(static_cast<media::Preload>(preload));
acolwell GONE FROM CHROMIUM 2011/03/29 05:52:03 This just makes me nervous. Can we just put a swit
vrk (LEFT CHROMIUM) 2011/03/30 17:41:44 Agreed! Added compile-time asserts.
}
bool WebMediaPlayerImpl::totalBytesKnown() {
« media/base/filters.h ('K') | « webkit/glue/webmediaplayer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698