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..2be13e8c24d9719091ac759243687640773d8f14 100644 |
--- a/media/remoting/remoting_interstitial_ui.h |
+++ b/media/remoting/remoting_interstitial_ui.h |
@@ -5,36 +5,30 @@ |
#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" |
+#include "ui/gfx/geometry/size.h" |
miu
2016/12/20 00:16:17
nit: Since gfx::Size only appears as a const-ref i
xjz
2016/12/20 19:32:29
Done.
|
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 { |
miu
2016/12/20 00:16:17
naming: Let's name these so that they describe whi
xjz
2016/12/20 19:32:28
Done. As chatted face to face, the 3rd one is set
|
+ NONE, // No interstitial is drawn. Show background image only. |
+ SUCCESS, |
+ FAIL, |
}; |
+// Draw remoting interstitial on |background_image| and show it. |
+// |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 NONE, show background image only. |
+void ShowRemotingInterstitial(VideoRendererSink* video_renderer_sink, |
miu
2016/12/20 00:16:17
style nit: Please place the video_renderer_sink "o
xjz
2016/12/20 19:32:28
Done.
|
+ const SkBitmap& background_image, |
+ const gfx::Size& canvas_size, |
+ RemotingInterstitialType interstitial_type); |
+ |
} // namespace media |
#endif // MEDIA_REMOTING_REMOTING_INTERSTITIAL_UI_H_ |