| 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 // From private/ppb_content_decryptor_private.idl, | 5 // From private/ppb_content_decryptor_private.idl, |
| 6 // modified Tue Apr 16 11:25:44 2013. | 6 // modified Tue Sep 17 11:31:05 2013. |
| 7 | 7 |
| 8 #include "ppapi/c/pp_errors.h" | 8 #include "ppapi/c/pp_errors.h" |
| 9 #include "ppapi/c/private/ppb_content_decryptor_private.h" | 9 #include "ppapi/c/private/ppb_content_decryptor_private.h" |
| 10 #include "ppapi/shared_impl/tracked_callback.h" | 10 #include "ppapi/shared_impl/tracked_callback.h" |
| 11 #include "ppapi/thunk/enter.h" | 11 #include "ppapi/thunk/enter.h" |
| 12 #include "ppapi/thunk/ppb_instance_api.h" | 12 #include "ppapi/thunk/ppb_instance_api.h" |
| 13 #include "ppapi/thunk/resource_creation_api.h" | 13 #include "ppapi/thunk/resource_creation_api.h" |
| 14 #include "ppapi/thunk/thunk.h" | 14 #include "ppapi/thunk/thunk.h" |
| 15 | 15 |
| 16 namespace ppapi { | 16 namespace ppapi { |
| 17 namespace thunk { | 17 namespace thunk { |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 void NeedKey(PP_Instance instance, | |
| 22 struct PP_Var key_system, | |
| 23 struct PP_Var session_id, | |
| 24 struct PP_Var init_data) { | |
| 25 VLOG(4) << "PPB_ContentDecryptor_Private::NeedKey()"; | |
| 26 EnterInstance enter(instance); | |
| 27 if (enter.failed()) | |
| 28 return; | |
| 29 enter.functions()->NeedKey(instance, key_system, session_id, init_data); | |
| 30 } | |
| 31 | |
| 32 void KeyAdded(PP_Instance instance, | 21 void KeyAdded(PP_Instance instance, |
| 33 struct PP_Var key_system, | 22 struct PP_Var key_system, |
| 34 struct PP_Var session_id) { | 23 struct PP_Var session_id) { |
| 35 VLOG(4) << "PPB_ContentDecryptor_Private::KeyAdded()"; | 24 VLOG(4) << "PPB_ContentDecryptor_Private::KeyAdded()"; |
| 36 EnterInstance enter(instance); | 25 EnterInstance enter(instance); |
| 37 if (enter.failed()) | 26 if (enter.failed()) |
| 38 return; | 27 return; |
| 39 enter.functions()->KeyAdded(instance, key_system, session_id); | 28 enter.functions()->KeyAdded(instance, key_system, session_id); |
| 40 } | 29 } |
| 41 | 30 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 const struct PP_DecryptedBlockInfo* decrypted_block_info) { | 126 const struct PP_DecryptedBlockInfo* decrypted_block_info) { |
| 138 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverSamples()"; | 127 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverSamples()"; |
| 139 EnterInstance enter(instance); | 128 EnterInstance enter(instance); |
| 140 if (enter.failed()) | 129 if (enter.failed()) |
| 141 return; | 130 return; |
| 142 enter.functions()->DeliverSamples(instance, | 131 enter.functions()->DeliverSamples(instance, |
| 143 audio_frames, | 132 audio_frames, |
| 144 decrypted_block_info); | 133 decrypted_block_info); |
| 145 } | 134 } |
| 146 | 135 |
| 147 const PPB_ContentDecryptor_Private_0_6 | 136 const PPB_ContentDecryptor_Private_0_7 |
| 148 g_ppb_contentdecryptor_private_thunk_0_6 = { | 137 g_ppb_contentdecryptor_private_thunk_0_7 = { |
| 149 &NeedKey, | |
| 150 &KeyAdded, | 138 &KeyAdded, |
| 151 &KeyMessage, | 139 &KeyMessage, |
| 152 &KeyError, | 140 &KeyError, |
| 153 &DeliverBlock, | 141 &DeliverBlock, |
| 154 &DecoderInitializeDone, | 142 &DecoderInitializeDone, |
| 155 &DecoderDeinitializeDone, | 143 &DecoderDeinitializeDone, |
| 156 &DecoderResetDone, | 144 &DecoderResetDone, |
| 157 &DeliverFrame, | 145 &DeliverFrame, |
| 158 &DeliverSamples | 146 &DeliverSamples |
| 159 }; | 147 }; |
| 160 | 148 |
| 161 } // namespace | 149 } // namespace |
| 162 | 150 |
| 163 const PPB_ContentDecryptor_Private_0_6* | 151 const PPB_ContentDecryptor_Private_0_7* |
| 164 GetPPB_ContentDecryptor_Private_0_6_Thunk() { | 152 GetPPB_ContentDecryptor_Private_0_7_Thunk() { |
| 165 return &g_ppb_contentdecryptor_private_thunk_0_6; | 153 return &g_ppb_contentdecryptor_private_thunk_0_7; |
| 166 } | 154 } |
| 167 | 155 |
| 168 } // namespace thunk | 156 } // namespace thunk |
| 169 } // namespace ppapi | 157 } // namespace ppapi |
| OLD | NEW |