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 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 namespace content { | 29 namespace content { |
30 struct ResourceDevToolsInfo; | 30 struct ResourceDevToolsInfo; |
31 } | 31 } |
32 | 32 |
33 namespace IPC { | 33 namespace IPC { |
34 | 34 |
35 template <> | 35 template <> |
36 struct ParamTraits<scoped_refptr<net::HttpResponseHeaders> > { | 36 struct ParamTraits<scoped_refptr<net::HttpResponseHeaders> > { |
37 typedef scoped_refptr<net::HttpResponseHeaders> param_type; | 37 typedef scoped_refptr<net::HttpResponseHeaders> param_type; |
38 static void Write(Message* m, const param_type& p); | 38 static void Write(Message* m, const param_type& p); |
39 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 39 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); |
40 static void Log(const param_type& p, std::string* l); | 40 static void Log(const param_type& p, std::string* l); |
41 }; | 41 }; |
42 | 42 |
43 template <> | 43 template <> |
44 struct CONTENT_EXPORT ParamTraits<storage::DataElement> { | 44 struct CONTENT_EXPORT ParamTraits<storage::DataElement> { |
45 typedef storage::DataElement param_type; | 45 typedef storage::DataElement param_type; |
46 static void Write(Message* m, const param_type& p); | 46 static void Write(Message* m, const param_type& p); |
47 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 47 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); |
48 static void Log(const param_type& p, std::string* l); | 48 static void Log(const param_type& p, std::string* l); |
49 }; | 49 }; |
50 | 50 |
51 template <> | 51 template <> |
52 struct ParamTraits<scoped_refptr<content::ResourceDevToolsInfo> > { | 52 struct ParamTraits<scoped_refptr<content::ResourceDevToolsInfo> > { |
53 typedef scoped_refptr<content::ResourceDevToolsInfo> param_type; | 53 typedef scoped_refptr<content::ResourceDevToolsInfo> param_type; |
54 static void Write(Message* m, const param_type& p); | 54 static void Write(Message* m, const param_type& p); |
55 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 55 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); |
56 static void Log(const param_type& p, std::string* l); | 56 static void Log(const param_type& p, std::string* l); |
57 }; | 57 }; |
58 | 58 |
59 template <> | 59 template <> |
60 struct ParamTraits<net::LoadTimingInfo> { | 60 struct ParamTraits<net::LoadTimingInfo> { |
61 typedef net::LoadTimingInfo param_type; | 61 typedef net::LoadTimingInfo param_type; |
62 static void Write(Message* m, const param_type& p); | 62 static void Write(Message* m, const param_type& p); |
63 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 63 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); |
64 static void Log(const param_type& p, std::string* l); | 64 static void Log(const param_type& p, std::string* l); |
65 }; | 65 }; |
66 | 66 |
67 template <> | 67 template <> |
68 struct ParamTraits<scoped_refptr<content::ResourceRequestBody> > { | 68 struct ParamTraits<scoped_refptr<content::ResourceRequestBody> > { |
69 typedef scoped_refptr<content::ResourceRequestBody> param_type; | 69 typedef scoped_refptr<content::ResourceRequestBody> param_type; |
70 static void Write(Message* m, const param_type& p); | 70 static void Write(Message* m, const param_type& p); |
71 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 71 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); |
72 static void Log(const param_type& p, std::string* l); | 72 static void Log(const param_type& p, std::string* l); |
73 }; | 73 }; |
74 | 74 |
75 } // namespace IPC | 75 } // namespace IPC |
76 | 76 |
77 #endif // CONTENT_COMMON_RESOURCE_MESSAGES_H_ | 77 #endif // CONTENT_COMMON_RESOURCE_MESSAGES_H_ |
78 | 78 |
79 | 79 |
80 #define IPC_MESSAGE_START ResourceMsgStart | 80 #define IPC_MESSAGE_START ResourceMsgStart |
81 #undef IPC_MESSAGE_EXPORT | 81 #undef IPC_MESSAGE_EXPORT |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 | 387 |
388 // Sent when the renderer process deletes a resource loader. | 388 // Sent when the renderer process deletes a resource loader. |
389 IPC_MESSAGE_CONTROL1(ResourceHostMsg_ReleaseDownloadedFile, | 389 IPC_MESSAGE_CONTROL1(ResourceHostMsg_ReleaseDownloadedFile, |
390 int /* request_id */) | 390 int /* request_id */) |
391 | 391 |
392 // Sent by the renderer when a resource request changes priority. | 392 // Sent by the renderer when a resource request changes priority. |
393 IPC_MESSAGE_CONTROL3(ResourceHostMsg_DidChangePriority, | 393 IPC_MESSAGE_CONTROL3(ResourceHostMsg_DidChangePriority, |
394 int /* request_id */, | 394 int /* request_id */, |
395 net::RequestPriority, | 395 net::RequestPriority, |
396 int /* intra_priority_value */) | 396 int /* intra_priority_value */) |
OLD | NEW |