Elim cr-checkbox
[chromium-blink-merge.git] / ppapi / proxy / ppp_content_decryptor_private_proxy.h
blob0df8734ca241208b62d5d1b9b8c24d38fef6fd58
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 uint32_t promise_id,
36 SerializedVarReceiveInput key_system,
37 PP_Bool allow_distinctive_identifier,
38 PP_Bool allow_persistent_state);
39 void OnMsgSetServerCertificate(PP_Instance instance,
40 uint32_t promise_id,
41 std::vector<uint8_t> server_certificate);
42 void OnMsgCreateSessionAndGenerateRequest(
43 PP_Instance instance,
44 uint32_t promise_id,
45 PP_SessionType session_type,
46 PP_InitDataType init_data_type,
47 SerializedVarReceiveInput init_data);
48 void OnMsgLoadSession(PP_Instance instance,
49 uint32_t promise_id,
50 PP_SessionType session_type,
51 SerializedVarReceiveInput session_id);
52 void OnMsgUpdateSession(PP_Instance instance,
53 uint32_t promise_id,
54 SerializedVarReceiveInput session_id,
55 SerializedVarReceiveInput response);
56 void OnMsgCloseSession(PP_Instance instance,
57 uint32_t promise_id,
58 const std::string& session_id);
59 void OnMsgRemoveSession(PP_Instance instance,
60 uint32_t promise_id,
61 const std::string& session_id);
62 void OnMsgDecrypt(PP_Instance instance,
63 const PPPDecryptor_Buffer& encrypted_buffer,
64 const std::string& serialized_encrypted_block_info);
65 void OnMsgInitializeAudioDecoder(
66 PP_Instance instance,
67 const std::string& decoder_config,
68 const PPPDecryptor_Buffer& extra_data_buffer);
69 void OnMsgInitializeVideoDecoder(
70 PP_Instance instance,
71 const std::string& decoder_config,
72 const PPPDecryptor_Buffer& extra_data_buffer);
73 void OnMsgDeinitializeDecoder(PP_Instance instance,
74 PP_DecryptorStreamType decoder_type,
75 uint32_t request_id);
76 void OnMsgResetDecoder(PP_Instance instance,
77 PP_DecryptorStreamType decoder_type,
78 uint32_t request_id);
79 void OnMsgDecryptAndDecode(
80 PP_Instance instance,
81 PP_DecryptorStreamType decoder_type,
82 const PPPDecryptor_Buffer& encrypted_buffer,
83 const std::string& serialized_encrypted_block_info);
85 const PPP_ContentDecryptor_Private* ppp_decryptor_impl_;
87 DISALLOW_COPY_AND_ASSIGN(PPP_ContentDecryptor_Private_Proxy);
90 } // namespace proxy
91 } // namespace ppapi
93 #endif // PPAPI_PROXY_PPP_CONTENT_DECRYPTOR_PRIVATE_PROXY_H_