Chromium Code Reviews

Side by Side Diff: chrome/common/common_param_traits.h

Issue 4979003: Implement web app definition parsing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nacl64 build Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
OLDNEW
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 22 matching lines...)
33 #include "webkit/glue/window_open_disposition.h" 33 #include "webkit/glue/window_open_disposition.h"
34 34
35 // Forward declarations. 35 // Forward declarations.
36 struct Geoposition; 36 struct Geoposition;
37 class GURL; 37 class GURL;
38 class SkBitmap; 38 class SkBitmap;
39 class DictionaryValue; 39 class DictionaryValue;
40 class ListValue; 40 class ListValue;
41 struct ThumbnailScore; 41 struct ThumbnailScore;
42 class URLRequestStatus; 42 class URLRequestStatus;
43 struct WebApplicationInfo;
43 class WebCursor; 44 class WebCursor;
44 45
45 namespace gfx { 46 namespace gfx {
46 class Point; 47 class Point;
47 class Rect; 48 class Rect;
48 class Size; 49 class Size;
49 } // namespace gfx 50 } // namespace gfx
50 51
51 namespace net { 52 namespace net {
52 class UploadData; 53 class UploadData;
53 } 54 }
54 55
55 namespace printing { 56 namespace printing {
56 struct PageRange; 57 struct PageRange;
57 } // namespace printing 58 } // namespace printing
58 59
59 namespace webkit_glue { 60 namespace webkit_glue {
60 struct PasswordForm; 61 struct PasswordForm;
61 struct WebApplicationInfo;
62 } // namespace webkit_glue 62 } // namespace webkit_glue
63 63
64 namespace IPC { 64 namespace IPC {
65 65
66 template <> 66 template <>
67 struct ParamTraits<SkBitmap> { 67 struct ParamTraits<SkBitmap> {
68 typedef SkBitmap param_type; 68 typedef SkBitmap param_type;
69 static void Write(Message* m, const param_type& p); 69 static void Write(Message* m, const param_type& p);
70 70
71 // Note: This function expects parameter |r| to be of type &SkBitmap since 71 // Note: This function expects parameter |r| to be of type &SkBitmap since
(...skipping 152 matching lines...)
224 static bool Read(const Message* m, void** iter, param_type* r) { 224 static bool Read(const Message* m, void** iter, param_type* r) {
225 return r->Deserialize(m, iter); 225 return r->Deserialize(m, iter);
226 } 226 }
227 static void Log(const param_type& p, std::string* l) { 227 static void Log(const param_type& p, std::string* l) {
228 l->append("<WebCursor>"); 228 l->append("<WebCursor>");
229 } 229 }
230 }; 230 };
231 231
232 232
233 template <> 233 template <>
234 struct ParamTraits<webkit_glue::WebApplicationInfo> { 234 struct ParamTraits<WebApplicationInfo> {
235 typedef webkit_glue::WebApplicationInfo param_type; 235 typedef WebApplicationInfo param_type;
236 static void Write(Message* m, const param_type& p); 236 static void Write(Message* m, const param_type& p);
237 static bool Read(const Message* m, void** iter, param_type* r); 237 static bool Read(const Message* m, void** iter, param_type* r);
238 static void Log(const param_type& p, std::string* l); 238 static void Log(const param_type& p, std::string* l);
239 }; 239 };
240 240
241 241
242 #if defined(OS_WIN) 242 #if defined(OS_WIN)
243 template<> 243 template<>
244 struct ParamTraits<TransportDIB::Id> { 244 struct ParamTraits<TransportDIB::Id> {
245 typedef TransportDIB::Id param_type; 245 typedef TransportDIB::Id param_type;
(...skipping 77 matching lines...)
323 struct ParamTraits<base::PlatformFileInfo> { 323 struct ParamTraits<base::PlatformFileInfo> {
324 typedef base::PlatformFileInfo param_type; 324 typedef base::PlatformFileInfo param_type;
325 static void Write(Message* m, const param_type& p); 325 static void Write(Message* m, const param_type& p);
326 static bool Read(const Message* m, void** iter, param_type* r); 326 static bool Read(const Message* m, void** iter, param_type* r);
327 static void Log(const param_type& p, std::string* l); 327 static void Log(const param_type& p, std::string* l);
328 }; 328 };
329 329
330 } // namespace IPC 330 } // namespace IPC
331 331
332 #endif // CHROME_COMMON_COMMON_PARAM_TRAITS_H_ 332 #endif // CHROME_COMMON_COMMON_PARAM_TRAITS_H_
OLDNEW

Powered by Google App Engine