Chromium Code Reviews| 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_CRYPTO_PROXY_DECRYPTOR_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ | 6 #define CONTENT_RENDERER_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 #endif // defined(ENABLE_PEPPER_CDMS) | 63 #endif // defined(ENABLE_PEPPER_CDMS) |
| 64 const KeyAddedCB& key_added_cb, | 64 const KeyAddedCB& key_added_cb, |
| 65 const KeyErrorCB& key_error_cb, | 65 const KeyErrorCB& key_error_cb, |
| 66 const KeyMessageCB& key_message_cb); | 66 const KeyMessageCB& key_message_cb); |
| 67 virtual ~ProxyDecryptor(); | 67 virtual ~ProxyDecryptor(); |
| 68 | 68 |
| 69 // Returns the Decryptor associated with this object. May be NULL if no | 69 // Returns the Decryptor associated with this object. May be NULL if no |
| 70 // Decryptor is associated. | 70 // Decryptor is associated. |
| 71 media::Decryptor* GetDecryptor(); | 71 media::Decryptor* GetDecryptor(); |
| 72 | 72 |
| 73 // Returns the CDM ID associated with this object. May be kInvalidCdmId if no | |
|
ddorwin
2014/03/11 04:06:33
Why does WMPI need this?
ddorwin
2014/03/11 18:05:14
We can delete this in the new design.
xhwang
2014/03/12 01:07:52
I am still storing |cdm_id_| in ProxyDecryptor. Fo
| |
| 74 // CDM ID is associated. | |
| 75 int GetCdmId(); | |
| 76 | |
| 73 // Only call this once. | 77 // Only call this once. |
| 74 bool InitializeCDM(const std::string& key_system, const GURL& frame_url); | 78 bool InitializeCDM(const std::string& key_system, const GURL& frame_url); |
| 75 | 79 |
| 76 // May only be called after InitializeCDM() succeeds. | 80 // May only be called after InitializeCDM() succeeds. |
| 77 bool GenerateKeyRequest(const std::string& type, | 81 bool GenerateKeyRequest(const std::string& type, |
| 78 const uint8* init_data, | 82 const uint8* init_data, |
| 79 int init_data_length); | 83 int init_data_length); |
| 80 void AddKey(const uint8* key, int key_length, | 84 void AddKey(const uint8* key, int key_length, |
| 81 const uint8* init_data, int init_data_length, | 85 const uint8* init_data, int init_data_length, |
| 82 const std::string& session_id); | 86 const std::string& session_id); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 137 std::set<uint32> persistent_sessions_; | 141 std::set<uint32> persistent_sessions_; |
| 138 | 142 |
| 139 bool is_clear_key_; | 143 bool is_clear_key_; |
| 140 | 144 |
| 141 DISALLOW_COPY_AND_ASSIGN(ProxyDecryptor); | 145 DISALLOW_COPY_AND_ASSIGN(ProxyDecryptor); |
| 142 }; | 146 }; |
| 143 | 147 |
| 144 } // namespace content | 148 } // namespace content |
| 145 | 149 |
| 146 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ | 150 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ |
| OLD | NEW |