OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 // IPC messages for resource loading. | 5 // IPC messages for resource loading. |
6 // | 6 // |
7 // NOTE: All messages must send an |int request_id| as their first parameter. | 7 // NOTE: All messages must send an |int request_id| as their first parameter. |
8 | 8 |
9 // Multiply-included message file, hence no include guard. | 9 // Multiply-included message file, hence no include guard. |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 namespace content { | 33 namespace content { |
34 struct ResourceDevToolsInfo; | 34 struct ResourceDevToolsInfo; |
35 } | 35 } |
36 | 36 |
37 namespace IPC { | 37 namespace IPC { |
38 | 38 |
39 template <> | 39 template <> |
40 struct ParamTraits<scoped_refptr<net::HttpResponseHeaders> > { | 40 struct ParamTraits<scoped_refptr<net::HttpResponseHeaders> > { |
41 typedef scoped_refptr<net::HttpResponseHeaders> param_type; | 41 typedef scoped_refptr<net::HttpResponseHeaders> param_type; |
| 42 static void GetSize(base::PickleSizer* s, const param_type& p); |
42 static void Write(base::Pickle* m, const param_type& p); | 43 static void Write(base::Pickle* m, const param_type& p); |
43 static bool Read(const base::Pickle* m, | 44 static bool Read(const base::Pickle* m, |
44 base::PickleIterator* iter, | 45 base::PickleIterator* iter, |
45 param_type* r); | 46 param_type* r); |
46 static void Log(const param_type& p, std::string* l); | 47 static void Log(const param_type& p, std::string* l); |
47 }; | 48 }; |
48 | 49 |
49 template <> | 50 template <> |
50 struct CONTENT_EXPORT ParamTraits<storage::DataElement> { | 51 struct CONTENT_EXPORT ParamTraits<storage::DataElement> { |
51 typedef storage::DataElement param_type; | 52 typedef storage::DataElement param_type; |
| 53 static void GetSize(base::PickleSizer* s, const param_type& p); |
52 static void Write(base::Pickle* m, const param_type& p); | 54 static void Write(base::Pickle* m, const param_type& p); |
53 static bool Read(const base::Pickle* m, | 55 static bool Read(const base::Pickle* m, |
54 base::PickleIterator* iter, | 56 base::PickleIterator* iter, |
55 param_type* r); | 57 param_type* r); |
56 static void Log(const param_type& p, std::string* l); | 58 static void Log(const param_type& p, std::string* l); |
57 }; | 59 }; |
58 | 60 |
59 template <> | 61 template <> |
60 struct ParamTraits<scoped_refptr<content::ResourceDevToolsInfo> > { | 62 struct ParamTraits<scoped_refptr<content::ResourceDevToolsInfo> > { |
61 typedef scoped_refptr<content::ResourceDevToolsInfo> param_type; | 63 typedef scoped_refptr<content::ResourceDevToolsInfo> param_type; |
| 64 static void GetSize(base::PickleSizer* s, const param_type& p); |
62 static void Write(base::Pickle* m, const param_type& p); | 65 static void Write(base::Pickle* m, const param_type& p); |
63 static bool Read(const base::Pickle* m, | 66 static bool Read(const base::Pickle* m, |
64 base::PickleIterator* iter, | 67 base::PickleIterator* iter, |
65 param_type* r); | 68 param_type* r); |
66 static void Log(const param_type& p, std::string* l); | 69 static void Log(const param_type& p, std::string* l); |
67 }; | 70 }; |
68 | 71 |
69 template <> | 72 template <> |
70 struct ParamTraits<net::LoadTimingInfo> { | 73 struct ParamTraits<net::LoadTimingInfo> { |
71 typedef net::LoadTimingInfo param_type; | 74 typedef net::LoadTimingInfo param_type; |
| 75 static void GetSize(base::PickleSizer* s, const param_type& p); |
72 static void Write(base::Pickle* m, const param_type& p); | 76 static void Write(base::Pickle* m, const param_type& p); |
73 static bool Read(const base::Pickle* m, | 77 static bool Read(const base::Pickle* m, |
74 base::PickleIterator* iter, | 78 base::PickleIterator* iter, |
75 param_type* r); | 79 param_type* r); |
76 static void Log(const param_type& p, std::string* l); | 80 static void Log(const param_type& p, std::string* l); |
77 }; | 81 }; |
78 | 82 |
79 template <> | 83 template <> |
80 struct ParamTraits<scoped_refptr<content::ResourceRequestBody> > { | 84 struct ParamTraits<scoped_refptr<content::ResourceRequestBody> > { |
81 typedef scoped_refptr<content::ResourceRequestBody> param_type; | 85 typedef scoped_refptr<content::ResourceRequestBody> param_type; |
| 86 static void GetSize(base::PickleSizer* s, const param_type& p); |
82 static void Write(base::Pickle* m, const param_type& p); | 87 static void Write(base::Pickle* m, const param_type& p); |
83 static bool Read(const base::Pickle* m, | 88 static bool Read(const base::Pickle* m, |
84 base::PickleIterator* iter, | 89 base::PickleIterator* iter, |
85 param_type* r); | 90 param_type* r); |
86 static void Log(const param_type& p, std::string* l); | 91 static void Log(const param_type& p, std::string* l); |
87 }; | 92 }; |
88 | 93 |
89 } // namespace IPC | 94 } // namespace IPC |
90 | 95 |
91 #endif // CONTENT_COMMON_RESOURCE_MESSAGES_H_ | 96 #endif // CONTENT_COMMON_RESOURCE_MESSAGES_H_ |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 | 446 |
442 // Sent when the renderer process deletes a resource loader. | 447 // Sent when the renderer process deletes a resource loader. |
443 IPC_MESSAGE_CONTROL1(ResourceHostMsg_ReleaseDownloadedFile, | 448 IPC_MESSAGE_CONTROL1(ResourceHostMsg_ReleaseDownloadedFile, |
444 int /* request_id */) | 449 int /* request_id */) |
445 | 450 |
446 // Sent by the renderer when a resource request changes priority. | 451 // Sent by the renderer when a resource request changes priority. |
447 IPC_MESSAGE_CONTROL3(ResourceHostMsg_DidChangePriority, | 452 IPC_MESSAGE_CONTROL3(ResourceHostMsg_DidChangePriority, |
448 int /* request_id */, | 453 int /* request_id */, |
449 net::RequestPriority, | 454 net::RequestPriority, |
450 int /* intra_priority_value */) | 455 int /* intra_priority_value */) |
OLD | NEW |