OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 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<> |
| 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 |
| 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 |
| 11 // public members.. |
| 12 |
| 13 #ifndef CONTENT_COMMON_COMMON_PARAM_TRAITS_H_ |
| 14 #define CONTENT_COMMON_COMMON_PARAM_TRAITS_H_ |
| 15 #pragma once |
| 16 |
| 17 #include "googleurl/src/gurl.h" |
| 18 #include "ipc/ipc_message_utils.h" |
| 19 // !!! WARNING: DO NOT ADD NEW WEBKIT DEPENDENCIES !!! |
| 20 // |
| 21 // That means don't add #includes to any file in 'webkit/' or |
| 22 // 'third_party/WebKit/'. Chrome Frame and NACL build parts of base/ and |
| 23 // content/common/ for a mini-library that doesn't depend on webkit. |
| 24 |
| 25 // Forward declarations. |
| 26 class GURL; |
| 27 |
| 28 namespace IPC { |
| 29 |
| 30 template <> |
| 31 struct ParamTraits<GURL> { |
| 32 typedef GURL param_type; |
| 33 static void Write(Message* m, const param_type& p); |
| 34 static bool Read(const Message* m, void** iter, param_type* p); |
| 35 static void Log(const param_type& p, std::string* l); |
| 36 }; |
| 37 |
| 38 } // namespace IPC |
| 39 |
| 40 #endif // CONTENT_COMMON_COMMON_PARAM_TRAITS_H_ |
OLD | NEW |