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

Unified Diff: media/remoting/renderer_controller.h

Issue 2696663002: Media Remoting: Don't auto suspend the media pipeline. (Closed)
Patch Set: Disable other auto suspend for optimization. Created 3 years, 10 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: media/remoting/renderer_controller.h
diff --git a/media/remoting/renderer_controller.h b/media/remoting/renderer_controller.h
index b9426f549b87ee1fe2fa0a03fd1f6cd7ccad08b2..dac0546525f93ee348b150ccc652750a867ae75f 100644
--- a/media/remoting/renderer_controller.h
+++ b/media/remoting/renderer_controller.h
@@ -44,10 +44,7 @@ class RendererController final : public SharedSession::Client,
void OnPlaying() override;
void OnPaused() override;
void OnSetPoster(const GURL& poster) override;
-
- void SetSwitchRendererCallback(const base::Closure& cb);
- void SetRemoteSinkAvailableChangedCallback(
- const base::Callback<void(bool)>& cb);
+ void SetClient(MediaObserverClient* client) override;
using ShowInterstitialCallback = base::Callback<
void(const SkBitmap&, const gfx::Size&, InterstitialType type)>;
@@ -172,12 +169,6 @@ class RendererController final : public SharedSession::Client,
// and never start again for the lifetime of this controller.
bool encountered_renderer_fatal_error_ = false;
- // The callback to switch the media renderer.
- base::Closure switch_renderer_cb_;
-
- // Called when remoting sink availability is changed.
- base::Callback<void(bool)> sink_available_changed_cb_;
-
// This is initially the SharedSession passed to the ctor, and might be
// replaced with a different instance later if OnSetCdm() is called.
scoped_refptr<SharedSession> session_;
@@ -213,6 +204,8 @@ class RendererController final : public SharedSession::Client,
// Records session events of interest.
SessionMetricsRecorder metrics_recorder_;
+ MediaObserverClient* client_; // Outlives this class.
+
base::WeakPtrFactory<RendererController> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(RendererController);

Powered by Google App Engine
This is Rietveld 408576698