OLD | NEW |
| (Empty) |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef MEDIA_REMOTING_REMOTING_INTERSTITIAL_UI_H_ | |
6 #define MEDIA_REMOTING_REMOTING_INTERSTITIAL_UI_H_ | |
7 | |
8 #include "third_party/skia/include/core/SkBitmap.h" | |
9 | |
10 namespace gfx { | |
11 class Size; | |
12 } | |
13 | |
14 namespace media { | |
15 | |
16 class VideoRendererSink; | |
17 | |
18 enum RemotingInterstitialType { | |
19 BETWEEN_SESSIONS, // Show background image only. | |
20 IN_SESSION, // Show MEDIA_REMOTING_CASTING_VIDEO_TEXT. | |
21 ENCRYPTED_MEDIA_FATAL_ERROR, // Show MEDIA_REMOTING_CAST_ERROR_TEXT. | |
22 }; | |
23 | |
24 // Paint an interstitial frame and send it to the given VideoRendererSink. | |
25 // |background_image| may be scaled accordingly without changing its aspect | |
26 // ratio. When has different aspect ratio with |natural_size|, scaled | |
27 // |background_image| will be centered in the canvas. When |background_image| | |
28 // is empty, interstitial will be drawn on a blank and black background. When | |
29 // |interstial_type| is BETWEEN_SESSIONS, show background image only. | |
30 void PaintRemotingInterstitial(const SkBitmap& background_image, | |
31 const gfx::Size& natural_size, | |
32 RemotingInterstitialType interstitial_type, | |
33 VideoRendererSink* video_renderer_sink); | |
34 | |
35 } // namespace media | |
36 | |
37 #endif // MEDIA_REMOTING_REMOTING_INTERSTITIAL_UI_H_ | |
OLD | NEW |