| 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 16 matching lines...) Expand all Loading... |
| 27 #include "webkit/glue/webcursor.h" | 27 #include "webkit/glue/webcursor.h" |
| 28 #include "webkit/glue/window_open_disposition.h" | 28 #include "webkit/glue/window_open_disposition.h" |
| 29 | 29 |
| 30 // Forward declarations. | 30 // Forward declarations. |
| 31 class GURL; | 31 class GURL; |
| 32 class SkBitmap; | 32 class SkBitmap; |
| 33 class DictionaryValue; | 33 class DictionaryValue; |
| 34 class ListValue; | 34 class ListValue; |
| 35 struct ThumbnailScore; | 35 struct ThumbnailScore; |
| 36 class URLRequestStatus; | 36 class URLRequestStatus; |
| 37 class WebCursor; |
| 37 | 38 |
| 38 namespace gfx { | 39 namespace gfx { |
| 39 class Point; | 40 class Point; |
| 40 class Rect; | 41 class Rect; |
| 41 class Size; | 42 class Size; |
| 42 } // namespace gfx | 43 } // namespace gfx |
| 43 | 44 |
| 44 namespace printing { | 45 namespace printing { |
| 45 struct PageRange; | 46 struct PageRange; |
| 46 } // namespace printing | 47 } // namespace printing |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 } | 204 } |
| 204 }; | 205 }; |
| 205 | 206 |
| 206 | 207 |
| 207 template <> | 208 template <> |
| 208 struct ParamTraits<WebCursor> { | 209 struct ParamTraits<WebCursor> { |
| 209 typedef WebCursor param_type; | 210 typedef WebCursor param_type; |
| 210 static void Write(Message* m, const param_type& p) { | 211 static void Write(Message* m, const param_type& p) { |
| 211 p.Serialize(m); | 212 p.Serialize(m); |
| 212 } | 213 } |
| 213 static bool Read(const Message* m, void** iter, param_type* r) { | 214 static bool Read(const Message* m, void** iter, param_type* r) { |
| 214 return r->Deserialize(m, iter); | 215 return r->Deserialize(m, iter); |
| 215 } | 216 } |
| 216 static void Log(const param_type& p, std::wstring* l) { | 217 static void Log(const param_type& p, std::wstring* l) { |
| 217 l->append(L"<WebCursor>"); | 218 l->append(L"<WebCursor>"); |
| 218 } | 219 } |
| 219 }; | 220 }; |
| 220 | 221 |
| 221 | 222 |
| 222 template <> | 223 template <> |
| 223 struct ParamTraits<webkit_glue::WebApplicationInfo> { | 224 struct ParamTraits<webkit_glue::WebApplicationInfo> { |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 static void Write(Message* m, const param_type& p); | 421 static void Write(Message* m, const param_type& p); |
| 421 | 422 |
| 422 static bool Read(const Message* m, void** iter, param_type* r); | 423 static bool Read(const Message* m, void** iter, param_type* r); |
| 423 | 424 |
| 424 static void Log(const param_type& p, std::wstring* l); | 425 static void Log(const param_type& p, std::wstring* l); |
| 425 }; | 426 }; |
| 426 | 427 |
| 427 } // namespace IPC | 428 } // namespace IPC |
| 428 | 429 |
| 429 #endif // CHROME_COMMON_COMMON_PARAM_TRAITS_H_ | 430 #endif // CHROME_COMMON_COMMON_PARAM_TRAITS_H_ |
| OLD | NEW |