diff options
-rw-r--r-- | media/base/clock.cc | 18 | ||||
-rw-r--r-- | media/base/clock.h | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/media/base/clock.cc b/media/base/clock.cc index aa0dbfb..61096177 100644 --- a/media/base/clock.cc +++ b/media/base/clock.cc @@ -32,6 +32,15 @@ base::TimeDelta Clock::Pause() { return media_time_; } +void Clock::SetPlaybackRate(float playback_rate) { + if (playing_) { + base::Time time = GetTimeFromProvider(); + media_time_ = ElapsedViaProvidedTime(time); + reference_ = time; + } + playback_rate_ = playback_rate; +} + void Clock::SetTime(const base::TimeDelta& time) { if (time == kNoTimestamp) { NOTREACHED(); @@ -43,15 +52,6 @@ void Clock::SetTime(const base::TimeDelta& time) { media_time_ = time; } -void Clock::SetPlaybackRate(float playback_rate) { - if (playing_) { - base::Time time = GetTimeFromProvider(); - media_time_ = ElapsedViaProvidedTime(time); - reference_ = time; - } - playback_rate_ = playback_rate; -} - base::TimeDelta Clock::Elapsed() const { if (!playing_) { return media_time_; diff --git a/media/base/clock.h b/media/base/clock.h index df94cad..8e046b0 100644 --- a/media/base/clock.h +++ b/media/base/clock.h @@ -5,7 +5,7 @@ #ifndef MEDIA_BASE_CLOCK_H_ #define MEDIA_BASE_CLOCK_H_ -#include "base/gtest_prod_util.h" +#include "base/basictypes.h" #include "base/scoped_ptr.h" #include "base/time.h" |