OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CRYPTO_RENDERER_CDM_MANAGER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_CRYPTO_RENDERER_CDM_MANAGER_H_ |
6 #define CONTENT_RENDERER_MEDIA_CRYPTO_RENDERER_CDM_MANAGER_H_ | 6 #define CONTENT_RENDERER_MEDIA_CRYPTO_RENDERER_CDM_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 28 matching lines...) Expand all Loading... |
39 ProxyMediaKeys* media_keys, | 39 ProxyMediaKeys* media_keys, |
40 const std::string& key_system, | 40 const std::string& key_system, |
41 const GURL& security_origin, | 41 const GURL& security_origin, |
42 bool use_hw_secure_codecs); | 42 bool use_hw_secure_codecs); |
43 void SetServerCertificate(int cdm_id, | 43 void SetServerCertificate(int cdm_id, |
44 uint32_t promise_id, | 44 uint32_t promise_id, |
45 const std::vector<uint8>& certificate); | 45 const std::vector<uint8>& certificate); |
46 void CreateSessionAndGenerateRequest( | 46 void CreateSessionAndGenerateRequest( |
47 int cdm_id, | 47 int cdm_id, |
48 uint32_t promise_id, | 48 uint32_t promise_id, |
| 49 media::MediaKeys::SessionType session_type, |
49 CdmHostMsg_CreateSession_InitDataType init_data_type, | 50 CdmHostMsg_CreateSession_InitDataType init_data_type, |
50 const std::vector<uint8>& init_data); | 51 const std::vector<uint8>& init_data); |
| 52 void LoadSession(int cdm_id, |
| 53 uint32_t promise_id, |
| 54 media::MediaKeys::SessionType session_type, |
| 55 const std::string& session_id); |
51 void UpdateSession(int cdm_id, | 56 void UpdateSession(int cdm_id, |
52 uint32_t promise_id, | 57 uint32_t promise_id, |
53 const std::string& session_id, | 58 const std::string& session_id, |
54 const std::vector<uint8>& response); | 59 const std::vector<uint8>& response); |
55 void CloseSession(int cdm_id, | 60 void CloseSession(int cdm_id, |
56 uint32_t promise_id, | 61 uint32_t promise_id, |
57 const std::string& session_id); | 62 const std::string& session_id); |
| 63 void RemoveSession(int cdm_id, |
| 64 uint32_t promise_id, |
| 65 const std::string& session_id); |
58 void DestroyCdm(int cdm_id); | 66 void DestroyCdm(int cdm_id); |
59 | 67 |
60 // Registers a ProxyMediaKeys object. Returns allocated CDM ID. | 68 // Registers a ProxyMediaKeys object. Returns allocated CDM ID. |
61 int RegisterMediaKeys(ProxyMediaKeys* media_keys); | 69 int RegisterMediaKeys(ProxyMediaKeys* media_keys); |
62 | 70 |
63 // Unregisters a ProxyMediaKeys object identified by |cdm_id|. | 71 // Unregisters a ProxyMediaKeys object identified by |cdm_id|. |
64 void UnregisterMediaKeys(int cdm_id); | 72 void UnregisterMediaKeys(int cdm_id); |
65 | 73 |
66 private: | 74 private: |
67 // Gets the pointer to ProxyMediaKeys given the |cdm_id|. | 75 // Gets the pointer to ProxyMediaKeys given the |cdm_id|. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 112 |
105 // CDM ID to ProxyMediaKeys mapping. | 113 // CDM ID to ProxyMediaKeys mapping. |
106 std::map<int, ProxyMediaKeys*> proxy_media_keys_map_; | 114 std::map<int, ProxyMediaKeys*> proxy_media_keys_map_; |
107 | 115 |
108 DISALLOW_COPY_AND_ASSIGN(RendererCdmManager); | 116 DISALLOW_COPY_AND_ASSIGN(RendererCdmManager); |
109 }; | 117 }; |
110 | 118 |
111 } // namespace content | 119 } // namespace content |
112 | 120 |
113 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_RENDERER_CDM_MANAGER_H_ | 121 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_RENDERER_CDM_MANAGER_H_ |
OLD | NEW |