Chromium Code Reviews| 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 WebKit types so that they can be serialized over IPC. IPC::ParamTraits<> | 6 // of WebKit 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 used by the content code, and which need | 9 // specializations for types that are used by the content code, and which need |
| 10 // manual serialization code. This is usually because they're not structs with | 10 // manual serialization code. This is usually because they're not structs with |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 225 LogParam(p->size, l); | 225 LogParam(p->size, l); |
| 226 l->append(", "); | 226 l->append(", "); |
| 227 LogParam(p->type, l); | 227 LogParam(p->type, l); |
| 228 l->append(", "); | 228 l->append(", "); |
| 229 LogParam(p->timeStampSeconds, l); | 229 LogParam(p->timeStampSeconds, l); |
| 230 l->append(")"); | 230 l->append(")"); |
| 231 } | 231 } |
| 232 }; | 232 }; |
| 233 | 233 |
| 234 template <> | 234 template <> |
| 235 struct SimilarTypeTraits<WebKit::WebString> { | |
|
Hironori Bono
2012/02/10 08:12:52
Sorry, my previous comment was wrong. This 'Simila
| |
| 236 typedef string16 Type; | |
| 237 }; | |
| 238 | |
| 239 template <> | |
| 235 struct SimilarTypeTraits<WebKit::WebTextDirection> { | 240 struct SimilarTypeTraits<WebKit::WebTextDirection> { |
| 236 typedef int Type; | 241 typedef int Type; |
| 237 }; | 242 }; |
| 238 | 243 |
| 239 template <> | 244 template <> |
| 240 struct SimilarTypeTraits<WindowOpenDisposition> { | 245 struct SimilarTypeTraits<WindowOpenDisposition> { |
| 241 typedef int Type; | 246 typedef int Type; |
| 242 }; | 247 }; |
| 243 | 248 |
| 244 template <> | 249 template <> |
| 245 struct CONTENT_EXPORT ParamTraits<webkit::forms::PasswordForm> { | 250 struct CONTENT_EXPORT ParamTraits<webkit::forms::PasswordForm> { |
| 246 typedef webkit::forms::PasswordForm param_type; | 251 typedef webkit::forms::PasswordForm param_type; |
| 247 static void Write(Message* m, const param_type& p); | 252 static void Write(Message* m, const param_type& p); |
| 248 static bool Read(const Message* m, void** iter, param_type* p); | 253 static bool Read(const Message* m, void** iter, param_type* p); |
| 249 static void Log(const param_type& p, std::string* l); | 254 static void Log(const param_type& p, std::string* l); |
| 250 }; | 255 }; |
| 251 | 256 |
| 252 } // namespace IPC | 257 } // namespace IPC |
| 253 | 258 |
| 254 #endif // CONTENT_PUBLIC_COMMON_WEBKIT_PARAM_TRAITS_H_ | 259 #endif // CONTENT_PUBLIC_COMMON_WEBKIT_PARAM_TRAITS_H_ |
| OLD | NEW |