1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
|
/*
* Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef WebCoreArgumentCoders_h
#define WebCoreArgumentCoders_h
#include "ArgumentCoders.h"
namespace WebCore {
class AffineTransform;
class AuthenticationChallenge;
class Color;
class Credential;
class Cursor;
class DatabaseDetails;
class FloatPoint;
class FloatRect;
class FloatSize;
class HTTPHeaderMap;
class IntPoint;
class IntRect;
class IntSize;
class KeyframeValueList;
class KURL;
class Notification;
class ProtectionSpace;
class ResourceError;
class ResourceRequest;
class ResourceResponse;
class UserStyleSheet;
class UserScript;
struct CompositionUnderline;
struct DictationAlternative;
struct DragSession;
struct FileChooserSettings;
struct GrammarDetail;
struct MimeClassInfo;
struct PluginInfo;
struct TextCheckingResult;
struct ViewportAttributes;
struct WindowFeatures;
}
#if PLATFORM(MAC)
namespace WebCore {
struct KeypressCommand;
}
#endif
#if USE(COORDINATED_GRAPHICS)
namespace WebCore {
class FloatPoint3D;
class TransformationMatrix;
struct Length;
#if USE(GRAPHICS_SURFACE)
struct GraphicsSurfaceToken;
#endif
}
#if ENABLE(CSS_FILTERS)
namespace WebCore {
class FilterOperations;
}
#endif
#endif
namespace CoreIPC {
template<> struct ArgumentCoder<WebCore::AffineTransform> {
static void encode(ArgumentEncoder*, const WebCore::AffineTransform&);
static bool decode(ArgumentDecoder*, WebCore::AffineTransform&);
};
template<> struct ArgumentCoder<WebCore::FloatPoint> {
static void encode(ArgumentEncoder*, const WebCore::FloatPoint&);
static bool decode(ArgumentDecoder*, WebCore::FloatPoint&);
};
template<> struct ArgumentCoder<WebCore::FloatRect> {
static void encode(ArgumentEncoder*, const WebCore::FloatRect&);
static bool decode(ArgumentDecoder*, WebCore::FloatRect&);
};
template<> struct ArgumentCoder<WebCore::FloatSize> {
static void encode(ArgumentEncoder*, const WebCore::FloatSize&);
static bool decode(ArgumentDecoder*, WebCore::FloatSize&);
};
template<> struct ArgumentCoder<WebCore::IntPoint> {
static void encode(ArgumentEncoder*, const WebCore::IntPoint&);
static bool decode(ArgumentDecoder*, WebCore::IntPoint&);
};
template<> struct ArgumentCoder<WebCore::IntRect> {
static void encode(ArgumentEncoder*, const WebCore::IntRect&);
static bool decode(ArgumentDecoder*, WebCore::IntRect&);
};
template<> struct ArgumentCoder<WebCore::IntSize> {
static void encode(ArgumentEncoder*, const WebCore::IntSize&);
static bool decode(ArgumentDecoder*, WebCore::IntSize&);
};
template<> struct ArgumentCoder<WebCore::ViewportAttributes> {
static void encode(ArgumentEncoder*, const WebCore::ViewportAttributes&);
static bool decode(ArgumentDecoder*, WebCore::ViewportAttributes&);
};
template<> struct ArgumentCoder<WebCore::MimeClassInfo> {
static void encode(ArgumentEncoder*, const WebCore::MimeClassInfo&);
static bool decode(ArgumentDecoder*, WebCore::MimeClassInfo&);
};
template<> struct ArgumentCoder<WebCore::PluginInfo> {
static void encode(ArgumentEncoder*, const WebCore::PluginInfo&);
static bool decode(ArgumentDecoder*, WebCore::PluginInfo&);
};
template<> struct ArgumentCoder<WebCore::HTTPHeaderMap> {
static void encode(ArgumentEncoder*, const WebCore::HTTPHeaderMap&);
static bool decode(ArgumentDecoder*, WebCore::HTTPHeaderMap&);
};
template<> struct ArgumentCoder<WebCore::AuthenticationChallenge> {
static void encode(ArgumentEncoder*, const WebCore::AuthenticationChallenge&);
static bool decode(ArgumentDecoder*, WebCore::AuthenticationChallenge&);
};
template<> struct ArgumentCoder<WebCore::ProtectionSpace> {
static void encode(ArgumentEncoder*, const WebCore::ProtectionSpace&);
static bool decode(ArgumentDecoder*, WebCore::ProtectionSpace&);
};
template<> struct ArgumentCoder<WebCore::Credential> {
static void encode(ArgumentEncoder*, const WebCore::Credential&);
static bool decode(ArgumentDecoder*, WebCore::Credential&);
};
template<> struct ArgumentCoder<WebCore::Cursor> {
static void encode(ArgumentEncoder*, const WebCore::Cursor&);
static bool decode(ArgumentDecoder*, WebCore::Cursor&);
};
template<> struct ArgumentCoder<WebCore::ResourceRequest> {
#if PLATFORM(MAC) || PLATFORM(WIN)
static const bool kShouldSerializeWebCoreData = false;
#else
static const bool kShouldSerializeWebCoreData = true;
#endif
static void encode(ArgumentEncoder*, const WebCore::ResourceRequest&);
static bool decode(ArgumentDecoder*, WebCore::ResourceRequest&);
static void encodePlatformData(ArgumentEncoder*, const WebCore::ResourceRequest&);
static bool decodePlatformData(ArgumentDecoder*, WebCore::ResourceRequest&);
};
template<> struct ArgumentCoder<WebCore::ResourceResponse> {
#if PLATFORM(MAC) || PLATFORM(WIN)
static const bool kShouldSerializeWebCoreData = false;
#else
static const bool kShouldSerializeWebCoreData = true;
#endif
static void encode(ArgumentEncoder*, const WebCore::ResourceResponse&);
static bool decode(ArgumentDecoder*, WebCore::ResourceResponse&);
static void encodePlatformData(ArgumentEncoder*, const WebCore::ResourceResponse&);
static bool decodePlatformData(ArgumentDecoder*, WebCore::ResourceResponse&);
};
template<> struct ArgumentCoder<WebCore::ResourceError> {
#if PLATFORM(MAC)
static const bool kShouldSerializeWebCoreData = false;
#else
static const bool kShouldSerializeWebCoreData = true;
#endif
static void encode(ArgumentEncoder*, const WebCore::ResourceError&);
static bool decode(ArgumentDecoder*, WebCore::ResourceError&);
static void encodePlatformData(ArgumentEncoder*, const WebCore::ResourceError&);
static bool decodePlatformData(ArgumentDecoder*, WebCore::ResourceError&);
};
template<> struct ArgumentCoder<WebCore::WindowFeatures> {
static void encode(ArgumentEncoder*, const WebCore::WindowFeatures&);
static bool decode(ArgumentDecoder*, WebCore::WindowFeatures&);
};
template<> struct ArgumentCoder<WebCore::Color> {
static void encode(ArgumentEncoder*, const WebCore::Color&);
static bool decode(ArgumentDecoder*, WebCore::Color&);
};
#if PLATFORM(MAC)
template<> struct ArgumentCoder<WebCore::KeypressCommand> {
static void encode(ArgumentEncoder*, const WebCore::KeypressCommand&);
static bool decode(ArgumentDecoder*, WebCore::KeypressCommand&);
};
#endif
template<> struct ArgumentCoder<WebCore::CompositionUnderline> {
static void encode(ArgumentEncoder*, const WebCore::CompositionUnderline&);
static bool decode(ArgumentDecoder*, WebCore::CompositionUnderline&);
};
template<> struct ArgumentCoder<WebCore::DatabaseDetails> {
static void encode(ArgumentEncoder*, const WebCore::DatabaseDetails&);
static bool decode(ArgumentDecoder*, WebCore::DatabaseDetails&);
};
template<> struct ArgumentCoder<WebCore::DictationAlternative> {
static void encode(ArgumentEncoder*, const WebCore::DictationAlternative&);
static bool decode(ArgumentDecoder*, WebCore::DictationAlternative&);
};
template<> struct ArgumentCoder<WebCore::FileChooserSettings> {
static void encode(ArgumentEncoder*, const WebCore::FileChooserSettings&);
static bool decode(ArgumentDecoder*, WebCore::FileChooserSettings&);
};
template<> struct ArgumentCoder<WebCore::GrammarDetail> {
static void encode(ArgumentEncoder*, const WebCore::GrammarDetail&);
static bool decode(ArgumentDecoder*, WebCore::GrammarDetail&);
};
template<> struct ArgumentCoder<WebCore::TextCheckingResult> {
static void encode(ArgumentEncoder*, const WebCore::TextCheckingResult&);
static bool decode(ArgumentDecoder*, WebCore::TextCheckingResult&);
};
template<> struct ArgumentCoder<WebCore::DragSession> {
static void encode(ArgumentEncoder*, const WebCore::DragSession&);
static bool decode(ArgumentDecoder*, WebCore::DragSession&);
};
template<> struct ArgumentCoder<WebCore::KURL> {
static void encode(ArgumentEncoder*, const WebCore::KURL&);
static bool decode(ArgumentDecoder*, WebCore::KURL&);
};
#if USE(COORDINATED_GRAPHICS)
template<> struct ArgumentCoder<WebCore::FloatPoint3D> {
static void encode(ArgumentEncoder*, const WebCore::FloatPoint3D&);
static bool decode(ArgumentDecoder*, WebCore::FloatPoint3D&);
};
template<> struct ArgumentCoder<WebCore::Length> {
static void encode(ArgumentEncoder*, const WebCore::Length&);
static bool decode(ArgumentDecoder*, WebCore::Length&);
};
template<> struct ArgumentCoder<WebCore::TransformationMatrix> {
static void encode(ArgumentEncoder*, const WebCore::TransformationMatrix&);
static bool decode(ArgumentDecoder*, WebCore::TransformationMatrix&);
};
#if ENABLE(CSS_FILTERS)
template<> struct ArgumentCoder<WebCore::FilterOperations> {
static void encode(ArgumentEncoder*, const WebCore::FilterOperations&);
static bool decode(ArgumentDecoder*, WebCore::FilterOperations&);
};
#endif
#if USE(GRAPHICS_SURFACE)
template<> struct ArgumentCoder<WebCore::GraphicsSurfaceToken> {
static void encode(ArgumentEncoder*, const WebCore::GraphicsSurfaceToken&);
static bool decode(ArgumentDecoder*, WebCore::GraphicsSurfaceToken&);
};
#endif
#endif
template<> struct ArgumentCoder<WebCore::UserStyleSheet> {
static void encode(ArgumentEncoder*, const WebCore::UserStyleSheet&);
static bool decode(ArgumentDecoder*, WebCore::UserStyleSheet&);
};
template<> struct ArgumentCoder<WebCore::UserScript> {
static void encode(ArgumentEncoder*, const WebCore::UserScript&);
static bool decode(ArgumentDecoder*, WebCore::UserScript&);
};
} // namespace CoreIPC
#endif // WebCoreArgumentCoders_h
|