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 MEDIA_BASE_CONTENT_DECRYPTION_MODULE_H_ | 5 #ifndef MEDIA_BASE_CONTENT_DECRYPTION_MODULE_H_ |
6 #define MEDIA_BASE_CONTENT_DECRYPTION_MODULE_H_ | 6 #define MEDIA_BASE_CONTENT_DECRYPTION_MODULE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 | 182 |
183 // Called when there has been a change in the keys in the session or their | 183 // Called when there has been a change in the keys in the session or their |
184 // status. See http://w3c.github.io/encrypted-media/#dom-evt-keystatuseschange | 184 // status. See http://w3c.github.io/encrypted-media/#dom-evt-keystatuseschange |
185 typedef base::Callback<void(const std::string& session_id, | 185 typedef base::Callback<void(const std::string& session_id, |
186 bool has_additional_usable_key, | 186 bool has_additional_usable_key, |
187 CdmKeysInfo keys_info)> | 187 CdmKeysInfo keys_info)> |
188 SessionKeysChangeCB; | 188 SessionKeysChangeCB; |
189 | 189 |
190 // Called when the CDM changes the expiration time of a session. | 190 // Called when the CDM changes the expiration time of a session. |
191 // See http://w3c.github.io/encrypted-media/#update-expiration | 191 // See http://w3c.github.io/encrypted-media/#update-expiration |
| 192 // A null base::Time() will be translated to NaN in Javascript, which means "no |
| 193 // such time exists or if the license explicitly never expires, as determined |
| 194 // by the CDM", according to the EME spec. |
192 typedef base::Callback<void(const std::string& session_id, | 195 typedef base::Callback<void(const std::string& session_id, |
193 base::Time new_expiry_time)> | 196 base::Time new_expiry_time)> |
194 SessionExpirationUpdateCB; | 197 SessionExpirationUpdateCB; |
195 | 198 |
196 } // namespace media | 199 } // namespace media |
197 | 200 |
198 #endif // MEDIA_BASE_CONTENT_DECRYPTION_MODULE_H_ | 201 #endif // MEDIA_BASE_CONTENT_DECRYPTION_MODULE_H_ |
OLD | NEW |