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

Unified Diff: media/remoting/remote_renderer_impl.h

Issue 2566223005: Media Remoting: Update remoting interstitial when status changes. (Closed)
Patch Set: Show unprocessed background image when exiting remoting. Created 4 years 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 | « no previous file | media/remoting/remote_renderer_impl.cc » ('j') | media/remoting/remote_renderer_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/remoting/remote_renderer_impl.h
diff --git a/media/remoting/remote_renderer_impl.h b/media/remoting/remote_renderer_impl.h
index a396562e92e53984d5a9c98094d9cf379183daef..e3e6916e68a97bfa0f797d69d89959ec14e188a1 100644
--- a/media/remoting/remote_renderer_impl.h
+++ b/media/remoting/remote_renderer_impl.h
@@ -67,6 +67,16 @@ class RemoteRendererImpl : public Renderer {
base::WeakPtr<RemoteRendererImpl> self,
std::unique_ptr<remoting::pb::RpcMessage> message);
+ // Callback when remoting interstitial needs to be updated. Will post task to
+ // media thread to avoid threading race condition.
+ static void RequestUpdateInterstitialOnMainThread(
+ scoped_refptr<base::SingleThreadTaskRunner> media_task_runner,
+ base::WeakPtr<RemoteRendererImpl> remote_renderer_impl,
+ VideoRendererSink* video_renderer_sink,
+ const SkBitmap& background_image,
+ const gfx::Size& canvas_size,
+ RemotingInterstitialType interstitial_type);
+
public:
// media::Renderer implementation.
void Initialize(DemuxerStreamProvider* demuxer_stream_provider,
@@ -121,12 +131,15 @@ class RemoteRendererImpl : public Renderer {
void OnStatisticsUpdate(std::unique_ptr<remoting::pb::RpcMessage> message);
void OnDurationChange(std::unique_ptr<remoting::pb::RpcMessage> message);
+ // Called to update the remoting interstitial.
+ void UpdateInterstitial(VideoRendererSink* video_renderer_sink,
+ const SkBitmap& background_image,
+ const gfx::Size& canvas_size,
+ RemotingInterstitialType interstitial_type);
+
// Shut down remoting session.
void OnFatalError(PipelineStatus status);
- // Show interstial accordingly.
- void UpdateInterstitial();
-
State state_;
const scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
const scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_;
@@ -160,8 +173,6 @@ class RemoteRendererImpl : public Renderer {
CdmAttachedCB cdm_attached_cb_;
base::Closure flush_cb_;
- RemotingInterstitialUI interstitial_ui_;
-
base::WeakPtrFactory<RemoteRendererImpl> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(RemoteRendererImpl);
« no previous file with comments | « no previous file | media/remoting/remote_renderer_impl.cc » ('j') | media/remoting/remote_renderer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698