Index: media/base/wall_clock_time_source.h |
diff --git a/media/base/wall_clock_time_source.h b/media/base/wall_clock_time_source.h |
index 1de651889f45441640e52bed0d725ca4542c0564..22283192c39414b079589721438606c5dcf30fc6 100644 |
--- a/media/base/wall_clock_time_source.h |
+++ b/media/base/wall_clock_time_source.h |
@@ -7,13 +7,10 @@ |
#include "base/memory/scoped_ptr.h" |
#include "base/synchronization/lock.h" |
+#include "base/time/default_tick_clock.h" |
#include "media/base/media_export.h" |
#include "media/base/time_source.h" |
-namespace base { |
-class TickClock; |
-} |
- |
namespace media { |
// A time source that uses interpolation based on the system clock. |
@@ -28,14 +25,23 @@ class MEDIA_EXPORT WallClockTimeSource : public TimeSource { |
void SetPlaybackRate(double playback_rate) override; |
void SetMediaTime(base::TimeDelta time) override; |
base::TimeDelta CurrentMediaTime() override; |
- base::TimeTicks GetWallClockTime(base::TimeDelta time) override; |
+ bool GetWallClockTimes( |
+ const std::vector<base::TimeDelta>& media_timestamps, |
+ std::vector<base::TimeTicks>* wall_clock_times) override; |
- void SetTickClockForTesting(scoped_ptr<base::TickClock> tick_clock); |
+ void set_tick_clock_for_testing(base::TickClock* tick_clock) { |
+ tick_clock_ = tick_clock; |
+ } |
private: |
base::TimeDelta CurrentMediaTime_Locked(); |
- scoped_ptr<base::TickClock> tick_clock_; |
+ // Allow for an injectable tick clock for testing. |
+ base::DefaultTickClock default_tick_clock_; |
+ |
+ // If specified, used instead of |default_tick_clock_|. |
+ base::TickClock* tick_clock_; |
+ |
bool ticking_; |
// While ticking we can interpolate the current media time by measuring the |