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

Side by Side Diff: ipc/ipc_message_utils.h

Issue 4752008: Add proxies for some of the PDF & Flash functionality. There are still a few... (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 | ipc/ipc_message_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 IPC_IPC_MESSAGE_UTILS_H_ 5 #ifndef IPC_IPC_MESSAGE_UTILS_H_
6 #define IPC_IPC_MESSAGE_UTILS_H_ 6 #define IPC_IPC_MESSAGE_UTILS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 typedef unsigned long long param_type; 234 typedef unsigned long long param_type;
235 static void Write(Message* m, const param_type& p) { 235 static void Write(Message* m, const param_type& p) {
236 m->WriteInt64(p); 236 m->WriteInt64(p);
237 } 237 }
238 static bool Read(const Message* m, void** iter, param_type* r) { 238 static bool Read(const Message* m, void** iter, param_type* r) {
239 return m->ReadInt64(iter, reinterpret_cast<int64*>(r)); 239 return m->ReadInt64(iter, reinterpret_cast<int64*>(r));
240 } 240 }
241 static void Log(const param_type& p, std::string* l); 241 static void Log(const param_type& p, std::string* l);
242 }; 242 };
243 243
244 template <>
245 struct ParamTraits<unsigned short> {
246 typedef unsigned short param_type;
247 static void Write(Message* m, const param_type& p);
248 static bool Read(const Message* m, void** iter, param_type* r);
249 static void Log(const param_type& p, std::string* l);
250 };
251
244 // Note that the IPC layer doesn't sanitize NaNs and +/- INF values. Clients 252 // Note that the IPC layer doesn't sanitize NaNs and +/- INF values. Clients
245 // should be sure to check the sanity of these values after receiving them over 253 // should be sure to check the sanity of these values after receiving them over
246 // IPC. 254 // IPC.
247 template <> 255 template <>
248 struct ParamTraits<float> { 256 struct ParamTraits<float> {
249 typedef float param_type; 257 typedef float param_type;
250 static void Write(Message* m, const param_type& p) { 258 static void Write(Message* m, const param_type& p) {
251 m->WriteData(reinterpret_cast<const char*>(&p), sizeof(param_type)); 259 m->WriteData(reinterpret_cast<const char*>(&p), sizeof(param_type));
252 } 260 }
253 static bool Read(const Message* m, void** iter, param_type* r) { 261 static bool Read(const Message* m, void** iter, param_type* r) {
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
1191 ReplyParam p(a, b, c, d, e); 1199 ReplyParam p(a, b, c, d, e);
1192 WriteParam(reply, p); 1200 WriteParam(reply, p);
1193 } 1201 }
1194 }; 1202 };
1195 1203
1196 //----------------------------------------------------------------------------- 1204 //-----------------------------------------------------------------------------
1197 1205
1198 } // namespace IPC 1206 } // namespace IPC
1199 1207
1200 #endif // IPC_IPC_MESSAGE_UTILS_H_ 1208 #endif // IPC_IPC_MESSAGE_UTILS_H_
OLDNEW
« no previous file with comments | « no previous file | ipc/ipc_message_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698