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

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

Issue 1659003003: IPC::Message -> base::Pickle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix missing comment Created 4 years, 10 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
OLDNEW
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_RESOURCE_MESSAGE_PARAMS_H_ 5 #ifndef PPAPI_PROXY_RESOURCE_MESSAGE_PARAMS_H_
6 #define PPAPI_PROXY_RESOURCE_MESSAGE_PARAMS_H_ 6 #define PPAPI_PROXY_RESOURCE_MESSAGE_PARAMS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 }; 179 };
180 180
181 } // namespace proxy 181 } // namespace proxy
182 } // namespace ppapi 182 } // namespace ppapi
183 183
184 namespace IPC { 184 namespace IPC {
185 185
186 template <> struct PPAPI_PROXY_EXPORT 186 template <> struct PPAPI_PROXY_EXPORT
187 ParamTraits<ppapi::proxy::ResourceMessageCallParams> { 187 ParamTraits<ppapi::proxy::ResourceMessageCallParams> {
188 typedef ppapi::proxy::ResourceMessageCallParams param_type; 188 typedef ppapi::proxy::ResourceMessageCallParams param_type;
189 static void Write(Message* m, const param_type& p) { 189 static void Write(base::Pickle* m, const param_type& p) {
190 p.Serialize(m); 190 p.Serialize(static_cast<IPC::Message*>(m));
191 } 191 }
192 static bool Read(const Message* m, base::PickleIterator* iter, 192 static bool Read(const base::Pickle* m,
193 base::PickleIterator* iter,
193 param_type* r) { 194 param_type* r) {
194 return r->Deserialize(m, iter); 195 return r->Deserialize(static_cast<const IPC::Message*>(m), iter);
195 } 196 }
196 static void Log(const param_type& p, std::string* l) { 197 static void Log(const param_type& p, std::string* l) {
197 } 198 }
198 }; 199 };
199 200
200 template <> struct PPAPI_PROXY_EXPORT 201 template <> struct PPAPI_PROXY_EXPORT
201 ParamTraits<ppapi::proxy::ResourceMessageReplyParams> { 202 ParamTraits<ppapi::proxy::ResourceMessageReplyParams> {
202 typedef ppapi::proxy::ResourceMessageReplyParams param_type; 203 typedef ppapi::proxy::ResourceMessageReplyParams param_type;
203 static void Write(Message* m, const param_type& p) { 204 static void Write(base::Pickle* m, const param_type& p) {
204 p.Serialize(m); 205 p.Serialize(static_cast<IPC::Message*>(m));
205 } 206 }
206 static bool Read(const Message* m, base::PickleIterator* iter, 207 static bool Read(const base::Pickle* m,
208 base::PickleIterator* iter,
207 param_type* r) { 209 param_type* r) {
208 return r->Deserialize(m, iter); 210 return r->Deserialize(static_cast<const IPC::Message*>(m), iter);
209 } 211 }
210 static void Log(const param_type& p, std::string* l) { 212 static void Log(const param_type& p, std::string* l) {
211 } 213 }
212 }; 214 };
213 215
214 } // namespace IPC 216 } // namespace IPC
215 217
216 #endif // PPAPI_PROXY_RESOURCE_MESSAGE_PARAMS_H_ 218 #endif // PPAPI_PROXY_RESOURCE_MESSAGE_PARAMS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698