OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ |
6 #define CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ | 6 #define CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 17 matching lines...) Expand all Loading... | |
28 | 28 |
29 namespace content { | 29 namespace content { |
30 | 30 |
31 class ProxyMediaKeys; | 31 class ProxyMediaKeys; |
32 class WebMediaPlayerAndroid; | 32 class WebMediaPlayerAndroid; |
33 | 33 |
34 // Class for managing all the WebMediaPlayerAndroid objects in the same | 34 // Class for managing all the WebMediaPlayerAndroid objects in the same |
35 // RenderView. | 35 // RenderView. |
36 class RendererMediaPlayerManager : public RenderViewObserver { | 36 class RendererMediaPlayerManager : public RenderViewObserver { |
37 public: | 37 public: |
38 static const int kInvalidCdmId = 0; | |
39 | |
38 // Constructs a RendererMediaPlayerManager object for the |render_view|. | 40 // Constructs a RendererMediaPlayerManager object for the |render_view|. |
39 RendererMediaPlayerManager(RenderView* render_view); | 41 RendererMediaPlayerManager(RenderView* render_view); |
40 virtual ~RendererMediaPlayerManager(); | 42 virtual ~RendererMediaPlayerManager(); |
41 | 43 |
42 // RenderViewObserver overrides. | 44 // RenderViewObserver overrides. |
43 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 45 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
44 | 46 |
45 // Initializes a MediaPlayerAndroid object in browser process. | 47 // Initializes a MediaPlayerAndroid object in browser process. |
46 void Initialize(MediaPlayerHostMsg_Initialize_Type type, | 48 void Initialize(MediaPlayerHostMsg_Initialize_Type type, |
47 int player_id, | 49 int player_id, |
(...skipping 25 matching lines...) Expand all Loading... | |
73 | 75 |
74 // Destroys the player in the browser process | 76 // Destroys the player in the browser process |
75 void DestroyPlayer(int player_id); | 77 void DestroyPlayer(int player_id); |
76 | 78 |
77 // Requests the player to enter fullscreen. | 79 // Requests the player to enter fullscreen. |
78 void EnterFullscreen(int player_id, blink::WebFrame* frame); | 80 void EnterFullscreen(int player_id, blink::WebFrame* frame); |
79 | 81 |
80 // Requests the player to exit fullscreen. | 82 // Requests the player to exit fullscreen. |
81 void ExitFullscreen(int player_id); | 83 void ExitFullscreen(int player_id); |
82 | 84 |
85 // Requests the player with |player_id| to use the CDM with |cdm_id|. | |
86 // Does nothing if |cdm_id| is kInvalidCdmId. | |
ddorwin
2014/03/25 23:03:59
Why? Shouldn't it detach the two? (Equivalent to s
xhwang
2014/03/26 06:02:04
No, we don't support setMediaKeys(0). Currently we
| |
87 void SetCdm(int player_id, int cdm_id); | |
88 | |
83 #if defined(VIDEO_HOLE) | 89 #if defined(VIDEO_HOLE) |
84 // Requests an external surface for out-of-band compositing. | 90 // Requests an external surface for out-of-band compositing. |
85 void RequestExternalSurface(int player_id, const gfx::RectF& geometry); | 91 void RequestExternalSurface(int player_id, const gfx::RectF& geometry); |
86 | 92 |
87 // RenderViewObserver overrides. | 93 // RenderViewObserver overrides. |
88 virtual void DidCommitCompositorFrame() OVERRIDE; | 94 virtual void DidCommitCompositorFrame() OVERRIDE; |
89 #endif // defined(VIDEO_HOLE) | 95 #endif // defined(VIDEO_HOLE) |
90 | 96 |
91 // Encrypted media related methods. | 97 // Encrypted media related methods. |
92 void InitializeCdm(int cdm_id, | 98 void InitializeCdm(int cdm_id, |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
193 | 199 |
194 // WebFrame of pending fullscreen request. | 200 // WebFrame of pending fullscreen request. |
195 blink::WebFrame* pending_fullscreen_frame_; | 201 blink::WebFrame* pending_fullscreen_frame_; |
196 | 202 |
197 DISALLOW_COPY_AND_ASSIGN(RendererMediaPlayerManager); | 203 DISALLOW_COPY_AND_ASSIGN(RendererMediaPlayerManager); |
198 }; | 204 }; |
199 | 205 |
200 } // namespace content | 206 } // namespace content |
201 | 207 |
202 #endif // CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ | 208 #endif // CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ |
OLD | NEW |