| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 MEDIA_BASE_ANDROID_MEDIA_PLAYER_MANAGER_H_ | 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_PLAYER_MANAGER_H_ |
| 6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_MANAGER_H_ | 6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 // Called by the player to get a hardware protected surface. | 87 // Called by the player to get a hardware protected surface. |
| 88 virtual void OnProtectedSurfaceRequested(int player_id) = 0; | 88 virtual void OnProtectedSurfaceRequested(int player_id) = 0; |
| 89 | 89 |
| 90 // The following five methods are related to EME. | 90 // The following five methods are related to EME. |
| 91 // TODO(xhwang): These methods needs to be decoupled from MediaPlayerManager | 91 // TODO(xhwang): These methods needs to be decoupled from MediaPlayerManager |
| 92 // to support the W3C Working Draft version of the EME spec. | 92 // to support the W3C Working Draft version of the EME spec. |
| 93 // http://crbug.com/315312 | 93 // http://crbug.com/315312 |
| 94 | 94 |
| 95 // Called when MediaDrmBridge determines a SessionId. | 95 // Called when MediaDrmBridge determines a SessionId. |
| 96 virtual void OnSessionCreated(int media_keys_id, | 96 virtual void OnSessionCreated(int media_keys_id, |
| 97 uint32 reference_id, | 97 uint32 session_id, |
| 98 const std::string& session_id) = 0; | 98 const std::string& web_session_id) = 0; |
| 99 | 99 |
| 100 // Called when MediaDrmBridge wants to send a Message event. | 100 // Called when MediaDrmBridge wants to send a Message event. |
| 101 virtual void OnSessionMessage(int media_keys_id, | 101 virtual void OnSessionMessage(int media_keys_id, |
| 102 uint32 reference_id, | 102 uint32 session_id, |
| 103 const std::vector<uint8>& message, | 103 const std::vector<uint8>& message, |
| 104 const std::string& destination_url) = 0; | 104 const std::string& destination_url) = 0; |
| 105 | 105 |
| 106 // Called when MediaDrmBridge wants to send a Ready event. | 106 // Called when MediaDrmBridge wants to send a Ready event. |
| 107 virtual void OnSessionReady(int media_keys_id, uint32 reference_id) = 0; | 107 virtual void OnSessionReady(int media_keys_id, uint32 session_id) = 0; |
| 108 | 108 |
| 109 // Called when MediaDrmBridge wants to send a Closed event. | 109 // Called when MediaDrmBridge wants to send a Closed event. |
| 110 virtual void OnSessionClosed(int media_keys_id, uint32 reference_id) = 0; | 110 virtual void OnSessionClosed(int media_keys_id, uint32 session_id) = 0; |
| 111 | 111 |
| 112 // Called when MediaDrmBridge wants to send an Error event. | 112 // Called when MediaDrmBridge wants to send an Error event. |
| 113 virtual void OnSessionError(int media_keys_id, | 113 virtual void OnSessionError(int media_keys_id, |
| 114 uint32 reference_id, | 114 uint32 session_id, |
| 115 media::MediaKeys::KeyError error_code, | 115 media::MediaKeys::KeyError error_code, |
| 116 int system_code) = 0; | 116 int system_code) = 0; |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 } // namespace media | 119 } // namespace media |
| 120 | 120 |
| 121 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_MANAGER_H_ | 121 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_MANAGER_H_ |
| OLD | NEW |