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

Unified Diff: webkit/media/android/webmediaplayer_android.cc

Issue 13431009: Add xxxFloat() methods to WebMediaPlayer implementations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
« no previous file with comments | « webkit/media/android/webmediaplayer_android.h ('k') | webkit/media/webmediaplayer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/android/webmediaplayer_android.cc
diff --git a/webkit/media/android/webmediaplayer_android.cc b/webkit/media/android/webmediaplayer_android.cc
index 5b00e5dbd3c31626a8eb0ff1563c1f33463dccee..fcddda0b4ea03f69edf505df415c54b3c35ca129 100644
--- a/webkit/media/android/webmediaplayer_android.cc
+++ b/webkit/media/android/webmediaplayer_android.cc
@@ -114,6 +114,10 @@ void WebMediaPlayerAndroid::pause() {
is_playing_ = false;
}
+void WebMediaPlayerAndroid::seekFloat(float seconds) {
+ seek(seconds);
+}
+
void WebMediaPlayerAndroid::seek(float seconds) {
pending_seek_ = seconds;
seeking_ = true;
@@ -129,15 +133,27 @@ bool WebMediaPlayerAndroid::supportsSave() const {
return false;
}
+void WebMediaPlayerAndroid::setEndTimeFloat(float seconds) {
+ setEndTime(seconds);
+}
+
void WebMediaPlayerAndroid::setEndTime(float seconds) {
// Deprecated.
// TODO(qinmin): Remove this from WebKit::WebMediaPlayer as it is never used.
}
+void WebMediaPlayerAndroid::setRateFloat(float rate) {
+ setRate(rate);
+}
+
void WebMediaPlayerAndroid::setRate(float rate) {
NOTIMPLEMENTED();
}
+void WebMediaPlayerAndroid::setVolumeFloat(float volume) {
+ setVolume(volume);
+}
+
void WebMediaPlayerAndroid::setVolume(float volume) {
NOTIMPLEMENTED();
}
@@ -186,10 +202,18 @@ bool WebMediaPlayerAndroid::seeking() const {
return seeking_;
}
+float WebMediaPlayerAndroid::durationFloat() const {
+ return duration();
+}
+
float WebMediaPlayerAndroid::duration() const {
return static_cast<float>(duration_.InSecondsF());
}
+float WebMediaPlayerAndroid::currentTimeFloat() const {
+ return currentTime();
+}
+
float WebMediaPlayerAndroid::currentTime() const {
// If the player is pending for a seek, return the seek time.
if (seeking())
@@ -220,6 +244,10 @@ const WebTimeRanges& WebMediaPlayerAndroid::buffered() {
return buffered_;
}
+float WebMediaPlayerAndroid::maxTimeSeekableFloat() const {
+ return maxTimeSeekable();
+}
+
float WebMediaPlayerAndroid::maxTimeSeekable() const {
// TODO(hclam): If this stream is not seekable this should return 0.
return duration();
@@ -260,6 +288,10 @@ WebMediaPlayer::MovieLoadType WebMediaPlayerAndroid::movieLoadType() const {
return WebMediaPlayer::MovieLoadTypeUnknown;
}
+float WebMediaPlayerAndroid::mediaTimeForTimeValueFloat(float timeValue) const {
+ return mediaTimeForTimeValue(timeValue);
+}
+
float WebMediaPlayerAndroid::mediaTimeForTimeValue(float timeValue) const {
return ConvertSecondsToTimestamp(timeValue).InSecondsF();
}
« no previous file with comments | « webkit/media/android/webmediaplayer_android.h ('k') | webkit/media/webmediaplayer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698