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

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

Issue 13866046: Change original WebMediaPlayer signatures from float to double. (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
Index: webkit/media/android/webmediaplayer_android.cc
diff --git a/webkit/media/android/webmediaplayer_android.cc b/webkit/media/android/webmediaplayer_android.cc
index 7c524729cda9f3707b004c7ab2bccdcd55676101..878b9d0189dd7f571fd479eb47c14054737ba9c0 100644
--- a/webkit/media/android/webmediaplayer_android.cc
+++ b/webkit/media/android/webmediaplayer_android.cc
@@ -114,7 +114,7 @@ void WebMediaPlayerAndroid::seekFloat(float seconds) {
seek(seconds);
}
-void WebMediaPlayerAndroid::seek(float seconds) {
+void WebMediaPlayerAndroid::seek(double seconds) {
pending_seek_ = seconds;
seeking_ = true;
@@ -133,7 +133,7 @@ void WebMediaPlayerAndroid::setEndTimeFloat(float seconds) {
setEndTime(seconds);
}
-void WebMediaPlayerAndroid::setEndTime(float seconds) {
+void WebMediaPlayerAndroid::setEndTime(double seconds) {
// Deprecated.
// TODO(qinmin): Remove this from WebKit::WebMediaPlayer as it is never used.
DaleCurtis 2013/04/16 01:19:48 May lead to some unexpected breakage if this isn't
acolwell GONE FROM CHROMIUM 2013/04/16 16:58:15 This isn't called. I plan on removing this particu
}
@@ -142,7 +142,7 @@ void WebMediaPlayerAndroid::setRateFloat(float rate) {
setRate(rate);
}
-void WebMediaPlayerAndroid::setRate(float rate) {
+void WebMediaPlayerAndroid::setRate(double rate) {
NOTIMPLEMENTED();
DaleCurtis 2013/04/16 01:19:48 Ditto.
acolwell GONE FROM CHROMIUM 2013/04/16 16:58:15 Right now I'm just preserving existing behavior. I
}
@@ -150,7 +150,7 @@ void WebMediaPlayerAndroid::setVolumeFloat(float volume) {
setVolume(volume);
}
-void WebMediaPlayerAndroid::setVolume(float volume) {
+void WebMediaPlayerAndroid::setVolume(double volume) {
NOTIMPLEMENTED();
DaleCurtis 2013/04/16 01:19:48 Ditto.
acolwell GONE FROM CHROMIUM 2013/04/16 16:58:15 Just preserving existing behavior here.
}
@@ -199,18 +199,18 @@ bool WebMediaPlayerAndroid::seeking() const {
}
float WebMediaPlayerAndroid::durationFloat() const {
- return duration();
+ return static_cast<float>(duration());
DaleCurtis 2013/04/16 01:19:48 static cast is unnecessary?
acolwell GONE FROM CHROMIUM 2013/04/16 16:58:15 Done.
}
-float WebMediaPlayerAndroid::duration() const {
- return static_cast<float>(duration_.InSecondsF());
+double WebMediaPlayerAndroid::duration() const {
+ return duration_.InSecondsF();
}
float WebMediaPlayerAndroid::currentTimeFloat() const {
return currentTime();
}
-float WebMediaPlayerAndroid::currentTime() const {
+double WebMediaPlayerAndroid::currentTime() const {
// If the player is pending for a seek, return the seek time.
if (seeking())
return pending_seek_;
@@ -244,7 +244,7 @@ float WebMediaPlayerAndroid::maxTimeSeekableFloat() const {
return maxTimeSeekable();
}
-float WebMediaPlayerAndroid::maxTimeSeekable() const {
+double WebMediaPlayerAndroid::maxTimeSeekable() const {
// TODO(hclam): If this stream is not seekable this should return 0.
return duration();
}
@@ -288,7 +288,7 @@ float WebMediaPlayerAndroid::mediaTimeForTimeValueFloat(float timeValue) const {
return mediaTimeForTimeValue(timeValue);
}
-float WebMediaPlayerAndroid::mediaTimeForTimeValue(float timeValue) const {
+double WebMediaPlayerAndroid::mediaTimeForTimeValue(double timeValue) const {
return ConvertSecondsToTimestamp(timeValue).InSecondsF();
DaleCurtis 2013/04/16 01:19:48 The upconversion to double here could cause a user
acolwell GONE FROM CHROMIUM 2013/04/16 16:58:15 Only for really large time values that no one is l
}

Powered by Google App Engine
This is Rietveld 408576698