1 // Copyright (c) 2012 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.
5 #ifndef CONTENT_COMMON_INDEXED_DB_INDEXED_DB_PARAM_TRAITS_H_
6 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_PARAM_TRAITS_H_
8 #include "ipc/ipc_message.h"
9 #include "ipc/ipc_param_traits.h"
13 class IndexedDBKeyPath
;
14 class IndexedDBKeyRange
;
15 class SerializedScriptValue
;
20 // These datatypes are used by utility_messages.h and render_messages.h.
21 // Unfortunately we can't move it to common: MSVC linker complains about
22 // WebKit datatypes that are not linked on npchrome_frame (even though it's
23 // never actually used by that target).
26 struct ParamTraits
<content::SerializedScriptValue
> {
27 typedef content::SerializedScriptValue param_type
;
28 static void Write(Message
* m
, const param_type
& p
);
29 static bool Read(const Message
* m
, PickleIterator
* iter
, param_type
* r
);
30 static void Log(const param_type
& p
, std::string
* l
);
34 struct ParamTraits
<content::IndexedDBKey
> {
35 typedef content::IndexedDBKey param_type
;
36 static void Write(Message
* m
, const param_type
& p
);
37 static bool Read(const Message
* m
, PickleIterator
* iter
, param_type
* r
);
38 static void Log(const param_type
& p
, std::string
* l
);
42 struct ParamTraits
<content::IndexedDBKeyRange
> {
43 typedef content::IndexedDBKeyRange param_type
;
44 static void Write(Message
* m
, const param_type
& p
);
45 static bool Read(const Message
* m
, PickleIterator
* iter
, param_type
* r
);
46 static void Log(const param_type
& p
, std::string
* l
);
50 struct ParamTraits
<content::IndexedDBKeyPath
> {
51 typedef content::IndexedDBKeyPath param_type
;
52 static void Write(Message
* m
, const param_type
& p
);
53 static bool Read(const Message
* m
, PickleIterator
* iter
, param_type
* r
);
54 static void Log(const param_type
& p
, std::string
* l
);
59 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_PARAM_TRAITS_H_