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 "content/renderer/pepper/pepper_plugin_instance_impl.h" | 5 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bit_cast.h" | 10 #include "base/bit_cast.h" |
(...skipping 2509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2520 PP_Var error_description_var) { | 2520 PP_Var error_description_var) { |
2521 content_decryptor_delegate_->OnPromiseRejected( | 2521 content_decryptor_delegate_->OnPromiseRejected( |
2522 promise_id, exception_code, system_code, error_description_var); | 2522 promise_id, exception_code, system_code, error_description_var); |
2523 } | 2523 } |
2524 | 2524 |
2525 void PepperPluginInstanceImpl::SessionMessage(PP_Instance instance, | 2525 void PepperPluginInstanceImpl::SessionMessage(PP_Instance instance, |
2526 PP_Var session_id_var, | 2526 PP_Var session_id_var, |
2527 PP_CdmMessageType message_type, | 2527 PP_CdmMessageType message_type, |
2528 PP_Var message_var, | 2528 PP_Var message_var, |
2529 PP_Var legacy_destination_url) { | 2529 PP_Var legacy_destination_url) { |
2530 content_decryptor_delegate_->OnSessionMessage( | 2530 // |legacy_destination_url| is obsolete. |
2531 session_id_var, message_type, message_var, legacy_destination_url); | 2531 content_decryptor_delegate_->OnSessionMessage(session_id_var, message_type, |
| 2532 message_var); |
2532 } | 2533 } |
2533 | 2534 |
2534 void PepperPluginInstanceImpl::SessionKeysChange( | 2535 void PepperPluginInstanceImpl::SessionKeysChange( |
2535 PP_Instance instance, | 2536 PP_Instance instance, |
2536 PP_Var session_id_var, | 2537 PP_Var session_id_var, |
2537 PP_Bool has_additional_usable_key, | 2538 PP_Bool has_additional_usable_key, |
2538 uint32_t key_count, | 2539 uint32_t key_count, |
2539 const struct PP_KeyInformation key_information[]) { | 2540 const struct PP_KeyInformation key_information[]) { |
2540 content_decryptor_delegate_->OnSessionKeysChange( | 2541 content_decryptor_delegate_->OnSessionKeysChange( |
2541 session_id_var, has_additional_usable_key, key_count, key_information); | 2542 session_id_var, has_additional_usable_key, key_count, key_information); |
(...skipping 11 matching lines...) Expand all Loading... |
2553 PP_Var session_id_var) { | 2554 PP_Var session_id_var) { |
2554 content_decryptor_delegate_->OnSessionClosed(session_id_var); | 2555 content_decryptor_delegate_->OnSessionClosed(session_id_var); |
2555 } | 2556 } |
2556 | 2557 |
2557 void PepperPluginInstanceImpl::LegacySessionError( | 2558 void PepperPluginInstanceImpl::LegacySessionError( |
2558 PP_Instance instance, | 2559 PP_Instance instance, |
2559 PP_Var session_id_var, | 2560 PP_Var session_id_var, |
2560 PP_CdmExceptionCode exception_code, | 2561 PP_CdmExceptionCode exception_code, |
2561 uint32_t system_code, | 2562 uint32_t system_code, |
2562 PP_Var error_description_var) { | 2563 PP_Var error_description_var) { |
2563 content_decryptor_delegate_->OnLegacySessionError( | 2564 // Obsolete. |
2564 session_id_var, exception_code, system_code, error_description_var); | |
2565 } | 2565 } |
2566 | 2566 |
2567 void PepperPluginInstanceImpl::DeliverBlock( | 2567 void PepperPluginInstanceImpl::DeliverBlock( |
2568 PP_Instance instance, | 2568 PP_Instance instance, |
2569 PP_Resource decrypted_block, | 2569 PP_Resource decrypted_block, |
2570 const PP_DecryptedBlockInfo* block_info) { | 2570 const PP_DecryptedBlockInfo* block_info) { |
2571 content_decryptor_delegate_->DeliverBlock(decrypted_block, block_info); | 2571 content_decryptor_delegate_->DeliverBlock(decrypted_block, block_info); |
2572 } | 2572 } |
2573 | 2573 |
2574 void PepperPluginInstanceImpl::DecoderInitializeDone( | 2574 void PepperPluginInstanceImpl::DecoderInitializeDone( |
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3442 const cc::TextureMailbox& mailbox) const { | 3442 const cc::TextureMailbox& mailbox) const { |
3443 auto it = | 3443 auto it = |
3444 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(), | 3444 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(), |
3445 [&mailbox](const TextureMailboxRefCount& ref_count) { | 3445 [&mailbox](const TextureMailboxRefCount& ref_count) { |
3446 return ref_count.first.mailbox() == mailbox.mailbox(); | 3446 return ref_count.first.mailbox() == mailbox.mailbox(); |
3447 }); | 3447 }); |
3448 return it != texture_ref_counts_.end(); | 3448 return it != texture_ref_counts_.end(); |
3449 } | 3449 } |
3450 | 3450 |
3451 } // namespace content | 3451 } // namespace content |
OLD | NEW |