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