| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 | 86 |
| 87 // RenderViewObserver overrides. | 87 // RenderViewObserver overrides. |
| 88 virtual void DidCommitCompositorFrame() OVERRIDE; | 88 virtual void DidCommitCompositorFrame() OVERRIDE; |
| 89 #endif | 89 #endif |
| 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 GenerateKeyRequest(int media_keys_id, | 96 void CreateSession(int media_keys_id, |
| 97 uint32 reference_id, | 97 uint32 reference_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); |
| 100 void AddKey(int media_keys_id, | 100 void UpdateSession(int media_keys_id, |
| 101 uint32 reference_id, | 101 uint32 reference_id, |
| 102 const std::vector<uint8>& key, | 102 const std::vector<uint8>& response); |
| 103 const std::vector<uint8>& init_data); | 103 void ReleaseSession(int media_keys_id, uint32 reference_id); |
| 104 void CancelKeyRequest(int media_keys_id, uint32 reference_id); | |
| 105 | 104 |
| 106 // Registers and unregisters a WebMediaPlayerAndroid object. | 105 // Registers and unregisters a WebMediaPlayerAndroid object. |
| 107 int RegisterMediaPlayer(WebMediaPlayerAndroid* player); | 106 int RegisterMediaPlayer(WebMediaPlayerAndroid* player); |
| 108 void UnregisterMediaPlayer(int player_id); | 107 void UnregisterMediaPlayer(int player_id); |
| 109 | 108 |
| 110 // Registers a ProxyMediaKeys object. There must be a WebMediaPlayerAndroid | 109 // Registers a ProxyMediaKeys object. There must be a WebMediaPlayerAndroid |
| 111 // object already registered for this id, and it is unregistered when the | 110 // object already registered for this id, and it is unregistered when the |
| 112 // player is unregistered. For now |media_keys_id| is the same as player_id | 111 // player is unregistered. For now |media_keys_id| is the same as player_id |
| 113 // used in other methods. | 112 // used in other methods. |
| 114 void RegisterMediaKeys(int media_keys_id, ProxyMediaKeys* media_keys); | 113 void RegisterMediaKeys(int media_keys_id, ProxyMediaKeys* media_keys); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 void OnMediaPlayerReleased(int player_id); | 154 void OnMediaPlayerReleased(int player_id); |
| 156 void OnConnectedToRemoteDevice(int player_id); | 155 void OnConnectedToRemoteDevice(int player_id); |
| 157 void OnDisconnectedFromRemoteDevice(int player_id); | 156 void OnDisconnectedFromRemoteDevice(int player_id); |
| 158 void OnDidExitFullscreen(int player_id); | 157 void OnDidExitFullscreen(int player_id); |
| 159 void OnDidEnterFullscreen(int player_id); | 158 void OnDidEnterFullscreen(int player_id); |
| 160 void OnPlayerPlay(int player_id); | 159 void OnPlayerPlay(int player_id); |
| 161 void OnPlayerPause(int player_id); | 160 void OnPlayerPause(int player_id); |
| 162 void OnRequestFullscreen(int player_id); | 161 void OnRequestFullscreen(int player_id); |
| 163 void OnSessionCreated(int media_keys_id, | 162 void OnSessionCreated(int media_keys_id, |
| 164 uint32 reference_id, | 163 uint32 reference_id, |
| 165 const std::string& session_id); | 164 const std::string& web_session_id); |
| 166 void OnSessionMessage(int media_keys_id, | 165 void OnSessionMessage(int media_keys_id, |
| 167 uint32 reference_id, | 166 uint32 reference_id, |
| 168 const std::vector<uint8>& message, | 167 const std::vector<uint8>& message, |
| 169 const std::string& destination_url); | 168 const std::string& destination_url); |
| 170 void OnSessionReady(int media_keys_id, uint32 reference_id); | 169 void OnSessionReady(int media_keys_id, uint32 reference_id); |
| 171 void OnSessionClosed(int media_keys_id, uint32 reference_id); | 170 void OnSessionClosed(int media_keys_id, uint32 reference_id); |
| 172 void OnSessionError(int media_keys_id, | 171 void OnSessionError(int media_keys_id, |
| 173 uint32 reference_id, | 172 uint32 reference_id, |
| 174 media::MediaKeys::KeyError error_code, | 173 media::MediaKeys::KeyError error_code, |
| 175 int system_code); | 174 int system_code); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 186 | 185 |
| 187 // WebFrame of the fullscreen video. | 186 // WebFrame of the fullscreen video. |
| 188 blink::WebFrame* fullscreen_frame_; | 187 blink::WebFrame* fullscreen_frame_; |
| 189 | 188 |
| 190 DISALLOW_COPY_AND_ASSIGN(RendererMediaPlayerManager); | 189 DISALLOW_COPY_AND_ASSIGN(RendererMediaPlayerManager); |
| 191 }; | 190 }; |
| 192 | 191 |
| 193 } // namespace content | 192 } // namespace content |
| 194 | 193 |
| 195 #endif // CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ | 194 #endif // CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ |
| OLD | NEW |