Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: ppapi/thunk/ppb_content_decryptor_private_thunk.cc

Issue 811923002: Changes to support CDM_7 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changes (plus rebase) Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 modified Wed Nov 5 14:29:15 5 // From private/ppb_content_decryptor_private.idl modified Wed Dec 17 10:57:41
6 // 2014. 6 // 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 {
(...skipping 12 matching lines...) Expand all
28 uint32_t promise_id, 28 uint32_t promise_id,
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, promise_id, 34 enter.functions()->PromiseResolvedWithSession(instance, promise_id,
35 web_session_id); 35 web_session_id);
36 } 36 }
37 37
38 void PromiseResolvedWithKeyIds(PP_Instance instance,
39 uint32_t promise_id,
40 struct PP_Var key_ids_array) {
41 VLOG(4) << "PPB_ContentDecryptor_Private::PromiseResolvedWithKeyIds()";
42 EnterInstance enter(instance);
43 if (enter.failed())
44 return;
45 enter.functions()->PromiseResolvedWithKeyIds(instance, promise_id,
46 key_ids_array);
47 }
48
49 void PromiseRejected(PP_Instance instance, 38 void PromiseRejected(PP_Instance instance,
50 uint32_t promise_id, 39 uint32_t promise_id,
51 PP_CdmExceptionCode exception_code, 40 PP_CdmExceptionCode exception_code,
52 uint32_t system_code, 41 uint32_t system_code,
53 struct PP_Var error_description) { 42 struct PP_Var error_description) {
54 VLOG(4) << "PPB_ContentDecryptor_Private::PromiseRejected()"; 43 VLOG(4) << "PPB_ContentDecryptor_Private::PromiseRejected()";
55 EnterInstance enter(instance); 44 EnterInstance enter(instance);
56 if (enter.failed()) 45 if (enter.failed())
57 return; 46 return;
58 enter.functions()->PromiseRejected(instance, promise_id, exception_code, 47 enter.functions()->PromiseRejected(instance, promise_id, exception_code,
59 system_code, error_description); 48 system_code, error_description);
60 } 49 }
61 50
62 void SessionMessage(PP_Instance instance, 51 void SessionMessage(PP_Instance instance,
63 struct PP_Var web_session_id, 52 struct PP_Var web_session_id,
64 struct PP_Var message, 53 PP_MessageType message_type,
65 struct PP_Var destination_url) { 54 struct PP_Var message) {
66 VLOG(4) << "PPB_ContentDecryptor_Private::SessionMessage()"; 55 VLOG(4) << "PPB_ContentDecryptor_Private::SessionMessage()";
67 EnterInstance enter(instance); 56 EnterInstance enter(instance);
68 if (enter.failed()) 57 if (enter.failed())
69 return; 58 return;
70 enter.functions()->SessionMessage(instance, web_session_id, message, 59 enter.functions()->SessionMessage(instance, web_session_id, message_type,
71 destination_url); 60 message);
72 } 61 }
73 62
74 void SessionKeysChange(PP_Instance instance, 63 void SessionKeysChange(PP_Instance instance,
75 struct PP_Var web_session_id, 64 struct PP_Var web_session_id,
76 PP_Bool has_additional_usable_key) { 65 PP_Bool has_additional_usable_key,
66 struct PP_Var key_information_array) {
77 VLOG(4) << "PPB_ContentDecryptor_Private::SessionKeysChange()"; 67 VLOG(4) << "PPB_ContentDecryptor_Private::SessionKeysChange()";
78 EnterInstance enter(instance); 68 EnterInstance enter(instance);
79 if (enter.failed()) 69 if (enter.failed())
80 return; 70 return;
81 enter.functions()->SessionKeysChange(instance, web_session_id, 71 enter.functions()->SessionKeysChange(instance, web_session_id,
82 has_additional_usable_key); 72 has_additional_usable_key,
73 key_information_array);
83 } 74 }
84 75
85 void SessionExpirationChange(PP_Instance instance, 76 void SessionExpirationChange(PP_Instance instance,
86 struct PP_Var web_session_id, 77 struct PP_Var web_session_id,
87 PP_Time new_expiry_time) { 78 PP_Time new_expiry_time) {
88 VLOG(4) << "PPB_ContentDecryptor_Private::SessionExpirationChange()"; 79 VLOG(4) << "PPB_ContentDecryptor_Private::SessionExpirationChange()";
89 EnterInstance enter(instance); 80 EnterInstance enter(instance);
90 if (enter.failed()) 81 if (enter.failed())
91 return; 82 return;
92 enter.functions()->SessionExpirationChange(instance, web_session_id, 83 enter.functions()->SessionExpirationChange(instance, web_session_id,
93 new_expiry_time); 84 new_expiry_time);
94 } 85 }
95 86
96 void SessionReady(PP_Instance instance, struct PP_Var web_session_id) {
97 VLOG(4) << "PPB_ContentDecryptor_Private::SessionReady()";
98 EnterInstance enter(instance);
99 if (enter.failed())
100 return;
101 enter.functions()->SessionReady(instance, web_session_id);
102 }
103
104 void SessionClosed(PP_Instance instance, struct PP_Var web_session_id) { 87 void SessionClosed(PP_Instance instance, struct PP_Var web_session_id) {
105 VLOG(4) << "PPB_ContentDecryptor_Private::SessionClosed()"; 88 VLOG(4) << "PPB_ContentDecryptor_Private::SessionClosed()";
106 EnterInstance enter(instance); 89 EnterInstance enter(instance);
107 if (enter.failed()) 90 if (enter.failed())
108 return; 91 return;
109 enter.functions()->SessionClosed(instance, web_session_id); 92 enter.functions()->SessionClosed(instance, web_session_id);
110 } 93 }
111 94
112 void SessionError(PP_Instance instance, 95 void SessionError(PP_Instance instance,
113 struct PP_Var web_session_id, 96 struct PP_Var web_session_id,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 PP_Resource audio_frames, 165 PP_Resource audio_frames,
183 const struct PP_DecryptedSampleInfo* decrypted_sample_info) { 166 const struct PP_DecryptedSampleInfo* decrypted_sample_info) {
184 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverSamples()"; 167 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverSamples()";
185 EnterInstance enter(instance); 168 EnterInstance enter(instance);
186 if (enter.failed()) 169 if (enter.failed())
187 return; 170 return;
188 enter.functions()->DeliverSamples(instance, audio_frames, 171 enter.functions()->DeliverSamples(instance, audio_frames,
189 decrypted_sample_info); 172 decrypted_sample_info);
190 } 173 }
191 174
192 const PPB_ContentDecryptor_Private_0_12 175 const PPB_ContentDecryptor_Private_0_13
193 g_ppb_contentdecryptor_private_thunk_0_12 = {&PromiseResolved, 176 g_ppb_contentdecryptor_private_thunk_0_13 = {&PromiseResolved,
194 &PromiseResolvedWithSession, 177 &PromiseResolvedWithSession,
195 &PromiseResolvedWithKeyIds,
196 &PromiseRejected, 178 &PromiseRejected,
197 &SessionMessage, 179 &SessionMessage,
198 &SessionKeysChange, 180 &SessionKeysChange,
199 &SessionExpirationChange, 181 &SessionExpirationChange,
200 &SessionReady,
201 &SessionClosed, 182 &SessionClosed,
202 &SessionError, 183 &SessionError,
203 &DeliverBlock, 184 &DeliverBlock,
204 &DecoderInitializeDone, 185 &DecoderInitializeDone,
205 &DecoderDeinitializeDone, 186 &DecoderDeinitializeDone,
206 &DecoderResetDone, 187 &DecoderResetDone,
207 &DeliverFrame, 188 &DeliverFrame,
208 &DeliverSamples}; 189 &DeliverSamples};
209 190
210 } // namespace 191 } // namespace
211 192
212 PPAPI_THUNK_EXPORT const PPB_ContentDecryptor_Private_0_12* 193 PPAPI_THUNK_EXPORT const PPB_ContentDecryptor_Private_0_13*
213 GetPPB_ContentDecryptor_Private_0_12_Thunk() { 194 GetPPB_ContentDecryptor_Private_0_13_Thunk() {
214 return &g_ppb_contentdecryptor_private_thunk_0_12; 195 return &g_ppb_contentdecryptor_private_thunk_0_13;
215 } 196 }
216 197
217 } // namespace thunk 198 } // namespace thunk
218 } // namespace ppapi 199 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698