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
3 // found in the LICENSE file.
5 #ifndef PPAPI_PROXY_PPP_CONTENT_DECRYPTOR_PRIVATE_PROXY_H_
6 #define PPAPI_PROXY_PPP_CONTENT_DECRYPTOR_PRIVATE_PROXY_H_
10 #include "ppapi/c/pp_instance.h"
11 #include "ppapi/c/private/ppp_content_decryptor_private.h"
12 #include "ppapi/proxy/interface_proxy.h"
13 #include "ppapi/proxy/serialized_structs.h"
14 #include "ppapi/shared_impl/host_resource.h"
19 class SerializedVarReceiveInput
;
21 class PPP_ContentDecryptor_Private_Proxy
: public InterfaceProxy
{
23 explicit PPP_ContentDecryptor_Private_Proxy(Dispatcher
* dispatcher
);
24 virtual ~PPP_ContentDecryptor_Private_Proxy();
26 static const PPP_ContentDecryptor_Private
* GetProxyInterface();
29 // InterfaceProxy implementation.
30 virtual bool OnMessageReceived(const IPC::Message
& msg
);
33 void OnMsgInitialize(PP_Instance instance
,
34 SerializedVarReceiveInput key_system
);
35 void OnMsgCreateSession(PP_Instance instance
,
37 SerializedVarReceiveInput init_data_type
,
38 SerializedVarReceiveInput init_data
,
39 PP_SessionType session_type
);
40 void OnMsgLoadSession(PP_Instance instance
,
42 SerializedVarReceiveInput web_session_id
);
43 void OnMsgUpdateSession(PP_Instance instance
,
45 SerializedVarReceiveInput web_session_id
,
46 SerializedVarReceiveInput response
);
47 void OnMsgReleaseSession(PP_Instance instance
,
49 SerializedVarReceiveInput web_session_id
);
50 void OnMsgDecrypt(PP_Instance instance
,
51 const PPPDecryptor_Buffer
& encrypted_buffer
,
52 const std::string
& serialized_encrypted_block_info
);
53 void OnMsgInitializeAudioDecoder(
55 const std::string
& decoder_config
,
56 const PPPDecryptor_Buffer
& extra_data_buffer
);
57 void OnMsgInitializeVideoDecoder(
59 const std::string
& decoder_config
,
60 const PPPDecryptor_Buffer
& extra_data_buffer
);
61 void OnMsgDeinitializeDecoder(PP_Instance instance
,
62 PP_DecryptorStreamType decoder_type
,
64 void OnMsgResetDecoder(PP_Instance instance
,
65 PP_DecryptorStreamType decoder_type
,
67 void OnMsgDecryptAndDecode(
69 PP_DecryptorStreamType decoder_type
,
70 const PPPDecryptor_Buffer
& encrypted_buffer
,
71 const std::string
& serialized_encrypted_block_info
);
73 const PPP_ContentDecryptor_Private
* ppp_decryptor_impl_
;
75 DISALLOW_COPY_AND_ASSIGN(PPP_ContentDecryptor_Private_Proxy
);
81 #endif // PPAPI_PROXY_PPP_CONTENT_DECRYPTOR_PRIVATE_PROXY_H_