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_
11 #include "ppapi/c/pp_instance.h"
12 #include "ppapi/c/private/ppp_content_decryptor_private.h"
13 #include "ppapi/proxy/interface_proxy.h"
14 #include "ppapi/proxy/serialized_structs.h"
15 #include "ppapi/shared_impl/host_resource.h"
20 class SerializedVarReceiveInput
;
22 class PPP_ContentDecryptor_Private_Proxy
: public InterfaceProxy
{
24 explicit PPP_ContentDecryptor_Private_Proxy(Dispatcher
* dispatcher
);
25 virtual ~PPP_ContentDecryptor_Private_Proxy();
27 static const PPP_ContentDecryptor_Private
* GetProxyInterface();
30 // InterfaceProxy implementation.
31 virtual bool OnMessageReceived(const IPC::Message
& msg
);
34 void OnMsgInitialize(PP_Instance instance
,
35 SerializedVarReceiveInput key_system
);
36 void OnMsgSetServerCertificate(PP_Instance instance
,
38 std::vector
<uint8_t> server_certificate
);
39 void OnMsgCreateSessionAndGenerateRequest(
42 PP_SessionType session_type
,
43 SerializedVarReceiveInput init_data_type
,
44 SerializedVarReceiveInput init_data
);
45 void OnMsgLoadSession(PP_Instance instance
,
47 PP_SessionType session_type
,
48 SerializedVarReceiveInput session_id
);
49 void OnMsgUpdateSession(PP_Instance instance
,
51 SerializedVarReceiveInput session_id
,
52 SerializedVarReceiveInput response
);
53 void OnMsgCloseSession(PP_Instance instance
,
55 const std::string
& session_id
);
56 void OnMsgRemoveSession(PP_Instance instance
,
58 const std::string
& session_id
);
59 void OnMsgDecrypt(PP_Instance instance
,
60 const PPPDecryptor_Buffer
& encrypted_buffer
,
61 const std::string
& serialized_encrypted_block_info
);
62 void OnMsgInitializeAudioDecoder(
64 const std::string
& decoder_config
,
65 const PPPDecryptor_Buffer
& extra_data_buffer
);
66 void OnMsgInitializeVideoDecoder(
68 const std::string
& decoder_config
,
69 const PPPDecryptor_Buffer
& extra_data_buffer
);
70 void OnMsgDeinitializeDecoder(PP_Instance instance
,
71 PP_DecryptorStreamType decoder_type
,
73 void OnMsgResetDecoder(PP_Instance instance
,
74 PP_DecryptorStreamType decoder_type
,
76 void OnMsgDecryptAndDecode(
78 PP_DecryptorStreamType decoder_type
,
79 const PPPDecryptor_Buffer
& encrypted_buffer
,
80 const std::string
& serialized_encrypted_block_info
);
82 const PPP_ContentDecryptor_Private
* ppp_decryptor_impl_
;
84 DISALLOW_COPY_AND_ASSIGN(PPP_ContentDecryptor_Private_Proxy
);
90 #endif // PPAPI_PROXY_PPP_CONTENT_DECRYPTOR_PRIVATE_PROXY_H_