Supervised user whitelists: Cleanup
[chromium-blink-merge.git] / ppapi / proxy / ppp_content_decryptor_private_proxy.h
blob483c744c877fd1ad97d5104f44170170bbe3167c
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_
8 #include <string>
9 #include <vector>
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"
17 namespace ppapi {
18 namespace proxy {
20 class SerializedVarReceiveInput;
22 class PPP_ContentDecryptor_Private_Proxy : public InterfaceProxy {
23 public:
24 explicit PPP_ContentDecryptor_Private_Proxy(Dispatcher* dispatcher);
25 virtual ~PPP_ContentDecryptor_Private_Proxy();
27 static const PPP_ContentDecryptor_Private* GetProxyInterface();
29 private:
30 // InterfaceProxy implementation.
31 virtual bool OnMessageReceived(const IPC::Message& msg);
33 // Message handlers.
34 void OnMsgInitialize(PP_Instance instance,
35 SerializedVarReceiveInput key_system,
36 PP_Bool allow_distinctive_identifier,
37 PP_Bool allow_persistent_state);
38 void OnMsgSetServerCertificate(PP_Instance instance,
39 uint32_t promise_id,
40 std::vector<uint8_t> server_certificate);
41 void OnMsgCreateSessionAndGenerateRequest(
42 PP_Instance instance,
43 uint32_t promise_id,
44 PP_SessionType session_type,
45 PP_InitDataType init_data_type,
46 SerializedVarReceiveInput init_data);
47 void OnMsgLoadSession(PP_Instance instance,
48 uint32_t promise_id,
49 PP_SessionType session_type,
50 SerializedVarReceiveInput session_id);
51 void OnMsgUpdateSession(PP_Instance instance,
52 uint32_t promise_id,
53 SerializedVarReceiveInput session_id,
54 SerializedVarReceiveInput response);
55 void OnMsgCloseSession(PP_Instance instance,
56 uint32_t promise_id,
57 const std::string& session_id);
58 void OnMsgRemoveSession(PP_Instance instance,
59 uint32_t promise_id,
60 const std::string& session_id);
61 void OnMsgDecrypt(PP_Instance instance,
62 const PPPDecryptor_Buffer& encrypted_buffer,
63 const std::string& serialized_encrypted_block_info);
64 void OnMsgInitializeAudioDecoder(
65 PP_Instance instance,
66 const std::string& decoder_config,
67 const PPPDecryptor_Buffer& extra_data_buffer);
68 void OnMsgInitializeVideoDecoder(
69 PP_Instance instance,
70 const std::string& decoder_config,
71 const PPPDecryptor_Buffer& extra_data_buffer);
72 void OnMsgDeinitializeDecoder(PP_Instance instance,
73 PP_DecryptorStreamType decoder_type,
74 uint32_t request_id);
75 void OnMsgResetDecoder(PP_Instance instance,
76 PP_DecryptorStreamType decoder_type,
77 uint32_t request_id);
78 void OnMsgDecryptAndDecode(
79 PP_Instance instance,
80 PP_DecryptorStreamType decoder_type,
81 const PPPDecryptor_Buffer& encrypted_buffer,
82 const std::string& serialized_encrypted_block_info);
84 const PPP_ContentDecryptor_Private* ppp_decryptor_impl_;
86 DISALLOW_COPY_AND_ASSIGN(PPP_ContentDecryptor_Private_Proxy);
89 } // namespace proxy
90 } // namespace ppapi
92 #endif // PPAPI_PROXY_PPP_CONTENT_DECRYPTOR_PRIVATE_PROXY_H_