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