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 #include "ppapi/cpp/private/content_decryptor_private.h" | 5 #include "ppapi/cpp/private/content_decryptor_private.h" |
6 | 6 |
7 #include <cstring> // memcpy | 7 #include <cstring> // memcpy |
8 | 8 |
9 #include "ppapi/c/ppb_var.h" | 9 #include "ppapi/c/ppb_var.h" |
10 #include "ppapi/c/private/ppb_content_decryptor_private.h" | 10 #include "ppapi/c/private/ppb_content_decryptor_private.h" |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 } | 322 } |
323 | 323 |
324 void ContentDecryptor_Private::SessionKeysChange( | 324 void ContentDecryptor_Private::SessionKeysChange( |
325 const std::string& session_id, | 325 const std::string& session_id, |
326 bool has_additional_usable_key, | 326 bool has_additional_usable_key, |
327 const std::vector<PP_KeyInformation>& key_information) { | 327 const std::vector<PP_KeyInformation>& key_information) { |
328 if (has_interface<PPB_ContentDecryptor_Private>()) { | 328 if (has_interface<PPB_ContentDecryptor_Private>()) { |
329 pp::Var session_id_var(session_id); | 329 pp::Var session_id_var(session_id); |
330 get_interface<PPB_ContentDecryptor_Private>()->SessionKeysChange( | 330 get_interface<PPB_ContentDecryptor_Private>()->SessionKeysChange( |
331 associated_instance_.pp_instance(), session_id_var.pp_var(), | 331 associated_instance_.pp_instance(), session_id_var.pp_var(), |
332 PP_FromBool(has_additional_usable_key), key_information.size(), | 332 PP_FromBool(has_additional_usable_key), |
| 333 static_cast<uint32_t>(key_information.size()), |
333 key_information.empty() ? NULL : &key_information[0]); | 334 key_information.empty() ? NULL : &key_information[0]); |
334 } | 335 } |
335 } | 336 } |
336 | 337 |
337 void ContentDecryptor_Private::SessionExpirationChange( | 338 void ContentDecryptor_Private::SessionExpirationChange( |
338 const std::string& session_id, | 339 const std::string& session_id, |
339 PP_Time new_expiry_time) { | 340 PP_Time new_expiry_time) { |
340 if (has_interface<PPB_ContentDecryptor_Private>()) { | 341 if (has_interface<PPB_ContentDecryptor_Private>()) { |
341 pp::Var session_id_var(session_id); | 342 pp::Var session_id_var(session_id); |
342 get_interface<PPB_ContentDecryptor_Private>()->SessionExpirationChange( | 343 get_interface<PPB_ContentDecryptor_Private>()->SessionExpirationChange( |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 const PP_DecryptedSampleInfo& decrypted_sample_info) { | 430 const PP_DecryptedSampleInfo& decrypted_sample_info) { |
430 if (has_interface<PPB_ContentDecryptor_Private>()) { | 431 if (has_interface<PPB_ContentDecryptor_Private>()) { |
431 get_interface<PPB_ContentDecryptor_Private>()->DeliverSamples( | 432 get_interface<PPB_ContentDecryptor_Private>()->DeliverSamples( |
432 associated_instance_.pp_instance(), | 433 associated_instance_.pp_instance(), |
433 audio_frames.pp_resource(), | 434 audio_frames.pp_resource(), |
434 &decrypted_sample_info); | 435 &decrypted_sample_info); |
435 } | 436 } |
436 } | 437 } |
437 | 438 |
438 } // namespace pp | 439 } // namespace pp |
OLD | NEW |