| OLD | NEW |
| 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 // This file is used to define IPC::ParamTraits<> specializations for a number | 5 // This file is used to define IPC::ParamTraits<> specializations for a number |
| 6 // of types so that they can be serialized over IPC. IPC::ParamTraits<> | 6 // of types so that they can be serialized over IPC. IPC::ParamTraits<> |
| 7 // specializations for basic types (like int and std::string) and types in the | 7 // specializations for basic types (like int and std::string) and types in the |
| 8 // 'base' project can be found in ipc/ipc_message_utils.h. This file contains | 8 // 'base' project can be found in ipc/ipc_message_utils.h. This file contains |
| 9 // specializations for types that are shared by more than one child process. | 9 // specializations for types that are shared by more than one child process. |
| 10 | 10 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 struct WebApplicationInfo; | 43 struct WebApplicationInfo; |
| 44 class WebCursor; | 44 class WebCursor; |
| 45 | 45 |
| 46 namespace gfx { | 46 namespace gfx { |
| 47 class Point; | 47 class Point; |
| 48 class Rect; | 48 class Rect; |
| 49 class Size; | 49 class Size; |
| 50 } // namespace gfx | 50 } // namespace gfx |
| 51 | 51 |
| 52 namespace net { | 52 namespace net { |
| 53 class HostPortPair; |
| 53 class UploadData; | 54 class UploadData; |
| 54 class URLRequestStatus; | 55 class URLRequestStatus; |
| 55 } | 56 } |
| 56 | 57 |
| 57 namespace printing { | 58 namespace printing { |
| 58 struct PageRange; | 59 struct PageRange; |
| 59 struct PrinterCapsAndDefaults; | 60 struct PrinterCapsAndDefaults; |
| 60 } // namespace printing | 61 } // namespace printing |
| 61 | 62 |
| 62 namespace webkit_glue { | 63 namespace webkit_glue { |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 static void Log(const param_type& p, std::string* l) { | 257 static void Log(const param_type& p, std::string* l) { |
| 257 l->append("TransportDIB("); | 258 l->append("TransportDIB("); |
| 258 LogParam(p.handle, l); | 259 LogParam(p.handle, l); |
| 259 l->append(", "); | 260 l->append(", "); |
| 260 LogParam(p.sequence_num, l); | 261 LogParam(p.sequence_num, l); |
| 261 l->append(")"); | 262 l->append(")"); |
| 262 } | 263 } |
| 263 }; | 264 }; |
| 264 #endif | 265 #endif |
| 265 | 266 |
| 267 // Traits for HostPortPair |
| 268 template<> |
| 269 struct ParamTraits<net::HostPortPair> { |
| 270 typedef net::HostPortPair param_type; |
| 271 static void Write(Message* m, const param_type& p); |
| 272 static bool Read(const Message* m, void** iter, param_type* r); |
| 273 static void Log(const param_type& p, std::string* l); |
| 274 }; |
| 275 |
| 266 // Traits for URLRequestStatus | 276 // Traits for URLRequestStatus |
| 267 template <> | 277 template <> |
| 268 struct ParamTraits<net::URLRequestStatus> { | 278 struct ParamTraits<net::URLRequestStatus> { |
| 269 typedef net::URLRequestStatus param_type; | 279 typedef net::URLRequestStatus param_type; |
| 270 static void Write(Message* m, const param_type& p); | 280 static void Write(Message* m, const param_type& p); |
| 271 static bool Read(const Message* m, void** iter, param_type* r); | 281 static bool Read(const Message* m, void** iter, param_type* r); |
| 272 static void Log(const param_type& p, std::string* l); | 282 static void Log(const param_type& p, std::string* l); |
| 273 }; | 283 }; |
| 274 | 284 |
| 275 // Traits for net::UploadData. | 285 // Traits for net::UploadData. |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 struct ParamTraits<printing::PrinterCapsAndDefaults> { | 349 struct ParamTraits<printing::PrinterCapsAndDefaults> { |
| 340 typedef printing::PrinterCapsAndDefaults param_type; | 350 typedef printing::PrinterCapsAndDefaults param_type; |
| 341 static void Write(Message* m, const param_type& p); | 351 static void Write(Message* m, const param_type& p); |
| 342 static bool Read(const Message* m, void** iter, param_type* r); | 352 static bool Read(const Message* m, void** iter, param_type* r); |
| 343 static void Log(const param_type& p, std::string* l); | 353 static void Log(const param_type& p, std::string* l); |
| 344 }; | 354 }; |
| 345 | 355 |
| 346 } // namespace IPC | 356 } // namespace IPC |
| 347 | 357 |
| 348 #endif // CHROME_COMMON_COMMON_PARAM_TRAITS_H_ | 358 #endif // CHROME_COMMON_COMMON_PARAM_TRAITS_H_ |
| OLD | NEW |