Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: ppapi/proxy/host_var_serialization_rules.h

Issue 4096008: Var serialization-related proxy stuff. This allows vars to be sent over IPC... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ppapi/proxy/host_var_serialization_rules.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef PPAPI_PROXY_HOST_VAR_SERIALIZATION_RULES_H_
6 #define PPAPI_PROXY_HOST_VAR_SERIALIZATION_RULES_H_
7
8 #include "base/basictypes.h"
9 #include "ppapi/c/pp_module.h"
10 #include "ppapi/proxy/var_serialization_rules.h"
11
12 struct PPB_Var_Deprecated;
13
14 namespace pp {
15 namespace proxy {
16
17 class VarTracker;
18
19 // Implementation of the VarSerializationRules interface for the host side.
20 class HostVarSerializationRules : public VarSerializationRules {
21 public:
22 HostVarSerializationRules(const PPB_Var_Deprecated* var_interface,
23 PP_Module pp_module);
24 ~HostVarSerializationRules();
25
26 // VarSerialization implementation.
27 virtual void SendCallerOwned(const PP_Var& var, std::string* str_val);
28 virtual PP_Var BeginReceiveCallerOwned(const PP_Var& var,
29 const std::string* str_val);
30 virtual void EndReceiveCallerOwned(const PP_Var& var);
31 virtual PP_Var ReceivePassRef(const PP_Var& var,
32 const std::string& str_val);
33 virtual void BeginSendPassRef(const PP_Var& var, std::string* str_val);
34 virtual void EndSendPassRef(const PP_Var& var);
35 virtual void ReleaseObjectRef(const PP_Var& var);
36
37 private:
38 // Converts the given var (which must be a VARTYPE_STRING) to the given
39 // string object.
40 void VarToString(const PP_Var& var, std::string* str);
41
42 const PPB_Var_Deprecated* var_interface_;
43 PP_Module pp_module_;
44
45 DISALLOW_COPY_AND_ASSIGN(HostVarSerializationRules);
46 };
47
48 } // namespace proxy
49 } // namespace pp
50
51 #endif // PPAPI_PROXY_HOST_VAR_SERIALIZATION_RULES_H_
OLDNEW
« no previous file with comments | « no previous file | ppapi/proxy/host_var_serialization_rules.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698