| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 // Destroys the player in the browser process | 74 // Destroys the player in the browser process |
| 75 void DestroyPlayer(int player_id); | 75 void DestroyPlayer(int player_id); |
| 76 | 76 |
| 77 // Requests the player to enter fullscreen. | 77 // Requests the player to enter fullscreen. |
| 78 void EnterFullscreen(int player_id); | 78 void EnterFullscreen(int player_id); |
| 79 | 79 |
| 80 // Requests the player to exit fullscreen. | 80 // Requests the player to exit fullscreen. |
| 81 void ExitFullscreen(int player_id); | 81 void ExitFullscreen(int player_id); |
| 82 | 82 |
| 83 #if defined(GOOGLE_TV) | 83 #if defined(VIDEO_HOLE) |
| 84 // Requests an external surface for out-of-band compositing. | 84 // Requests an external surface for out-of-band compositing. |
| 85 void RequestExternalSurface(int player_id, const gfx::RectF& geometry); | 85 void RequestExternalSurface(int player_id, const gfx::RectF& geometry); |
| 86 | 86 |
| 87 // RenderViewObserver overrides. | 87 // RenderViewObserver overrides. |
| 88 virtual void DidCommitCompositorFrame() OVERRIDE; | 88 virtual void DidCommitCompositorFrame() OVERRIDE; |
| 89 #endif | 89 #endif // defined(VIDEO_HOLE) |
| 90 | 90 |
| 91 // Encrypted media related methods. | 91 // Encrypted media related methods. |
| 92 void InitializeCDM(int media_keys_id, | 92 void InitializeCDM(int media_keys_id, |
| 93 ProxyMediaKeys* media_keys, | 93 ProxyMediaKeys* media_keys, |
| 94 const std::vector<uint8>& uuid, | 94 const std::vector<uint8>& uuid, |
| 95 const GURL& frame_url); | 95 const GURL& frame_url); |
| 96 void CreateSession(int media_keys_id, | 96 void CreateSession(int media_keys_id, |
| 97 uint32 session_id, | 97 uint32 session_id, |
| 98 const std::string& type, | 98 const std::string& type, |
| 99 const std::vector<uint8>& init_data); | 99 const std::vector<uint8>& init_data); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 125 | 125 |
| 126 // Checks whether the Webframe is in fullscreen. | 126 // Checks whether the Webframe is in fullscreen. |
| 127 bool IsInFullscreen(blink::WebFrame* frame); | 127 bool IsInFullscreen(blink::WebFrame* frame); |
| 128 | 128 |
| 129 // Gets the pointer to WebMediaPlayerAndroid given the |player_id|. | 129 // Gets the pointer to WebMediaPlayerAndroid given the |player_id|. |
| 130 WebMediaPlayerAndroid* GetMediaPlayer(int player_id); | 130 WebMediaPlayerAndroid* GetMediaPlayer(int player_id); |
| 131 | 131 |
| 132 // Gets the pointer to ProxyMediaKeys given the |media_keys_id|. | 132 // Gets the pointer to ProxyMediaKeys given the |media_keys_id|. |
| 133 ProxyMediaKeys* GetMediaKeys(int media_keys_id); | 133 ProxyMediaKeys* GetMediaKeys(int media_keys_id); |
| 134 | 134 |
| 135 #if defined(GOOGLE_TV) | 135 #if defined(VIDEO_HOLE) |
| 136 // Gets the list of media players with video geometry changes. | 136 // Gets the list of media players with video geometry changes. |
| 137 void RetrieveGeometryChanges(std::map<int, gfx::RectF>* changes); | 137 void RetrieveGeometryChanges(std::map<int, gfx::RectF>* changes); |
| 138 #endif | 138 #endif // defined(VIDEO_HOLE) |
| 139 | 139 |
| 140 private: | 140 private: |
| 141 // Message handlers. | 141 // Message handlers. |
| 142 void OnMediaMetadataChanged(int player_id, | 142 void OnMediaMetadataChanged(int player_id, |
| 143 base::TimeDelta duration, | 143 base::TimeDelta duration, |
| 144 int width, | 144 int width, |
| 145 int height, | 145 int height, |
| 146 bool success); | 146 bool success); |
| 147 void OnMediaPlaybackCompleted(int player_id); | 147 void OnMediaPlaybackCompleted(int player_id); |
| 148 void OnMediaBufferingUpdate(int player_id, int percent); | 148 void OnMediaBufferingUpdate(int player_id, int percent); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 | 185 |
| 186 // WebFrame of the fullscreen video. | 186 // WebFrame of the fullscreen video. |
| 187 blink::WebFrame* fullscreen_frame_; | 187 blink::WebFrame* fullscreen_frame_; |
| 188 | 188 |
| 189 DISALLOW_COPY_AND_ASSIGN(RendererMediaPlayerManager); | 189 DISALLOW_COPY_AND_ASSIGN(RendererMediaPlayerManager); |
| 190 }; | 190 }; |
| 191 | 191 |
| 192 } // namespace content | 192 } // namespace content |
| 193 | 193 |
| 194 #endif // CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ | 194 #endif // CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ |
| OLD | NEW |