| OLD | NEW |
| 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 // 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 } // namespace gfx | 42 } // namespace gfx |
| 43 | 43 |
| 44 namespace net { | 44 namespace net { |
| 45 class UploadData; | 45 class UploadData; |
| 46 } | 46 } |
| 47 | 47 |
| 48 namespace printing { | 48 namespace printing { |
| 49 struct PageRange; | 49 struct PageRange; |
| 50 } // namespace printing | 50 } // namespace printing |
| 51 | 51 |
| 52 namespace webkit_blob { |
| 53 class BlobData; |
| 54 } |
| 55 |
| 52 namespace webkit_glue { | 56 namespace webkit_glue { |
| 53 struct PasswordForm; | 57 struct PasswordForm; |
| 54 struct WebApplicationInfo; | 58 struct WebApplicationInfo; |
| 55 } // namespace webkit_glue | 59 } // namespace webkit_glue |
| 56 | 60 |
| 57 namespace IPC { | 61 namespace IPC { |
| 58 | 62 |
| 59 template <> | 63 template <> |
| 60 struct ParamTraits<SkBitmap> { | 64 struct ParamTraits<SkBitmap> { |
| 61 typedef SkBitmap param_type; | 65 typedef SkBitmap param_type; |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 | 269 |
| 266 // Traits for net::UploadData. | 270 // Traits for net::UploadData. |
| 267 template <> | 271 template <> |
| 268 struct ParamTraits<scoped_refptr<net::UploadData> > { | 272 struct ParamTraits<scoped_refptr<net::UploadData> > { |
| 269 typedef scoped_refptr<net::UploadData> param_type; | 273 typedef scoped_refptr<net::UploadData> param_type; |
| 270 static void Write(Message* m, const param_type& p); | 274 static void Write(Message* m, const param_type& p); |
| 271 static bool Read(const Message* m, void** iter, param_type* r); | 275 static bool Read(const Message* m, void** iter, param_type* r); |
| 272 static void Log(const param_type& p, std::string* l); | 276 static void Log(const param_type& p, std::string* l); |
| 273 }; | 277 }; |
| 274 | 278 |
| 279 // Traits for webkit_blob::BlobData. |
| 280 template <> |
| 281 struct ParamTraits<scoped_refptr<webkit_blob::BlobData> > { |
| 282 typedef scoped_refptr<webkit_blob::BlobData> param_type; |
| 283 static void Write(Message* m, const param_type& p); |
| 284 static bool Read(const Message* m, void** iter, param_type* r); |
| 285 static void Log(const param_type& p, std::string* l); |
| 286 }; |
| 287 |
| 275 template<> | 288 template<> |
| 276 struct ParamTraits<ThumbnailScore> { | 289 struct ParamTraits<ThumbnailScore> { |
| 277 typedef ThumbnailScore param_type; | 290 typedef ThumbnailScore param_type; |
| 278 static void Write(Message* m, const param_type& p); | 291 static void Write(Message* m, const param_type& p); |
| 279 static bool Read(const Message* m, void** iter, param_type* r); | 292 static bool Read(const Message* m, void** iter, param_type* r); |
| 280 static void Log(const param_type& p, std::string* l); | 293 static void Log(const param_type& p, std::string* l); |
| 281 }; | 294 }; |
| 282 | 295 |
| 283 template <> | 296 template <> |
| 284 struct ParamTraits<Geoposition> { | 297 struct ParamTraits<Geoposition> { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 308 struct ParamTraits<printing::NativeMetafile> { | 321 struct ParamTraits<printing::NativeMetafile> { |
| 309 typedef printing::NativeMetafile param_type; | 322 typedef printing::NativeMetafile param_type; |
| 310 static void Write(Message* m, const param_type& p); | 323 static void Write(Message* m, const param_type& p); |
| 311 static bool Read(const Message* m, void** iter, param_type* r); | 324 static bool Read(const Message* m, void** iter, param_type* r); |
| 312 static void Log(const param_type& p, std::string* l); | 325 static void Log(const param_type& p, std::string* l); |
| 313 }; | 326 }; |
| 314 | 327 |
| 315 } // namespace IPC | 328 } // namespace IPC |
| 316 | 329 |
| 317 #endif // CHROME_COMMON_COMMON_PARAM_TRAITS_H_ | 330 #endif // CHROME_COMMON_COMMON_PARAM_TRAITS_H_ |
| OLD | NEW |