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