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

Unified Diff: media/blink/webmediaplayer_impl.h

Issue 2389473002: Media Remoting: Add RemotingController. (Closed)
Patch Set: Rebased. Created 4 years, 2 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 | « media/base/pipeline_metadata.cc ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « media/base/pipeline_metadata.cc ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698