OLD | NEW |
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 used by the content code, and which need | 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 | 10 // manual serialization code. This is usually because they're not structs with |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "net/base/ip_endpoint.h" | 23 #include "net/base/ip_endpoint.h" |
24 #include "net/url_request/url_request_status.h" | 24 #include "net/url_request/url_request_status.h" |
25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" | 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" |
27 #include "ui/gfx/native_widget_types.h" | 27 #include "ui/gfx/native_widget_types.h" |
28 #include "webkit/blob/blob_data.h" | 28 #include "webkit/blob/blob_data.h" |
29 #include "webkit/glue/npruntime_util.h" | 29 #include "webkit/glue/npruntime_util.h" |
30 #include "webkit/glue/resource_type.h" | 30 #include "webkit/glue/resource_type.h" |
31 #include "webkit/glue/webcursor.h" | 31 #include "webkit/glue/webcursor.h" |
32 | 32 |
| 33 class SkBitmap; |
| 34 |
33 namespace gfx { | 35 namespace gfx { |
34 class Point; | 36 class Point; |
35 class Rect; | 37 class Rect; |
36 class Size; | 38 class Size; |
37 } // namespace gfx | 39 } // namespace gfx |
38 | 40 |
39 namespace net { | 41 namespace net { |
40 class HttpResponseHeaders; | 42 class HttpResponseHeaders; |
41 class HostPortPair; | 43 class HostPortPair; |
42 class UploadData; | 44 class UploadData; |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 l->append(")"); | 379 l->append(")"); |
378 } | 380 } |
379 }; | 381 }; |
380 #endif | 382 #endif |
381 | 383 |
382 template <> | 384 template <> |
383 struct SimilarTypeTraits<WebKit::WebTextDirection> { | 385 struct SimilarTypeTraits<WebKit::WebTextDirection> { |
384 typedef int Type; | 386 typedef int Type; |
385 }; | 387 }; |
386 | 388 |
| 389 template <> |
| 390 struct ParamTraits<SkBitmap> { |
| 391 typedef SkBitmap param_type; |
| 392 static void Write(Message* m, const param_type& p); |
| 393 |
| 394 // Note: This function expects parameter |r| to be of type &SkBitmap since |
| 395 // r->SetConfig() and r->SetPixels() are called. |
| 396 static bool Read(const Message* m, void** iter, param_type* r); |
| 397 |
| 398 static void Log(const param_type& p, std::string* l); |
| 399 }; |
| 400 |
| 401 |
387 } // namespace IPC | 402 } // namespace IPC |
388 | 403 |
389 #endif // CONTENT_COMMON_COMMON_PARAM_TRAITS_H_ | 404 #endif // CONTENT_COMMON_COMMON_PARAM_TRAITS_H_ |
OLD | NEW |