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_HOST_VAR_SERIALIZATION_RULES_H_ | 5 #ifndef PPAPI_PROXY_HOST_VAR_SERIALIZATION_RULES_H_ |
6 #define PPAPI_PROXY_HOST_VAR_SERIALIZATION_RULES_H_ | 6 #define PPAPI_PROXY_HOST_VAR_SERIALIZATION_RULES_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "ppapi/c/pp_module.h" | |
12 #include "ppapi/c/ppb_var.h" | 11 #include "ppapi/c/ppb_var.h" |
13 #include "ppapi/proxy/var_serialization_rules.h" | 12 #include "ppapi/proxy/var_serialization_rules.h" |
14 | 13 |
15 namespace ppapi { | 14 namespace ppapi { |
16 namespace proxy { | 15 namespace proxy { |
17 | 16 |
18 // Implementation of the VarSerializationRules interface for the host side. | 17 // Implementation of the VarSerializationRules interface for the host side. |
19 class HostVarSerializationRules : public VarSerializationRules { | 18 class HostVarSerializationRules : public VarSerializationRules { |
20 public: | 19 public: |
21 HostVarSerializationRules(PP_Module pp_module); | 20 HostVarSerializationRules(); |
22 ~HostVarSerializationRules(); | 21 ~HostVarSerializationRules(); |
23 | 22 |
24 // VarSerialization implementation. | 23 // VarSerialization implementation. |
25 virtual PP_Var SendCallerOwned(const PP_Var& var); | 24 virtual PP_Var SendCallerOwned(const PP_Var& var); |
26 virtual PP_Var BeginReceiveCallerOwned(const PP_Var& var, | 25 virtual PP_Var BeginReceiveCallerOwned(const PP_Var& var); |
27 Dispatcher* dispatcher); | |
28 virtual void EndReceiveCallerOwned(const PP_Var& var); | 26 virtual void EndReceiveCallerOwned(const PP_Var& var); |
29 virtual PP_Var ReceivePassRef(const PP_Var& var, | 27 virtual PP_Var ReceivePassRef(const PP_Var& var); |
30 Dispatcher* dispatcher); | |
31 virtual PP_Var BeginSendPassRef(const PP_Var& var); | 28 virtual PP_Var BeginSendPassRef(const PP_Var& var); |
32 virtual void EndSendPassRef(const PP_Var& var, Dispatcher* dispatcher); | 29 virtual void EndSendPassRef(const PP_Var& var); |
33 virtual void ReleaseObjectRef(const PP_Var& var); | 30 virtual void ReleaseObjectRef(const PP_Var& var); |
34 | 31 |
35 private: | 32 private: |
36 PP_Module pp_module_; | |
37 | |
38 DISALLOW_COPY_AND_ASSIGN(HostVarSerializationRules); | 33 DISALLOW_COPY_AND_ASSIGN(HostVarSerializationRules); |
39 }; | 34 }; |
40 | 35 |
41 } // namespace proxy | 36 } // namespace proxy |
42 } // namespace ppapi | 37 } // namespace ppapi |
43 | 38 |
44 #endif // PPAPI_PROXY_HOST_VAR_SERIALIZATION_RULES_H_ | 39 #endif // PPAPI_PROXY_HOST_VAR_SERIALIZATION_RULES_H_ |
OLD | NEW |