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); |