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

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

Issue 7655002: Convert the pp::proxy namespace to the ppapi::proxy namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 months 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_PPAPI_PARAM_TRAITS_H_ 5 #ifndef PPAPI_PROXY_PPAPI_PARAM_TRAITS_H_
6 #define PPAPI_PROXY_PPAPI_PARAM_TRAITS_H_ 6 #define PPAPI_PROXY_PPAPI_PARAM_TRAITS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "ipc/ipc_message_utils.h" 11 #include "ipc/ipc_message_utils.h"
12 #include "ipc/ipc_platform_file.h" 12 #include "ipc/ipc_platform_file.h"
13 #include "ppapi/c/pp_completion_callback.h" 13 #include "ppapi/c/pp_completion_callback.h"
14 #include "ppapi/c/pp_rect.h" 14 #include "ppapi/c/pp_rect.h"
15 #include "ppapi/c/pp_var.h" 15 #include "ppapi/c/pp_var.h"
16 16
17 struct PP_FileInfo; 17 struct PP_FileInfo;
18 struct PP_ObjectProperty; 18 struct PP_ObjectProperty;
19 struct PP_Flash_Menu; 19 struct PP_Flash_Menu;
20 struct PP_Flash_NetAddress; 20 struct PP_Flash_NetAddress;
21 21
22 namespace ppapi { 22 namespace ppapi {
23 23
24 class HostResource; 24 class HostResource;
25 25
26 } // namespace ppapi
27
28 namespace pp {
29 namespace proxy { 26 namespace proxy {
30 27
31 struct PPBFileRef_CreateInfo; 28 struct PPBFileRef_CreateInfo;
32 struct PPBFlash_DrawGlyphs_Params; 29 struct PPBFlash_DrawGlyphs_Params;
33 struct PPBURLLoader_UpdateProgress_Params; 30 struct PPBURLLoader_UpdateProgress_Params;
34 struct SerializedDirEntry; 31 struct SerializedDirEntry;
35 struct SerializedFontDescription; 32 struct SerializedFontDescription;
36 class SerializedFlashMenu; 33 class SerializedFlashMenu;
37 class SerializedVar; 34 class SerializedVar;
38 35
39 } // namespace proxy 36 } // namespace proxy
40 } // namespace pp 37 } // namespace ppapi
41 38
42 namespace IPC { 39 namespace IPC {
43 40
44 template<> 41 template<>
45 struct ParamTraits<PP_Bool> { 42 struct ParamTraits<PP_Bool> {
46 typedef PP_Bool param_type; 43 typedef PP_Bool param_type;
47 static void Write(Message* m, const param_type& p); 44 static void Write(Message* m, const param_type& p);
48 static bool Read(const Message* m, void** iter, param_type* r); 45 static bool Read(const Message* m, void** iter, param_type* r);
49 static void Log(const param_type& p, std::string* l); 46 static void Log(const param_type& p, std::string* l);
50 }; 47 };
(...skipping 16 matching lines...) Expand all
67 64
68 template<> 65 template<>
69 struct ParamTraits<PP_ObjectProperty> { 66 struct ParamTraits<PP_ObjectProperty> {
70 typedef PP_ObjectProperty param_type; 67 typedef PP_ObjectProperty param_type;
71 static void Write(Message* m, const param_type& p); 68 static void Write(Message* m, const param_type& p);
72 static bool Read(const Message* m, void** iter, param_type* r); 69 static bool Read(const Message* m, void** iter, param_type* r);
73 static void Log(const param_type& p, std::string* l); 70 static void Log(const param_type& p, std::string* l);
74 }; 71 };
75 72
76 template<> 73 template<>
77 struct ParamTraits<pp::proxy::PPBFlash_DrawGlyphs_Params> { 74 struct ParamTraits<ppapi::proxy::PPBFlash_DrawGlyphs_Params> {
78 typedef pp::proxy::PPBFlash_DrawGlyphs_Params param_type; 75 typedef ppapi::proxy::PPBFlash_DrawGlyphs_Params param_type;
79 static void Write(Message* m, const param_type& p); 76 static void Write(Message* m, const param_type& p);
80 static bool Read(const Message* m, void** iter, param_type* r); 77 static bool Read(const Message* m, void** iter, param_type* r);
81 static void Log(const param_type& p, std::string* l); 78 static void Log(const param_type& p, std::string* l);
82 }; 79 };
83 80
84 template<> 81 template<>
85 struct ParamTraits<pp::proxy::PPBFileRef_CreateInfo> { 82 struct ParamTraits<ppapi::proxy::PPBFileRef_CreateInfo> {
86 typedef pp::proxy::PPBFileRef_CreateInfo param_type; 83 typedef ppapi::proxy::PPBFileRef_CreateInfo param_type;
87 static void Write(Message* m, const param_type& p); 84 static void Write(Message* m, const param_type& p);
88 static bool Read(const Message* m, void** iter, param_type* r); 85 static bool Read(const Message* m, void** iter, param_type* r);
89 static void Log(const param_type& p, std::string* l); 86 static void Log(const param_type& p, std::string* l);
90 }; 87 };
91 88
92 template<> 89 template<>
93 struct ParamTraits<pp::proxy::PPBURLLoader_UpdateProgress_Params> { 90 struct ParamTraits<ppapi::proxy::PPBURLLoader_UpdateProgress_Params> {
94 typedef pp::proxy::PPBURLLoader_UpdateProgress_Params param_type; 91 typedef ppapi::proxy::PPBURLLoader_UpdateProgress_Params param_type;
95 static void Write(Message* m, const param_type& p); 92 static void Write(Message* m, const param_type& p);
96 static bool Read(const Message* m, void** iter, param_type* r); 93 static bool Read(const Message* m, void** iter, param_type* r);
97 static void Log(const param_type& p, std::string* l); 94 static void Log(const param_type& p, std::string* l);
98 }; 95 };
99 96
100 template<> 97 template<>
101 struct ParamTraits<pp::proxy::SerializedDirEntry> { 98 struct ParamTraits<ppapi::proxy::SerializedDirEntry> {
102 typedef pp::proxy::SerializedDirEntry param_type; 99 typedef ppapi::proxy::SerializedDirEntry param_type;
103 static void Write(Message* m, const param_type& p); 100 static void Write(Message* m, const param_type& p);
104 static bool Read(const Message* m, void** iter, param_type* r); 101 static bool Read(const Message* m, void** iter, param_type* r);
105 static void Log(const param_type& p, std::string* l); 102 static void Log(const param_type& p, std::string* l);
106 }; 103 };
107 104
108 template<> 105 template<>
109 struct ParamTraits<pp::proxy::SerializedFontDescription> { 106 struct ParamTraits<ppapi::proxy::SerializedFontDescription> {
110 typedef pp::proxy::SerializedFontDescription param_type; 107 typedef ppapi::proxy::SerializedFontDescription param_type;
111 static void Write(Message* m, const param_type& p); 108 static void Write(Message* m, const param_type& p);
112 static bool Read(const Message* m, void** iter, param_type* r); 109 static bool Read(const Message* m, void** iter, param_type* r);
113 static void Log(const param_type& p, std::string* l); 110 static void Log(const param_type& p, std::string* l);
114 }; 111 };
115 112
116 template<> 113 template<>
117 struct ParamTraits<ppapi::HostResource> { 114 struct ParamTraits<ppapi::HostResource> {
118 typedef ppapi::HostResource param_type; 115 typedef ppapi::HostResource param_type;
119 static void Write(Message* m, const param_type& p); 116 static void Write(Message* m, const param_type& p);
120 static bool Read(const Message* m, void** iter, param_type* r); 117 static bool Read(const Message* m, void** iter, param_type* r);
121 static void Log(const param_type& p, std::string* l); 118 static void Log(const param_type& p, std::string* l);
122 }; 119 };
123 120
124 template<> 121 template<>
125 struct ParamTraits<pp::proxy::SerializedVar> { 122 struct ParamTraits<ppapi::proxy::SerializedVar> {
126 typedef pp::proxy::SerializedVar param_type; 123 typedef ppapi::proxy::SerializedVar param_type;
127 static void Write(Message* m, const param_type& p); 124 static void Write(Message* m, const param_type& p);
128 static bool Read(const Message* m, void** iter, param_type* r); 125 static bool Read(const Message* m, void** iter, param_type* r);
129 static void Log(const param_type& p, std::string* l); 126 static void Log(const param_type& p, std::string* l);
130 }; 127 };
131 128
132 template<> 129 template<>
133 struct ParamTraits< std::vector<pp::proxy::SerializedVar> > { 130 struct ParamTraits< std::vector<ppapi::proxy::SerializedVar> > {
134 typedef std::vector<pp::proxy::SerializedVar> param_type; 131 typedef std::vector<ppapi::proxy::SerializedVar> param_type;
135 static void Write(Message* m, const param_type& p); 132 static void Write(Message* m, const param_type& p);
136 static bool Read(const Message* m, void** iter, param_type* r); 133 static bool Read(const Message* m, void** iter, param_type* r);
137 static void Log(const param_type& p, std::string* l); 134 static void Log(const param_type& p, std::string* l);
138 }; 135 };
139 136
140 template<> 137 template<>
141 struct ParamTraits< std::vector<pp::proxy::PPBFileRef_CreateInfo> > { 138 struct ParamTraits< std::vector<ppapi::proxy::PPBFileRef_CreateInfo> > {
142 typedef std::vector<pp::proxy::PPBFileRef_CreateInfo> param_type; 139 typedef std::vector<ppapi::proxy::PPBFileRef_CreateInfo> param_type;
143 static void Write(Message* m, const param_type& p); 140 static void Write(Message* m, const param_type& p);
144 static bool Read(const Message* m, void** iter, param_type* r); 141 static bool Read(const Message* m, void** iter, param_type* r);
145 static void Log(const param_type& p, std::string* l); 142 static void Log(const param_type& p, std::string* l);
146 }; 143 };
147 144
148 template<> 145 template<>
149 struct ParamTraits<pp::proxy::SerializedFlashMenu> { 146 struct ParamTraits<ppapi::proxy::SerializedFlashMenu> {
150 typedef pp::proxy::SerializedFlashMenu param_type; 147 typedef ppapi::proxy::SerializedFlashMenu param_type;
151 static void Write(Message* m, const param_type& p); 148 static void Write(Message* m, const param_type& p);
152 static bool Read(const Message* m, void** iter, param_type* r); 149 static bool Read(const Message* m, void** iter, param_type* r);
153 static void Log(const param_type& p, std::string* l); 150 static void Log(const param_type& p, std::string* l);
154 }; 151 };
155 152
156 } // namespace IPC 153 } // namespace IPC
157 154
158 #endif // PPAPI_PROXY_PPAPI_PARAM_TRAITS_H_ 155 #endif // PPAPI_PROXY_PPAPI_PARAM_TRAITS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698