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

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: CrOS compile error Created 5 years, 11 months 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
« no previous file with comments | « ppapi/thunk/interfaces_ppb_private.h ('k') | ppapi/thunk/ppb_instance_api.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 Jan 7 16:48:10
6 // 2014. 6 // 2015.
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 11 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_CdmMessageType 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 uint32_t key_count,
67 const struct PP_KeyInformation key_information[]) {
77 VLOG(4) << "PPB_ContentDecryptor_Private::SessionKeysChange()"; 68 VLOG(4) << "PPB_ContentDecryptor_Private::SessionKeysChange()";
78 EnterInstance enter(instance); 69 EnterInstance enter(instance);
79 if (enter.failed()) 70 if (enter.failed())
80 return; 71 return;
81 enter.functions()->SessionKeysChange(instance, web_session_id, 72 enter.functions()->SessionKeysChange(instance, web_session_id,
82 has_additional_usable_key); 73 has_additional_usable_key, key_count,
74 key_information);
83 } 75 }
84 76
85 void SessionExpirationChange(PP_Instance instance, 77 void SessionExpirationChange(PP_Instance instance,
86 struct PP_Var web_session_id, 78 struct PP_Var web_session_id,
87 PP_Time new_expiry_time) { 79 PP_Time new_expiry_time) {
88 VLOG(4) << "PPB_ContentDecryptor_Private::SessionExpirationChange()"; 80 VLOG(4) << "PPB_ContentDecryptor_Private::SessionExpirationChange()";
89 EnterInstance enter(instance); 81 EnterInstance enter(instance);
90 if (enter.failed()) 82 if (enter.failed())
91 return; 83 return;
92 enter.functions()->SessionExpirationChange(instance, web_session_id, 84 enter.functions()->SessionExpirationChange(instance, web_session_id,
93 new_expiry_time); 85 new_expiry_time);
94 } 86 }
95 87
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) { 88 void SessionClosed(PP_Instance instance, struct PP_Var web_session_id) {
105 VLOG(4) << "PPB_ContentDecryptor_Private::SessionClosed()"; 89 VLOG(4) << "PPB_ContentDecryptor_Private::SessionClosed()";
106 EnterInstance enter(instance); 90 EnterInstance enter(instance);
107 if (enter.failed()) 91 if (enter.failed())
108 return; 92 return;
109 enter.functions()->SessionClosed(instance, web_session_id); 93 enter.functions()->SessionClosed(instance, web_session_id);
110 } 94 }
111 95
112 void SessionError(PP_Instance instance, 96 void SessionError(PP_Instance instance,
113 struct PP_Var web_session_id, 97 struct PP_Var web_session_id,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 PP_Resource audio_frames, 166 PP_Resource audio_frames,
183 const struct PP_DecryptedSampleInfo* decrypted_sample_info) { 167 const struct PP_DecryptedSampleInfo* decrypted_sample_info) {
184 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverSamples()"; 168 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverSamples()";
185 EnterInstance enter(instance); 169 EnterInstance enter(instance);
186 if (enter.failed()) 170 if (enter.failed())
187 return; 171 return;
188 enter.functions()->DeliverSamples(instance, audio_frames, 172 enter.functions()->DeliverSamples(instance, audio_frames,
189 decrypted_sample_info); 173 decrypted_sample_info);
190 } 174 }
191 175
192 const PPB_ContentDecryptor_Private_0_12 176 const PPB_ContentDecryptor_Private_0_13
193 g_ppb_contentdecryptor_private_thunk_0_12 = {&PromiseResolved, 177 g_ppb_contentdecryptor_private_thunk_0_13 = {&PromiseResolved,
194 &PromiseResolvedWithSession, 178 &PromiseResolvedWithSession,
195 &PromiseResolvedWithKeyIds,
196 &PromiseRejected, 179 &PromiseRejected,
197 &SessionMessage, 180 &SessionMessage,
198 &SessionKeysChange, 181 &SessionKeysChange,
199 &SessionExpirationChange, 182 &SessionExpirationChange,
200 &SessionReady,
201 &SessionClosed, 183 &SessionClosed,
202 &SessionError, 184 &SessionError,
203 &DeliverBlock, 185 &DeliverBlock,
204 &DecoderInitializeDone, 186 &DecoderInitializeDone,
205 &DecoderDeinitializeDone, 187 &DecoderDeinitializeDone,
206 &DecoderResetDone, 188 &DecoderResetDone,
207 &DeliverFrame, 189 &DeliverFrame,
208 &DeliverSamples}; 190 &DeliverSamples};
209 191
210 } // namespace 192 } // namespace
211 193
212 PPAPI_THUNK_EXPORT const PPB_ContentDecryptor_Private_0_12* 194 PPAPI_THUNK_EXPORT const PPB_ContentDecryptor_Private_0_13*
213 GetPPB_ContentDecryptor_Private_0_12_Thunk() { 195 GetPPB_ContentDecryptor_Private_0_13_Thunk() {
214 return &g_ppb_contentdecryptor_private_thunk_0_12; 196 return &g_ppb_contentdecryptor_private_thunk_0_13;
215 } 197 }
216 198
217 } // namespace thunk 199 } // namespace thunk
218 } // namespace ppapi 200 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/thunk/interfaces_ppb_private.h ('k') | ppapi/thunk/ppb_instance_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698