Chromium Code Reviews| 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..58ff3fd6f31bd85b2e2cd47f89f248c48424a25d 100644 |
| --- a/media/remoting/remoting_interstitial_ui.h |
| +++ b/media/remoting/remoting_interstitial_ui.h |
| @@ -5,36 +5,33 @@ |
| #ifndef MEDIA_REMOTING_REMOTING_INTERSTITIAL_UI_H_ |
| #define MEDIA_REMOTING_REMOTING_INTERSTITIAL_UI_H_ |
| -#include "base/callback.h" |
| -#include "base/memory/ref_counted.h" |
| -#include "media/base/pipeline_metadata.h" |
| #include "third_party/skia/include/core/SkBitmap.h" |
| +namespace gfx { |
| +class Size; |
| +} |
| + |
| namespace media { |
| -class VideoFrame; |
| class VideoRendererSink; |
| -class RemotingInterstitialUI { |
| - public: |
| - RemotingInterstitialUI(VideoRendererSink* video_renderer_sink, |
| - const PipelineMetadata& pipeline_metadata); |
| - ~RemotingInterstitialUI(); |
| - |
| - void ShowInterstitial(bool is_remoting_successful); |
| - |
| - private: |
| - // Gets an 'interstitial' VideoFrame to paint on the media player when the |
| - // video is being played remotely. |
| - scoped_refptr<VideoFrame> GetInterstitial(const SkBitmap& background_image, |
| - bool is_remoting_successful); |
| - |
| - VideoRendererSink* const video_renderer_sink_; // Outlives this class. |
| - PipelineMetadata pipeline_metadata_; |
| - |
| - DISALLOW_COPY_AND_ASSIGN(RemotingInterstitialUI); |
| +enum RemotingInterstitialType { |
| + BETWEEN_SESSIONS, // Show background image only. |
| + IN_SESSION, // Show MEDIA_REMOTING_CASTING_VIDEO_TEXT. |
| + ENCRYPTED_MEDIA_FATAL_ERROR, // Show MEDIA_REMOTING_CAST_ERROR_TEXT. |
| }; |
| +// Draw remoting interstitial on |background_image| and show it. |
|
miu
2016/12/20 21:21:04
nit: First sentence should be something like "Pain
xjz
2016/12/20 22:15:37
Done.
|
| +// |background_image| will be scaled to fit in |canvas_size|, but keep its |
| +// aspect ratio. When has different aspect ratio with |canvas_size|, scaled |
| +// |background_image| will be centered in the canvas. When |background_image| |
| +// is empty, interstitial will be drawn on a blank and black background. When |
| +// |interstial_type| is BETWEEN_SESSIONS, show background image only. |
| +void PaintRemotingInterstitial(const SkBitmap& background_image, |
| + const gfx::Size& canvas_size, |
| + RemotingInterstitialType interstitial_type, |
| + VideoRendererSink* video_renderer_sink); |
| + |
| } // namespace media |
| #endif // MEDIA_REMOTING_REMOTING_INTERSTITIAL_UI_H_ |