Index: media/remoting/remoting_interstitial_ui.h |
diff --git a/media/remoting/remoting_interstitial_ui.h b/media/remoting/remoting_interstitial_ui.h |
index 7807628258326b2bc7d64d54cc7567d41b696cdb..9f1eeeb20df3d6555315f2f0028b6656ee83692b 100644 |
--- a/media/remoting/remoting_interstitial_ui.h |
+++ b/media/remoting/remoting_interstitial_ui.h |
@@ -7,18 +7,20 @@ |
#include "base/callback.h" |
#include "base/memory/ref_counted.h" |
-#include "media/base/pipeline_metadata.h" |
+#include "base/memory/weak_ptr.h" |
#include "third_party/skia/include/core/SkBitmap.h" |
namespace media { |
class VideoFrame; |
class VideoRendererSink; |
+class RemotingRendererController; |
class RemotingInterstitialUI { |
public: |
RemotingInterstitialUI(VideoRendererSink* video_renderer_sink, |
- const PipelineMetadata& pipeline_metadata); |
+ const base::WeakPtr<RemotingRendererController>& |
+ remoting_renderer_controller); |
~RemotingInterstitialUI(); |
void ShowInterstitial(bool is_remoting_successful); |
@@ -29,8 +31,18 @@ class RemotingInterstitialUI { |
scoped_refptr<VideoFrame> GetInterstitial(const SkBitmap& background_image, |
bool is_remoting_successful); |
+ // Called when poster image is downloaded. |
+ void PosterDownloaded(bool is_remoting_successful, |
miu
2016/11/29 22:56:08
See comments in remoting_renderer_controller.h/.cc
xjz
2016/12/02 19:23:10
Done.
|
+ const SkBitmap& poster_image); |
+ |
+ // Draw and display the interstitial. |
+ void DisplayInterstitial(const SkBitmap& poster_image, |
+ bool is_remoting_successful); |
+ |
VideoRendererSink* const video_renderer_sink_; // Outlives this class. |
- PipelineMetadata pipeline_metadata_; |
+ const base::WeakPtr<RemotingRendererController> remoting_renderer_controller_; |
+ |
+ base::WeakPtrFactory<RemotingInterstitialUI> weak_factory_; |
DISALLOW_COPY_AND_ASSIGN(RemotingInterstitialUI); |
}; |