OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_VAR_SERIALIZATION_RULES_H_ | 5 #ifndef PPAPI_PROXY_VAR_SERIALIZATION_RULES_H_ |
6 #define PPAPI_PROXY_VAR_SERIALIZATION_RULES_H_ | 6 #define PPAPI_PROXY_VAR_SERIALIZATION_RULES_H_ |
7 | 7 |
8 #include "ppapi/c/pp_var.h" | 8 #include "ppapi/c/pp_var.h" |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 // is a VARTYPE_STRING and may be NULL otherwise). The input var/string | 66 // is a VARTYPE_STRING and may be NULL otherwise). The input var/string |
67 // should be the result of calling SendPassRef in the remote process. The | 67 // should be the result of calling SendPassRef in the remote process. The |
68 // return value is the var valid in the plugin process. | 68 // return value is the var valid in the plugin process. |
69 virtual PP_Var ReceivePassRef(const PP_Var& var, | 69 virtual PP_Var ReceivePassRef(const PP_Var& var, |
70 const std::string& str_val, | 70 const std::string& str_val, |
71 Dispatcher* dispatcher) = 0; | 71 Dispatcher* dispatcher) = 0; |
72 | 72 |
73 // Prepares a var to be sent to the remote side. One local reference will | 73 // Prepares a var to be sent to the remote side. One local reference will |
74 // be passed to the remote side. Call Begin* before doing the send and End* | 74 // be passed to the remote side. Call Begin* before doing the send and End* |
75 // after doing the send. See SendCallerOwned for a description of the string. | 75 // after doing the send. See SendCallerOwned for a description of the string. |
| 76 // |
76 // The return value from BeginSendPassRef will be the var valid for the host | 77 // The return value from BeginSendPassRef will be the var valid for the host |
77 // process. | 78 // process. This same value must be passed to EndSendPassRef. |
78 virtual PP_Var BeginSendPassRef(const PP_Var& var, std::string* str_val) = 0; | 79 virtual PP_Var BeginSendPassRef(const PP_Var& var, std::string* str_val) = 0; |
79 virtual void EndSendPassRef(const PP_Var& var) = 0; | 80 virtual void EndSendPassRef(const PP_Var& var, Dispatcher* dispatcher) = 0; |
80 | 81 |
81 // --------------------------------------------------------------------------- | 82 // --------------------------------------------------------------------------- |
82 | 83 |
83 virtual void ReleaseObjectRef(const PP_Var& var) = 0; | 84 virtual void ReleaseObjectRef(const PP_Var& var) = 0; |
84 | 85 |
85 protected: | 86 protected: |
86 VarSerializationRules() {} | 87 VarSerializationRules() {} |
87 }; | 88 }; |
88 | 89 |
89 } // namespace proxy | 90 } // namespace proxy |
90 } // namespace pp | 91 } // namespace pp |
91 | 92 |
92 #endif // PPAPI_PROXY_VAR_SERIALIZATION_RULES_H_ | 93 #endif // PPAPI_PROXY_VAR_SERIALIZATION_RULES_H_ |
OLD | NEW |