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 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 // Class for managing all the WebMediaPlayerAndroid objects in the same | 31 // Class for managing all the WebMediaPlayerAndroid objects in the same |
32 // RenderFrame. | 32 // RenderFrame. |
33 class RendererMediaPlayerManager : public RenderFrameObserver { | 33 class RendererMediaPlayerManager : public RenderFrameObserver { |
34 public: | 34 public: |
35 // Constructs a RendererMediaPlayerManager object for the |render_frame|. | 35 // Constructs a RendererMediaPlayerManager object for the |render_frame|. |
36 explicit RendererMediaPlayerManager(RenderFrame* render_frame); | 36 explicit RendererMediaPlayerManager(RenderFrame* render_frame); |
37 virtual ~RendererMediaPlayerManager(); | 37 virtual ~RendererMediaPlayerManager(); |
38 | 38 |
39 // RenderFrameObserver overrides. | 39 // RenderFrameObserver overrides. |
40 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 40 virtual bool OnMessageReceived(const IPC::Message& msg) override; |
41 virtual void WasHidden() OVERRIDE; | 41 virtual void WasHidden() override; |
42 | 42 |
43 // Initializes a MediaPlayerAndroid object in browser process. | 43 // Initializes a MediaPlayerAndroid object in browser process. |
44 void Initialize(MediaPlayerHostMsg_Initialize_Type type, | 44 void Initialize(MediaPlayerHostMsg_Initialize_Type type, |
45 int player_id, | 45 int player_id, |
46 const GURL& url, | 46 const GURL& url, |
47 const GURL& first_party_for_cookies, | 47 const GURL& first_party_for_cookies, |
48 int demuxer_client_id, | 48 int demuxer_client_id, |
49 const GURL& frame_url, | 49 const GURL& frame_url, |
50 bool allow_credentials); | 50 bool allow_credentials); |
51 | 51 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // Requests the player with |player_id| to use the CDM with |cdm_id|. | 89 // Requests the player with |player_id| to use the CDM with |cdm_id|. |
90 // Does nothing if |cdm_id| is kInvalidCdmId. | 90 // Does nothing if |cdm_id| is kInvalidCdmId. |
91 // TODO(xhwang): Update this when we implement setCdm(0). | 91 // TODO(xhwang): Update this when we implement setCdm(0). |
92 void SetCdm(int player_id, int cdm_id); | 92 void SetCdm(int player_id, int cdm_id); |
93 | 93 |
94 #if defined(VIDEO_HOLE) | 94 #if defined(VIDEO_HOLE) |
95 // Requests an external surface for out-of-band compositing. | 95 // Requests an external surface for out-of-band compositing. |
96 void RequestExternalSurface(int player_id, const gfx::RectF& geometry); | 96 void RequestExternalSurface(int player_id, const gfx::RectF& geometry); |
97 | 97 |
98 // RenderFrameObserver overrides. | 98 // RenderFrameObserver overrides. |
99 virtual void DidCommitCompositorFrame() OVERRIDE; | 99 virtual void DidCommitCompositorFrame() override; |
100 | 100 |
101 // Returns true if a media player should use video-overlay for the embedded | 101 // Returns true if a media player should use video-overlay for the embedded |
102 // encrypted video. | 102 // encrypted video. |
103 bool ShouldUseVideoOverlayForEmbeddedEncryptedVideo(); | 103 bool ShouldUseVideoOverlayForEmbeddedEncryptedVideo(); |
104 #endif // defined(VIDEO_HOLE) | 104 #endif // defined(VIDEO_HOLE) |
105 | 105 |
106 // Registers and unregisters a WebMediaPlayerAndroid object. | 106 // Registers and unregisters a WebMediaPlayerAndroid object. |
107 int RegisterMediaPlayer(WebMediaPlayerAndroid* player); | 107 int RegisterMediaPlayer(WebMediaPlayerAndroid* player); |
108 void UnregisterMediaPlayer(int player_id); | 108 void UnregisterMediaPlayer(int player_id); |
109 | 109 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 | 173 |
174 // WebFrame of pending fullscreen request. | 174 // WebFrame of pending fullscreen request. |
175 blink::WebFrame* pending_fullscreen_frame_; | 175 blink::WebFrame* pending_fullscreen_frame_; |
176 | 176 |
177 DISALLOW_COPY_AND_ASSIGN(RendererMediaPlayerManager); | 177 DISALLOW_COPY_AND_ASSIGN(RendererMediaPlayerManager); |
178 }; | 178 }; |
179 | 179 |
180 } // namespace content | 180 } // namespace content |
181 | 181 |
182 #endif // CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ | 182 #endif // CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ |
OLD | NEW |