Index: media/blink/webmediaplayer_impl.h |
diff --git a/media/blink/webmediaplayer_impl.h b/media/blink/webmediaplayer_impl.h |
index 8fcae51c904b86ce45a47e463d2ef69341a3ce10..9cace20b631707f9542d932fd80eadc1915046b3 100644 |
--- a/media/blink/webmediaplayer_impl.h |
+++ b/media/blink/webmediaplayer_impl.h |
@@ -21,6 +21,7 @@ |
#include "base/timer/elapsed_timer.h" |
#include "base/timer/timer.h" |
#include "build/build_config.h" |
+#include "media/base/media_observer.h" |
#include "media/base/media_tracks.h" |
#include "media/base/pipeline_impl.h" |
#include "media/base/renderer_factory.h" |
@@ -211,6 +212,11 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl |
// TODO(hubbe): WMPI_CAST make private. |
void OnPipelineSeeked(bool time_updated); |
+ // Restart the player/pipeline as soon as possible. This will destroy the |
+ // current renderer, if any, and create a new one via the RendererFactory; and |
+ // then seek to resume playback at the current position. |
+ void ScheduleRestart(); |
+ |
// Distinct states that |delegate_| can be in. |
// TODO(sandersd): This should move into WebMediaPlayerDelegate. |
// (Public for testing.) |
@@ -254,9 +260,6 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl |
// |time_updated| is false. |
void DoSeek(base::TimeDelta time, bool time_updated); |
- // Ask for the renderer to be restarted (destructed and recreated). |
- void ScheduleRestart(); |
- |
// Called after |defer_load_cb_| has decided to allow the load. If |
// |defer_load_cb_| is null this is called immediately. |
void DoLoad(LoadType load_type, |
@@ -554,6 +557,9 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl |
int underflow_count_; |
std::unique_ptr<base::ElapsedTimer> underflow_timer_; |
+ // Monitors the player events. |
+ base::WeakPtr<MediaObserver> observer_; |
+ |
DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
}; |