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" |
11 #include "base/process/process.h" | 11 #include "base/process/process.h" |
12 #include "content/common/content_param_traits_macros.h" | 12 #include "content/common/content_param_traits_macros.h" |
13 #include "content/common/resource_request_body.h" | 13 #include "content/common/resource_request_body.h" |
14 #include "content/public/common/common_param_traits.h" | 14 #include "content/public/common/common_param_traits.h" |
15 #include "content/public/common/resource_response.h" | 15 #include "content/public/common/resource_response.h" |
16 #include "ipc/ipc_message_macros.h" | 16 #include "ipc/ipc_message_macros.h" |
17 #include "net/base/request_priority.h" | 17 #include "net/base/request_priority.h" |
18 #include "net/http/http_response_info.h" | 18 #include "net/http/http_response_info.h" |
19 | 19 |
20 #ifndef CONTENT_COMMON_RESOURCE_MESSAGES_H_ | 20 #ifndef CONTENT_COMMON_RESOURCE_MESSAGES_H_ |
21 #define CONTENT_COMMON_RESOURCE_MESSAGES_H_ | 21 #define CONTENT_COMMON_RESOURCE_MESSAGES_H_ |
22 | 22 |
23 namespace net { | 23 namespace net { |
24 struct LoadTimingInfo; | 24 struct LoadTimingInfo; |
25 } | 25 } |
26 | 26 |
27 namespace webkit_glue { | 27 namespace content { |
28 struct ResourceDevToolsInfo; | 28 struct ResourceDevToolsInfo; |
29 } | 29 } |
30 | 30 |
31 namespace IPC { | 31 namespace IPC { |
32 | 32 |
33 template <> | 33 template <> |
34 struct ParamTraits<scoped_refptr<net::HttpResponseHeaders> > { | 34 struct ParamTraits<scoped_refptr<net::HttpResponseHeaders> > { |
35 typedef scoped_refptr<net::HttpResponseHeaders> param_type; | 35 typedef scoped_refptr<net::HttpResponseHeaders> param_type; |
36 static void Write(Message* m, const param_type& p); | 36 static void Write(Message* m, const param_type& p); |
37 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 37 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
38 static void Log(const param_type& p, std::string* l); | 38 static void Log(const param_type& p, std::string* l); |
39 }; | 39 }; |
40 | 40 |
41 template <> | 41 template <> |
42 struct CONTENT_EXPORT ParamTraits<webkit_common::DataElement> { | 42 struct CONTENT_EXPORT ParamTraits<webkit_common::DataElement> { |
43 typedef webkit_common::DataElement param_type; | 43 typedef webkit_common::DataElement param_type; |
44 static void Write(Message* m, const param_type& p); | 44 static void Write(Message* m, const param_type& p); |
45 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 45 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
46 static void Log(const param_type& p, std::string* l); | 46 static void Log(const param_type& p, std::string* l); |
47 }; | 47 }; |
48 | 48 |
49 template <> | 49 template <> |
50 struct ParamTraits<scoped_refptr<webkit_glue::ResourceDevToolsInfo> > { | 50 struct ParamTraits<scoped_refptr<content::ResourceDevToolsInfo> > { |
51 typedef scoped_refptr<webkit_glue::ResourceDevToolsInfo> param_type; | 51 typedef scoped_refptr<content::ResourceDevToolsInfo> param_type; |
52 static void Write(Message* m, const param_type& p); | 52 static void Write(Message* m, const param_type& p); |
53 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 53 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
54 static void Log(const param_type& p, std::string* l); | 54 static void Log(const param_type& p, std::string* l); |
55 }; | 55 }; |
56 | 56 |
57 template <> | 57 template <> |
58 struct ParamTraits<net::LoadTimingInfo> { | 58 struct ParamTraits<net::LoadTimingInfo> { |
59 typedef net::LoadTimingInfo param_type; | 59 typedef net::LoadTimingInfo param_type; |
60 static void Write(Message* m, const param_type& p); | 60 static void Write(Message* m, const param_type& p); |
61 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 61 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 | 339 |
340 // Sent when the renderer process deletes a resource loader. | 340 // Sent when the renderer process deletes a resource loader. |
341 IPC_MESSAGE_CONTROL1(ResourceHostMsg_ReleaseDownloadedFile, | 341 IPC_MESSAGE_CONTROL1(ResourceHostMsg_ReleaseDownloadedFile, |
342 int /* request_id */) | 342 int /* request_id */) |
343 | 343 |
344 // Sent by the renderer when a resource request changes priority. | 344 // Sent by the renderer when a resource request changes priority. |
345 IPC_MESSAGE_CONTROL3(ResourceHostMsg_DidChangePriority, | 345 IPC_MESSAGE_CONTROL3(ResourceHostMsg_DidChangePriority, |
346 int /* request_id */, | 346 int /* request_id */, |
347 net::RequestPriority, | 347 net::RequestPriority, |
348 int /* intra_priority_value */) | 348 int /* intra_priority_value */) |
OLD | NEW |