Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

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

Issue 6621025: Move socket stream messages to content, in preparation for moving its dispatc... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/chrome_constants.cc ('k') | chrome/common/common_param_traits.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 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 17 matching lines...) Expand all
28 // chrome/common/ for a mini-library that doesn't depend on webkit. 28 // chrome/common/ for a mini-library that doesn't depend on webkit.
29 // 29 //
30 // TODO(erg): The following two headers are historical and only work because 30 // TODO(erg): The following two headers are historical and only work because
31 // their definitions are inlined, which also needs to be fixed. 31 // their definitions are inlined, which also needs to be fixed.
32 #include "ui/gfx/native_widget_types.h" 32 #include "ui/gfx/native_widget_types.h"
33 #include "webkit/glue/webcursor.h" 33 #include "webkit/glue/webcursor.h"
34 #include "webkit/glue/window_open_disposition.h" 34 #include "webkit/glue/window_open_disposition.h"
35 35
36 // Forward declarations. 36 // Forward declarations.
37 struct Geoposition; 37 struct Geoposition;
38 class GURL;
39 class SkBitmap; 38 class SkBitmap;
40 class DictionaryValue; 39 class DictionaryValue;
41 class ListValue; 40 class ListValue;
42 struct ThumbnailScore; 41 struct ThumbnailScore;
43 struct WebApplicationInfo; 42 struct WebApplicationInfo;
44 class WebCursor; 43 class WebCursor;
45 44
46 namespace gfx { 45 namespace gfx {
47 class Point; 46 class Point;
48 class Rect; 47 class Rect;
(...skipping 22 matching lines...) Expand all
71 typedef SkBitmap param_type; 70 typedef SkBitmap param_type;
72 static void Write(Message* m, const param_type& p); 71 static void Write(Message* m, const param_type& p);
73 72
74 // Note: This function expects parameter |r| to be of type &SkBitmap since 73 // Note: This function expects parameter |r| to be of type &SkBitmap since
75 // r->SetConfig() and r->SetPixels() are called. 74 // r->SetConfig() and r->SetPixels() are called.
76 static bool Read(const Message* m, void** iter, param_type* r); 75 static bool Read(const Message* m, void** iter, param_type* r);
77 76
78 static void Log(const param_type& p, std::string* l); 77 static void Log(const param_type& p, std::string* l);
79 }; 78 };
80 79
81
82 template <>
83 struct ParamTraits<GURL> {
84 typedef GURL param_type;
85 static void Write(Message* m, const param_type& p);
86 static bool Read(const Message* m, void** iter, param_type* p);
87 static void Log(const param_type& p, std::string* l);
88 };
89
90
91 template <> 80 template <>
92 struct ParamTraits<gfx::Point> { 81 struct ParamTraits<gfx::Point> {
93 typedef gfx::Point param_type; 82 typedef gfx::Point param_type;
94 static void Write(Message* m, const param_type& p); 83 static void Write(Message* m, const param_type& p);
95 static bool Read(const Message* m, void** iter, param_type* r); 84 static bool Read(const Message* m, void** iter, param_type* r);
96 static void Log(const param_type& p, std::string* l); 85 static void Log(const param_type& p, std::string* l);
97 }; 86 };
98 87
99 template <> 88 template <>
100 struct ParamTraits<gfx::Rect> { 89 struct ParamTraits<gfx::Rect> {
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 struct ParamTraits<printing::PrinterCapsAndDefaults> { 338 struct ParamTraits<printing::PrinterCapsAndDefaults> {
350 typedef printing::PrinterCapsAndDefaults param_type; 339 typedef printing::PrinterCapsAndDefaults param_type;
351 static void Write(Message* m, const param_type& p); 340 static void Write(Message* m, const param_type& p);
352 static bool Read(const Message* m, void** iter, param_type* r); 341 static bool Read(const Message* m, void** iter, param_type* r);
353 static void Log(const param_type& p, std::string* l); 342 static void Log(const param_type& p, std::string* l);
354 }; 343 };
355 344
356 } // namespace IPC 345 } // namespace IPC
357 346
358 #endif // CHROME_COMMON_COMMON_PARAM_TRAITS_H_ 347 #endif // CHROME_COMMON_COMMON_PARAM_TRAITS_H_
OLDNEW
« no previous file with comments | « chrome/common/chrome_constants.cc ('k') | chrome/common/common_param_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698