| 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 Thu Jun 5 13:39:15 2014. | 6 // modified Mon Aug 25 13:52:39 2014. |
| 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/ppapi_thunk_export.h" | 12 #include "ppapi/thunk/ppapi_thunk_export.h" |
| 13 | 13 |
| 14 namespace ppapi { | 14 namespace ppapi { |
| 15 namespace thunk { | 15 namespace thunk { |
| 16 | 16 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 29 struct PP_Var web_session_id) { | 29 struct PP_Var web_session_id) { |
| 30 VLOG(4) << "PPB_ContentDecryptor_Private::PromiseResolvedWithSession()"; | 30 VLOG(4) << "PPB_ContentDecryptor_Private::PromiseResolvedWithSession()"; |
| 31 EnterInstance enter(instance); | 31 EnterInstance enter(instance); |
| 32 if (enter.failed()) | 32 if (enter.failed()) |
| 33 return; | 33 return; |
| 34 enter.functions()->PromiseResolvedWithSession(instance, | 34 enter.functions()->PromiseResolvedWithSession(instance, |
| 35 promise_id, | 35 promise_id, |
| 36 web_session_id); | 36 web_session_id); |
| 37 } | 37 } |
| 38 | 38 |
| 39 void PromiseResolvedWithKeyIds(PP_Instance instance, |
| 40 uint32_t promise_id, |
| 41 struct PP_Var key_ids_array) { |
| 42 VLOG(4) << "PPB_ContentDecryptor_Private::PromiseResolvedWithKeyIds()"; |
| 43 EnterInstance enter(instance); |
| 44 if (enter.failed()) |
| 45 return; |
| 46 enter.functions()->PromiseResolvedWithKeyIds(instance, |
| 47 promise_id, |
| 48 key_ids_array); |
| 49 } |
| 50 |
| 39 void PromiseRejected(PP_Instance instance, | 51 void PromiseRejected(PP_Instance instance, |
| 40 uint32_t promise_id, | 52 uint32_t promise_id, |
| 41 PP_CdmExceptionCode exception_code, | 53 PP_CdmExceptionCode exception_code, |
| 42 uint32_t system_code, | 54 uint32_t system_code, |
| 43 struct PP_Var error_description) { | 55 struct PP_Var error_description) { |
| 44 VLOG(4) << "PPB_ContentDecryptor_Private::PromiseRejected()"; | 56 VLOG(4) << "PPB_ContentDecryptor_Private::PromiseRejected()"; |
| 45 EnterInstance enter(instance); | 57 EnterInstance enter(instance); |
| 46 if (enter.failed()) | 58 if (enter.failed()) |
| 47 return; | 59 return; |
| 48 enter.functions()->PromiseRejected(instance, | 60 enter.functions()->PromiseRejected(instance, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 59 VLOG(4) << "PPB_ContentDecryptor_Private::SessionMessage()"; | 71 VLOG(4) << "PPB_ContentDecryptor_Private::SessionMessage()"; |
| 60 EnterInstance enter(instance); | 72 EnterInstance enter(instance); |
| 61 if (enter.failed()) | 73 if (enter.failed()) |
| 62 return; | 74 return; |
| 63 enter.functions()->SessionMessage(instance, | 75 enter.functions()->SessionMessage(instance, |
| 64 web_session_id, | 76 web_session_id, |
| 65 message, | 77 message, |
| 66 destination_url); | 78 destination_url); |
| 67 } | 79 } |
| 68 | 80 |
| 81 void SessionKeysChange(PP_Instance instance, |
| 82 struct PP_Var web_session_id, |
| 83 PP_Bool has_additional_usable_key) { |
| 84 VLOG(4) << "PPB_ContentDecryptor_Private::SessionKeysChange()"; |
| 85 EnterInstance enter(instance); |
| 86 if (enter.failed()) |
| 87 return; |
| 88 enter.functions()->SessionKeysChange(instance, |
| 89 web_session_id, |
| 90 has_additional_usable_key); |
| 91 } |
| 92 |
| 93 void SessionExpirationChange(PP_Instance instance, |
| 94 struct PP_Var web_session_id, |
| 95 PP_Time new_expiry_time) { |
| 96 VLOG(4) << "PPB_ContentDecryptor_Private::SessionExpirationChange()"; |
| 97 EnterInstance enter(instance); |
| 98 if (enter.failed()) |
| 99 return; |
| 100 enter.functions()->SessionExpirationChange(instance, |
| 101 web_session_id, |
| 102 new_expiry_time); |
| 103 } |
| 104 |
| 69 void SessionReady(PP_Instance instance, struct PP_Var web_session_id) { | 105 void SessionReady(PP_Instance instance, struct PP_Var web_session_id) { |
| 70 VLOG(4) << "PPB_ContentDecryptor_Private::SessionReady()"; | 106 VLOG(4) << "PPB_ContentDecryptor_Private::SessionReady()"; |
| 71 EnterInstance enter(instance); | 107 EnterInstance enter(instance); |
| 72 if (enter.failed()) | 108 if (enter.failed()) |
| 73 return; | 109 return; |
| 74 enter.functions()->SessionReady(instance, web_session_id); | 110 enter.functions()->SessionReady(instance, web_session_id); |
| 75 } | 111 } |
| 76 | 112 |
| 77 void SessionClosed(PP_Instance instance, struct PP_Var web_session_id) { | 113 void SessionClosed(PP_Instance instance, struct PP_Var web_session_id) { |
| 78 VLOG(4) << "PPB_ContentDecryptor_Private::SessionClosed()"; | 114 VLOG(4) << "PPB_ContentDecryptor_Private::SessionClosed()"; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 return; | 204 return; |
| 169 enter.functions()->DeliverSamples(instance, | 205 enter.functions()->DeliverSamples(instance, |
| 170 audio_frames, | 206 audio_frames, |
| 171 decrypted_sample_info); | 207 decrypted_sample_info); |
| 172 } | 208 } |
| 173 | 209 |
| 174 const PPB_ContentDecryptor_Private_0_12 | 210 const PPB_ContentDecryptor_Private_0_12 |
| 175 g_ppb_contentdecryptor_private_thunk_0_12 = { | 211 g_ppb_contentdecryptor_private_thunk_0_12 = { |
| 176 &PromiseResolved, | 212 &PromiseResolved, |
| 177 &PromiseResolvedWithSession, | 213 &PromiseResolvedWithSession, |
| 214 &PromiseResolvedWithKeyIds, |
| 178 &PromiseRejected, | 215 &PromiseRejected, |
| 179 &SessionMessage, | 216 &SessionMessage, |
| 217 &SessionKeysChange, |
| 218 &SessionExpirationChange, |
| 180 &SessionReady, | 219 &SessionReady, |
| 181 &SessionClosed, | 220 &SessionClosed, |
| 182 &SessionError, | 221 &SessionError, |
| 183 &DeliverBlock, | 222 &DeliverBlock, |
| 184 &DecoderInitializeDone, | 223 &DecoderInitializeDone, |
| 185 &DecoderDeinitializeDone, | 224 &DecoderDeinitializeDone, |
| 186 &DecoderResetDone, | 225 &DecoderResetDone, |
| 187 &DeliverFrame, | 226 &DeliverFrame, |
| 188 &DeliverSamples | 227 &DeliverSamples |
| 189 }; | 228 }; |
| 190 | 229 |
| 191 } // namespace | 230 } // namespace |
| 192 | 231 |
| 193 PPAPI_THUNK_EXPORT const PPB_ContentDecryptor_Private_0_12* | 232 PPAPI_THUNK_EXPORT const PPB_ContentDecryptor_Private_0_12* |
| 194 GetPPB_ContentDecryptor_Private_0_12_Thunk() { | 233 GetPPB_ContentDecryptor_Private_0_12_Thunk() { |
| 195 return &g_ppb_contentdecryptor_private_thunk_0_12; | 234 return &g_ppb_contentdecryptor_private_thunk_0_12; |
| 196 } | 235 } |
| 197 | 236 |
| 198 } // namespace thunk | 237 } // namespace thunk |
| 199 } // namespace ppapi | 238 } // namespace ppapi |
| OLD | NEW |