Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef PPAPI_PROXY_PPP_CONTENT_DECRYPTOR_PRIVATE_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPP_CONTENT_DECRYPTOR_PRIVATE_PROXY_H_ |
| 6 #define PPAPI_PROXY_PPP_CONTENT_DECRYPTOR_PRIVATE_PROXY_H_ | 6 #define PPAPI_PROXY_PPP_CONTENT_DECRYPTOR_PRIVATE_PROXY_H_ |
| 7 | 7 |
|
xhwang
2012/08/21 21:22:01
nit: include what you use, add #include <string> h
Tom Finegan
2012/08/21 22:57:39
Done.
| |
| 8 #include "ppapi/c/pp_instance.h" | 8 #include "ppapi/c/pp_instance.h" |
| 9 #include "ppapi/c/private/ppp_content_decryptor_private.h" | 9 #include "ppapi/c/private/ppp_content_decryptor_private.h" |
| 10 #include "ppapi/proxy/interface_proxy.h" | 10 #include "ppapi/proxy/interface_proxy.h" |
| 11 #include "ppapi/proxy/serialized_structs.h" | 11 #include "ppapi/proxy/serialized_structs.h" |
| 12 #include "ppapi/shared_impl/host_resource.h" | 12 #include "ppapi/shared_impl/host_resource.h" |
| 13 | 13 |
| 14 namespace ppapi { | 14 namespace ppapi { |
| 15 namespace proxy { | 15 namespace proxy { |
| 16 | 16 |
| 17 class SerializedVarReceiveInput; | 17 class SerializedVarReceiveInput; |
| 18 | 18 |
| 19 class PPP_ContentDecryptor_Private_Proxy : public InterfaceProxy { | 19 class PPP_ContentDecryptor_Private_Proxy : public InterfaceProxy { |
| 20 public: | 20 public: |
| 21 explicit PPP_ContentDecryptor_Private_Proxy(Dispatcher* dispatcher); | 21 explicit PPP_ContentDecryptor_Private_Proxy(Dispatcher* dispatcher); |
| 22 virtual ~PPP_ContentDecryptor_Private_Proxy(); | 22 virtual ~PPP_ContentDecryptor_Private_Proxy(); |
| 23 | 23 |
| 24 static const PPP_ContentDecryptor_Private* GetProxyInterface(); | 24 static const PPP_ContentDecryptor_Private* GetProxyInterface(); |
| 25 | 25 |
| 26 private: | 26 private: |
| 27 // InterfaceProxy implementation. | 27 // InterfaceProxy implementation. |
| 28 virtual bool OnMessageReceived(const IPC::Message& msg); | 28 virtual bool OnMessageReceived(const IPC::Message& msg); |
| 29 | 29 |
| 30 // Message handlers. | 30 // Message handlers. |
| 31 void OnMsgGenerateKeyRequest(PP_Instance instance, | 31 void OnMsgGenerateKeyRequest(PP_Instance instance, |
| 32 SerializedVarReceiveInput key_system, | 32 SerializedVarReceiveInput key_system, |
| 33 SerializedVarReceiveInput init_data); | 33 SerializedVarReceiveInput init_data); |
| 34 void OnMsgAddKey(PP_Instance instance, | 34 void OnMsgAddKey(PP_Instance instance, |
| 35 SerializedVarReceiveInput session_id, | 35 SerializedVarReceiveInput session_id, |
| 36 SerializedVarReceiveInput key); | 36 SerializedVarReceiveInput key, |
| 37 SerializedVarReceiveInput init_data); | |
| 37 void OnMsgCancelKeyRequest(PP_Instance instance, | 38 void OnMsgCancelKeyRequest(PP_Instance instance, |
| 38 SerializedVarReceiveInput session_id); | 39 SerializedVarReceiveInput session_id); |
| 39 void OnMsgDecrypt(PP_Instance instance, | 40 void OnMsgDecrypt(PP_Instance instance, |
| 40 const PPPDecryptor_Buffer& encrypted_buffer, | 41 const PPPDecryptor_Buffer& encrypted_buffer, |
| 41 int32_t request_id); | 42 const std::string& serialized_encrypted_block_info); |
| 42 void OnMsgDecryptAndDecode(PP_Instance instance, | 43 void OnMsgDecryptAndDecode( |
| 43 const HostResource& encrypted_block, | 44 PP_Instance instance, |
| 44 int32_t request_id); | 45 const PPPDecryptor_Buffer& encrypted_buffer, |
| 46 const std::string& serialized_encrypted_block_info); | |
| 45 | 47 |
| 46 const PPP_ContentDecryptor_Private* ppp_decryptor_impl_; | 48 const PPP_ContentDecryptor_Private* ppp_decryptor_impl_; |
| 47 | 49 |
| 48 DISALLOW_COPY_AND_ASSIGN(PPP_ContentDecryptor_Private_Proxy); | 50 DISALLOW_COPY_AND_ASSIGN(PPP_ContentDecryptor_Private_Proxy); |
| 49 }; | 51 }; |
| 50 | 52 |
| 51 } // namespace proxy | 53 } // namespace proxy |
| 52 } // namespace ppapi | 54 } // namespace ppapi |
| 53 | 55 |
| 54 #endif // PPAPI_PROXY_PPP_CONTENT_DECRYPTOR_PRIVATE_PROXY_H_ | 56 #endif // PPAPI_PROXY_PPP_CONTENT_DECRYPTOR_PRIVATE_PROXY_H_ |
| OLD | NEW |