| 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. |
| 87 // TODO(xhwang): Update this when we implement setCdm(0). |
| 88 void SetCdm(int player_id, int cdm_id); |
| 89 |
| 83 #if defined(VIDEO_HOLE) | 90 #if defined(VIDEO_HOLE) |
| 84 // Requests an external surface for out-of-band compositing. | 91 // Requests an external surface for out-of-band compositing. |
| 85 void RequestExternalSurface(int player_id, const gfx::RectF& geometry); | 92 void RequestExternalSurface(int player_id, const gfx::RectF& geometry); |
| 86 | 93 |
| 87 // RenderViewObserver overrides. | 94 // RenderViewObserver overrides. |
| 88 virtual void DidCommitCompositorFrame() OVERRIDE; | 95 virtual void DidCommitCompositorFrame() OVERRIDE; |
| 89 #endif // defined(VIDEO_HOLE) | 96 #endif // defined(VIDEO_HOLE) |
| 90 | 97 |
| 91 // Encrypted media related methods. | 98 // Encrypted media related methods. |
| 92 void InitializeCdm(int cdm_id, | 99 void InitializeCdm(int cdm_id, |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 | 200 |
| 194 // WebFrame of pending fullscreen request. | 201 // WebFrame of pending fullscreen request. |
| 195 blink::WebFrame* pending_fullscreen_frame_; | 202 blink::WebFrame* pending_fullscreen_frame_; |
| 196 | 203 |
| 197 DISALLOW_COPY_AND_ASSIGN(RendererMediaPlayerManager); | 204 DISALLOW_COPY_AND_ASSIGN(RendererMediaPlayerManager); |
| 198 }; | 205 }; |
| 199 | 206 |
| 200 } // namespace content | 207 } // namespace content |
| 201 | 208 |
| 202 #endif // CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ | 209 #endif // CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ |
| OLD | NEW |