| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // Returns the CDM ID associated with this object. May be kInvalidCdmId if no | 65 // Returns the CDM ID associated with this object. May be kInvalidCdmId if no |
| 66 // CDM ID is associated, such as when Clear Key is used. | 66 // CDM ID is associated, such as when Clear Key is used. |
| 67 int GetCdmId(); | 67 int GetCdmId(); |
| 68 #endif | 68 #endif |
| 69 | 69 |
| 70 // Only call this once. | 70 // Only call this once. |
| 71 bool InitializeCDM(const std::string& key_system, | 71 bool InitializeCDM(const std::string& key_system, |
| 72 const GURL& security_origin); | 72 const GURL& security_origin); |
| 73 | 73 |
| 74 // May only be called after InitializeCDM() succeeds. | 74 // May only be called after InitializeCDM() succeeds. |
| 75 bool GenerateKeyRequest(const std::string& type, | 75 bool GenerateKeyRequest(const std::string& init_data_type, |
| 76 const uint8* init_data, | 76 const uint8* init_data, |
| 77 int init_data_length); | 77 int init_data_length); |
| 78 void AddKey(const uint8* key, int key_length, | 78 void AddKey(const uint8* key, int key_length, |
| 79 const uint8* init_data, int init_data_length, | 79 const uint8* init_data, int init_data_length, |
| 80 const std::string& session_id); | 80 const std::string& session_id); |
| 81 void CancelKeyRequest(const std::string& session_id); | 81 void CancelKeyRequest(const std::string& session_id); |
| 82 | 82 |
| 83 private: | 83 private: |
| 84 // Helper function to create MediaKeys to handle the given |key_system|. | 84 // Helper function to create MediaKeys to handle the given |key_system|. |
| 85 scoped_ptr<media::MediaKeys> CreateMediaKeys(const std::string& key_system, | 85 scoped_ptr<media::MediaKeys> CreateMediaKeys(const std::string& key_system, |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 133 |
| 134 // NOTE: Weak pointers must be invalidated before all other member variables. | 134 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 135 base::WeakPtrFactory<ProxyDecryptor> weak_ptr_factory_; | 135 base::WeakPtrFactory<ProxyDecryptor> weak_ptr_factory_; |
| 136 | 136 |
| 137 DISALLOW_COPY_AND_ASSIGN(ProxyDecryptor); | 137 DISALLOW_COPY_AND_ASSIGN(ProxyDecryptor); |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 } // namespace content | 140 } // namespace content |
| 141 | 141 |
| 142 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ | 142 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ |
| OLD | NEW |