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 WEBKIT_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ | 5 #ifndef WEBKIT_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ |
6 #define WEBKIT_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ | 6 #define WEBKIT_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 // Requests the ProxyDecryptor to notify the decryptor creation through the | 48 // Requests the ProxyDecryptor to notify the decryptor creation through the |
49 // |decryptor_notification_cb| provided. | 49 // |decryptor_notification_cb| provided. |
50 // If |decryptor_notification_cb| is null, the ProxyDecryptor should cancel | 50 // If |decryptor_notification_cb| is null, the ProxyDecryptor should cancel |
51 // the existing request and fire it with NULL immediately. | 51 // the existing request and fire it with NULL immediately. |
52 void RequestDecryptorNotification( | 52 void RequestDecryptorNotification( |
53 const DecryptorNotificationCB& decryptor_notification_cb); | 53 const DecryptorNotificationCB& decryptor_notification_cb); |
54 | 54 |
55 // media::Decryptor implementation. | 55 // media::Decryptor implementation. |
56 virtual bool GenerateKeyRequest(const std::string& key_system, | 56 virtual bool GenerateKeyRequest(const std::string& key_system, |
| 57 const std::string& type, |
57 const uint8* init_data, | 58 const uint8* init_data, |
58 int init_data_length) OVERRIDE; | 59 int init_data_length) OVERRIDE; |
59 virtual void AddKey(const std::string& key_system, | 60 virtual void AddKey(const std::string& key_system, |
60 const uint8* key, | 61 const uint8* key, |
61 int key_length, | 62 int key_length, |
62 const uint8* init_data, | 63 const uint8* init_data, |
63 int init_data_length, | 64 int init_data_length, |
64 const std::string& session_id) OVERRIDE; | 65 const std::string& session_id) OVERRIDE; |
65 virtual void CancelKeyRequest(const std::string& key_system, | 66 virtual void CancelKeyRequest(const std::string& key_system, |
66 const std::string& session_id) OVERRIDE; | 67 const std::string& session_id) OVERRIDE; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // the |pending_buffer_to_decrypt_| again if kNoKey is returned because a | 146 // the |pending_buffer_to_decrypt_| again if kNoKey is returned because a |
146 // new key has been added. | 147 // new key has been added. |
147 bool has_new_key_added_; | 148 bool has_new_key_added_; |
148 | 149 |
149 DISALLOW_COPY_AND_ASSIGN(ProxyDecryptor); | 150 DISALLOW_COPY_AND_ASSIGN(ProxyDecryptor); |
150 }; | 151 }; |
151 | 152 |
152 } // namespace webkit_media | 153 } // namespace webkit_media |
153 | 154 |
154 #endif // WEBKIT_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ | 155 #endif // WEBKIT_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ |
OLD | NEW |