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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 pp::Var error_description_var(error_description); | 301 pp::Var error_description_var(error_description); |
302 get_interface<PPB_ContentDecryptor_Private>()->PromiseRejected( | 302 get_interface<PPB_ContentDecryptor_Private>()->PromiseRejected( |
303 associated_instance_.pp_instance(), | 303 associated_instance_.pp_instance(), |
304 promise_id, | 304 promise_id, |
305 exception_code, | 305 exception_code, |
306 system_code, | 306 system_code, |
307 error_description_var.pp_var()); | 307 error_description_var.pp_var()); |
308 } | 308 } |
309 } | 309 } |
310 | 310 |
311 void ContentDecryptor_Private::SessionMessage(const std::string& web_session_id, | 311 void ContentDecryptor_Private::SessionMessage( |
312 PP_CdmMessageType message_type, | 312 const std::string& web_session_id, |
313 pp::VarArrayBuffer message) { | 313 PP_CdmMessageType message_type, |
| 314 pp::VarArrayBuffer message, |
| 315 const std::string& legacy_destination_url) { |
314 if (has_interface<PPB_ContentDecryptor_Private>()) { | 316 if (has_interface<PPB_ContentDecryptor_Private>()) { |
315 pp::Var web_session_id_var(web_session_id); | 317 pp::Var web_session_id_var(web_session_id); |
| 318 pp::Var legacy_destination_url_var(legacy_destination_url); |
316 get_interface<PPB_ContentDecryptor_Private>()->SessionMessage( | 319 get_interface<PPB_ContentDecryptor_Private>()->SessionMessage( |
317 associated_instance_.pp_instance(), web_session_id_var.pp_var(), | 320 associated_instance_.pp_instance(), web_session_id_var.pp_var(), |
318 message_type, message.pp_var()); | 321 message_type, message.pp_var(), legacy_destination_url_var.pp_var()); |
319 } | 322 } |
320 } | 323 } |
321 | 324 |
322 void ContentDecryptor_Private::SessionKeysChange( | 325 void ContentDecryptor_Private::SessionKeysChange( |
323 const std::string& web_session_id, | 326 const std::string& web_session_id, |
324 bool has_additional_usable_key, | 327 bool has_additional_usable_key, |
325 const std::vector<PP_KeyInformation>& key_information) { | 328 const std::vector<PP_KeyInformation>& key_information) { |
326 if (has_interface<PPB_ContentDecryptor_Private>()) { | 329 if (has_interface<PPB_ContentDecryptor_Private>()) { |
327 pp::Var web_session_id_var(web_session_id); | 330 pp::Var web_session_id_var(web_session_id); |
328 get_interface<PPB_ContentDecryptor_Private>()->SessionKeysChange( | 331 get_interface<PPB_ContentDecryptor_Private>()->SessionKeysChange( |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 const PP_DecryptedSampleInfo& decrypted_sample_info) { | 435 const PP_DecryptedSampleInfo& decrypted_sample_info) { |
433 if (has_interface<PPB_ContentDecryptor_Private>()) { | 436 if (has_interface<PPB_ContentDecryptor_Private>()) { |
434 get_interface<PPB_ContentDecryptor_Private>()->DeliverSamples( | 437 get_interface<PPB_ContentDecryptor_Private>()->DeliverSamples( |
435 associated_instance_.pp_instance(), | 438 associated_instance_.pp_instance(), |
436 audio_frames.pp_resource(), | 439 audio_frames.pp_resource(), |
437 &decrypted_sample_info); | 440 &decrypted_sample_info); |
438 } | 441 } |
439 } | 442 } |
440 | 443 |
441 } // namespace pp | 444 } // namespace pp |
OLD | NEW |