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

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: Cleanup defer strategy, fix logic bug 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
« webkit/glue/media/defer_strategy.cc ('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..c64b3d9e0700aba427c0cbe792703b4b60cd0054 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(static_cast<WebMediaPlayer::Preload>(GetClient()->preload()));
acolwell GONE FROM CHROMIUM 2011/03/25 04:35:28 What is the type of the enum we are casting from?
vrk (LEFT CHROMIUM) 2011/03/25 21:33:32 Oops, I think this is a mistake because of a mista
// Initialize the pipeline.
SetNetworkState(WebKit::WebMediaPlayer::Loading);
@@ -495,10 +497,12 @@ void WebMediaPlayerImpl::setVisible(bool visible) {
return;
}
-bool WebMediaPlayerImpl::setAutoBuffer(bool autoBuffer) {
+bool WebMediaPlayerImpl::setPreload(WebKit::WebMediaPlayer::Preload preload) {
DCHECK(MessageLoop::current() == main_loop_);
- return false;
+ pipeline_->SetPreload(static_cast<media::Preload>(preload));
+
+ return true;
acolwell GONE FROM CHROMIUM 2011/03/25 04:35:28 Why is the return value changing?
vrk (LEFT CHROMIUM) 2011/03/25 21:33:32 Actually I don't think the return value is used or
}
bool WebMediaPlayerImpl::totalBytesKnown() {
« webkit/glue/media/defer_strategy.cc ('K') | « webkit/glue/webmediaplayer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698