diff options
Diffstat (limited to 'chromium/ppapi/thunk/ppb_content_decryptor_private_thunk.cc')
-rw-r--r-- | chromium/ppapi/thunk/ppb_content_decryptor_private_thunk.cc | 82 |
1 files changed, 55 insertions, 27 deletions
diff --git a/chromium/ppapi/thunk/ppb_content_decryptor_private_thunk.cc b/chromium/ppapi/thunk/ppb_content_decryptor_private_thunk.cc index e434f4f7226..19bbd18705a 100644 --- a/chromium/ppapi/thunk/ppb_content_decryptor_private_thunk.cc +++ b/chromium/ppapi/thunk/ppb_content_decryptor_private_thunk.cc @@ -3,33 +3,57 @@ // found in the LICENSE file. // From private/ppb_content_decryptor_private.idl, -// modified Fri Dec 6 12:16:22 2013. +// modified Thu Jun 5 13:39:15 2014. #include "ppapi/c/pp_errors.h" #include "ppapi/c/private/ppb_content_decryptor_private.h" #include "ppapi/shared_impl/tracked_callback.h" #include "ppapi/thunk/enter.h" -#include "ppapi/thunk/ppb_instance_api.h" -#include "ppapi/thunk/resource_creation_api.h" -#include "ppapi/thunk/thunk.h" +#include "ppapi/thunk/ppapi_thunk_export.h" namespace ppapi { namespace thunk { namespace { -void SessionCreated(PP_Instance instance, - uint32_t session_id, - struct PP_Var web_session_id) { - VLOG(4) << "PPB_ContentDecryptor_Private::SessionCreated()"; +void PromiseResolved(PP_Instance instance, uint32_t promise_id) { + VLOG(4) << "PPB_ContentDecryptor_Private::PromiseResolved()"; EnterInstance enter(instance); if (enter.failed()) return; - enter.functions()->SessionCreated(instance, session_id, web_session_id); + enter.functions()->PromiseResolved(instance, promise_id); +} + +void PromiseResolvedWithSession(PP_Instance instance, + uint32_t promise_id, + struct PP_Var web_session_id) { + VLOG(4) << "PPB_ContentDecryptor_Private::PromiseResolvedWithSession()"; + EnterInstance enter(instance); + if (enter.failed()) + return; + enter.functions()->PromiseResolvedWithSession(instance, + promise_id, + web_session_id); +} + +void PromiseRejected(PP_Instance instance, + uint32_t promise_id, + PP_CdmExceptionCode exception_code, + uint32_t system_code, + struct PP_Var error_description) { + VLOG(4) << "PPB_ContentDecryptor_Private::PromiseRejected()"; + EnterInstance enter(instance); + if (enter.failed()) + return; + enter.functions()->PromiseRejected(instance, + promise_id, + exception_code, + system_code, + error_description); } void SessionMessage(PP_Instance instance, - uint32_t session_id, + struct PP_Var web_session_id, struct PP_Var message, struct PP_Var destination_url) { VLOG(4) << "PPB_ContentDecryptor_Private::SessionMessage()"; @@ -37,39 +61,41 @@ void SessionMessage(PP_Instance instance, if (enter.failed()) return; enter.functions()->SessionMessage(instance, - session_id, + web_session_id, message, destination_url); } -void SessionReady(PP_Instance instance, uint32_t session_id) { +void SessionReady(PP_Instance instance, struct PP_Var web_session_id) { VLOG(4) << "PPB_ContentDecryptor_Private::SessionReady()"; EnterInstance enter(instance); if (enter.failed()) return; - enter.functions()->SessionReady(instance, session_id); + enter.functions()->SessionReady(instance, web_session_id); } -void SessionClosed(PP_Instance instance, uint32_t session_id) { +void SessionClosed(PP_Instance instance, struct PP_Var web_session_id) { VLOG(4) << "PPB_ContentDecryptor_Private::SessionClosed()"; EnterInstance enter(instance); if (enter.failed()) return; - enter.functions()->SessionClosed(instance, session_id); + enter.functions()->SessionClosed(instance, web_session_id); } void SessionError(PP_Instance instance, - uint32_t session_id, - int32_t media_error, - int32_t system_code) { + struct PP_Var web_session_id, + PP_CdmExceptionCode exception_code, + uint32_t system_code, + struct PP_Var error_description) { VLOG(4) << "PPB_ContentDecryptor_Private::SessionError()"; EnterInstance enter(instance); if (enter.failed()) return; enter.functions()->SessionError(instance, - session_id, - media_error, - system_code); + web_session_id, + exception_code, + system_code, + error_description); } void DeliverBlock(PP_Instance instance, @@ -145,9 +171,11 @@ void DeliverSamples( decrypted_sample_info); } -const PPB_ContentDecryptor_Private_0_9 - g_ppb_contentdecryptor_private_thunk_0_9 = { - &SessionCreated, +const PPB_ContentDecryptor_Private_0_12 + g_ppb_contentdecryptor_private_thunk_0_12 = { + &PromiseResolved, + &PromiseResolvedWithSession, + &PromiseRejected, &SessionMessage, &SessionReady, &SessionClosed, @@ -162,9 +190,9 @@ const PPB_ContentDecryptor_Private_0_9 } // namespace -const PPB_ContentDecryptor_Private_0_9* - GetPPB_ContentDecryptor_Private_0_9_Thunk() { - return &g_ppb_contentdecryptor_private_thunk_0_9; +PPAPI_THUNK_EXPORT const PPB_ContentDecryptor_Private_0_12* + GetPPB_ContentDecryptor_Private_0_12_Thunk() { + return &g_ppb_contentdecryptor_private_thunk_0_12; } } // namespace thunk |