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 // Multiply-included message file, hence no include guard. | 5 // Multiply-included message file, hence no include guard. |
6 | 6 |
7 #include "ipc/ipc_message_macros.h" | 7 #include "ipc/ipc_message_macros.h" |
8 #include "webkit/common/appcache/appcache_interfaces.h" | 8 #include "webkit/common/appcache/appcache_interfaces.h" |
9 | 9 |
10 #define IPC_MESSAGE_START AppCacheMsgStart | 10 #define IPC_MESSAGE_START AppCacheMsgStart |
11 | 11 |
12 IPC_ENUM_TRAITS_MAX_VALUE(appcache::EventID, appcache::EVENT_ID_LAST) | 12 IPC_ENUM_TRAITS_MAX_VALUE(appcache::AppCacheEventID, appcache::EVENT_ID_LAST) |
13 IPC_ENUM_TRAITS_MAX_VALUE(appcache::Status, appcache::STATUS_LAST) | 13 IPC_ENUM_TRAITS_MAX_VALUE(appcache::AppCacheStatus, appcache::STATUS_LAST) |
14 IPC_ENUM_TRAITS_MAX_VALUE(appcache::ErrorReason, appcache::ERROR_REASON_LAST) | 14 IPC_ENUM_TRAITS_MAX_VALUE(appcache::AppCacheErrorReason, |
| 15 appcache::ERROR_REASON_LAST) |
15 | 16 |
16 IPC_STRUCT_TRAITS_BEGIN(appcache::AppCacheInfo) | 17 IPC_STRUCT_TRAITS_BEGIN(appcache::AppCacheInfo) |
17 IPC_STRUCT_TRAITS_MEMBER(manifest_url) | 18 IPC_STRUCT_TRAITS_MEMBER(manifest_url) |
18 IPC_STRUCT_TRAITS_MEMBER(creation_time) | 19 IPC_STRUCT_TRAITS_MEMBER(creation_time) |
19 IPC_STRUCT_TRAITS_MEMBER(last_update_time) | 20 IPC_STRUCT_TRAITS_MEMBER(last_update_time) |
20 IPC_STRUCT_TRAITS_MEMBER(last_access_time) | 21 IPC_STRUCT_TRAITS_MEMBER(last_access_time) |
21 IPC_STRUCT_TRAITS_MEMBER(cache_id) | 22 IPC_STRUCT_TRAITS_MEMBER(cache_id) |
22 IPC_STRUCT_TRAITS_MEMBER(group_id) | 23 IPC_STRUCT_TRAITS_MEMBER(group_id) |
23 IPC_STRUCT_TRAITS_MEMBER(status) | 24 IPC_STRUCT_TRAITS_MEMBER(status) |
24 IPC_STRUCT_TRAITS_MEMBER(size) | 25 IPC_STRUCT_TRAITS_MEMBER(size) |
25 IPC_STRUCT_TRAITS_MEMBER(is_complete) | 26 IPC_STRUCT_TRAITS_MEMBER(is_complete) |
26 IPC_STRUCT_TRAITS_END() | 27 IPC_STRUCT_TRAITS_END() |
27 | 28 |
28 IPC_STRUCT_TRAITS_BEGIN(appcache::AppCacheResourceInfo) | 29 IPC_STRUCT_TRAITS_BEGIN(appcache::AppCacheResourceInfo) |
29 IPC_STRUCT_TRAITS_MEMBER(url) | 30 IPC_STRUCT_TRAITS_MEMBER(url) |
30 IPC_STRUCT_TRAITS_MEMBER(size) | 31 IPC_STRUCT_TRAITS_MEMBER(size) |
31 IPC_STRUCT_TRAITS_MEMBER(is_master) | 32 IPC_STRUCT_TRAITS_MEMBER(is_master) |
32 IPC_STRUCT_TRAITS_MEMBER(is_manifest) | 33 IPC_STRUCT_TRAITS_MEMBER(is_manifest) |
33 IPC_STRUCT_TRAITS_MEMBER(is_fallback) | 34 IPC_STRUCT_TRAITS_MEMBER(is_fallback) |
34 IPC_STRUCT_TRAITS_MEMBER(is_foreign) | 35 IPC_STRUCT_TRAITS_MEMBER(is_foreign) |
35 IPC_STRUCT_TRAITS_MEMBER(is_explicit) | 36 IPC_STRUCT_TRAITS_MEMBER(is_explicit) |
36 IPC_STRUCT_TRAITS_END() | 37 IPC_STRUCT_TRAITS_END() |
37 | 38 |
38 IPC_STRUCT_TRAITS_BEGIN(appcache::ErrorDetails) | 39 IPC_STRUCT_TRAITS_BEGIN(appcache::AppCacheErrorDetails) |
39 IPC_STRUCT_TRAITS_MEMBER(message) | 40 IPC_STRUCT_TRAITS_MEMBER(message) |
40 IPC_STRUCT_TRAITS_MEMBER(reason) | 41 IPC_STRUCT_TRAITS_MEMBER(reason) |
41 IPC_STRUCT_TRAITS_MEMBER(url) | 42 IPC_STRUCT_TRAITS_MEMBER(url) |
42 IPC_STRUCT_TRAITS_MEMBER(status) | 43 IPC_STRUCT_TRAITS_MEMBER(status) |
43 IPC_STRUCT_TRAITS_MEMBER(is_cross_origin) | 44 IPC_STRUCT_TRAITS_MEMBER(is_cross_origin) |
44 IPC_STRUCT_TRAITS_END() | 45 IPC_STRUCT_TRAITS_END() |
45 | 46 |
46 // AppCache messages sent from the child process to the browser. | 47 // AppCache messages sent from the child process to the browser. |
47 | 48 |
48 // Informs the browser of a new appcache host. | 49 // Informs the browser of a new appcache host. |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 87 |
87 // Informs the browser of a 'foreign' entry in an appcache. | 88 // Informs the browser of a 'foreign' entry in an appcache. |
88 IPC_MESSAGE_CONTROL3(AppCacheHostMsg_MarkAsForeignEntry, | 89 IPC_MESSAGE_CONTROL3(AppCacheHostMsg_MarkAsForeignEntry, |
89 int /* host_id */, | 90 int /* host_id */, |
90 GURL /* document_url */, | 91 GURL /* document_url */, |
91 int64 /* appcache_document_was_loaded_from */) | 92 int64 /* appcache_document_was_loaded_from */) |
92 | 93 |
93 // Returns the status of the appcache associated with host_id. | 94 // Returns the status of the appcache associated with host_id. |
94 IPC_SYNC_MESSAGE_CONTROL1_1(AppCacheHostMsg_GetStatus, | 95 IPC_SYNC_MESSAGE_CONTROL1_1(AppCacheHostMsg_GetStatus, |
95 int /* host_id */, | 96 int /* host_id */, |
96 appcache::Status) | 97 appcache::AppCacheStatus) |
97 | 98 |
98 // Initiates an update of the appcache associated with host_id. | 99 // Initiates an update of the appcache associated with host_id. |
99 IPC_SYNC_MESSAGE_CONTROL1_1(AppCacheHostMsg_StartUpdate, | 100 IPC_SYNC_MESSAGE_CONTROL1_1(AppCacheHostMsg_StartUpdate, |
100 int /* host_id */, | 101 int /* host_id */, |
101 bool /* success */) | 102 bool /* success */) |
102 | 103 |
103 // Swaps a new pending appcache, if there is one, into use for host_id. | 104 // Swaps a new pending appcache, if there is one, into use for host_id. |
104 IPC_SYNC_MESSAGE_CONTROL1_1(AppCacheHostMsg_SwapCache, | 105 IPC_SYNC_MESSAGE_CONTROL1_1(AppCacheHostMsg_SwapCache, |
105 int /* host_id */, | 106 int /* host_id */, |
106 bool /* success */) | 107 bool /* success */) |
107 | 108 |
108 // Gets resource list from appcache synchronously. | 109 // Gets resource list from appcache synchronously. |
109 IPC_SYNC_MESSAGE_CONTROL1_1(AppCacheHostMsg_GetResourceList, | 110 IPC_SYNC_MESSAGE_CONTROL1_1(AppCacheHostMsg_GetResourceList, |
110 int /* host_id in*/, | 111 int /* host_id in*/, |
111 std::vector<appcache::AppCacheResourceInfo> | 112 std::vector<appcache::AppCacheResourceInfo> |
112 /* resources out */) | 113 /* resources out */) |
113 | 114 |
114 | 115 |
115 // AppCache messages sent from the browser to the child process. | 116 // AppCache messages sent from the browser to the child process. |
116 | 117 |
117 // Notifies the renderer of the appcache that has been selected for a | 118 // Notifies the renderer of the appcache that has been selected for a |
118 // a particular host. This is sent in reply to AppCacheHostMsg_SelectCache. | 119 // a particular host. This is sent in reply to AppCacheHostMsg_SelectCache. |
119 IPC_MESSAGE_CONTROL2(AppCacheMsg_CacheSelected, | 120 IPC_MESSAGE_CONTROL2(AppCacheMsg_CacheSelected, |
120 int /* host_id */, | 121 int /* host_id */, |
121 appcache::AppCacheInfo) | 122 appcache::AppCacheInfo) |
122 | 123 |
123 // Notifies the renderer of an AppCache status change. | 124 // Notifies the renderer of an AppCache status change. |
124 IPC_MESSAGE_CONTROL2(AppCacheMsg_StatusChanged, | 125 IPC_MESSAGE_CONTROL2(AppCacheMsg_StatusChanged, |
125 std::vector<int> /* host_ids */, | 126 std::vector<int> /* host_ids */, |
126 appcache::Status) | 127 appcache::AppCacheStatus) |
127 | 128 |
128 // Notifies the renderer of an AppCache event other than the | 129 // Notifies the renderer of an AppCache event other than the |
129 // progress event which has a seperate message. | 130 // progress event which has a seperate message. |
130 IPC_MESSAGE_CONTROL2(AppCacheMsg_EventRaised, | 131 IPC_MESSAGE_CONTROL2(AppCacheMsg_EventRaised, |
131 std::vector<int> /* host_ids */, | 132 std::vector<int> /* host_ids */, |
132 appcache::EventID) | 133 appcache::AppCacheEventID) |
133 | 134 |
134 // Notifies the renderer of an AppCache progress event. | 135 // Notifies the renderer of an AppCache progress event. |
135 IPC_MESSAGE_CONTROL4(AppCacheMsg_ProgressEventRaised, | 136 IPC_MESSAGE_CONTROL4(AppCacheMsg_ProgressEventRaised, |
136 std::vector<int> /* host_ids */, | 137 std::vector<int> /* host_ids */, |
137 GURL /* url being processed */, | 138 GURL /* url being processed */, |
138 int /* total */, | 139 int /* total */, |
139 int /* complete */) | 140 int /* complete */) |
140 | 141 |
141 // Notifies the renderer of an AppCache error event. | 142 // Notifies the renderer of an AppCache error event. |
142 IPC_MESSAGE_CONTROL2(AppCacheMsg_ErrorEventRaised, | 143 IPC_MESSAGE_CONTROL2(AppCacheMsg_ErrorEventRaised, |
143 std::vector<int> /* host_ids */, | 144 std::vector<int> /* host_ids */, |
144 appcache::ErrorDetails) | 145 appcache::AppCacheErrorDetails) |
145 | 146 |
146 // Notifies the renderer of an AppCache logging message. | 147 // Notifies the renderer of an AppCache logging message. |
147 IPC_MESSAGE_CONTROL3(AppCacheMsg_LogMessage, | 148 IPC_MESSAGE_CONTROL3(AppCacheMsg_LogMessage, |
148 int /* host_id */, | 149 int /* host_id */, |
149 int /* log_level */, | 150 int /* log_level */, |
150 std::string /* message */) | 151 std::string /* message */) |
151 | 152 |
152 // Notifies the renderer of the fact that AppCache access was blocked. | 153 // Notifies the renderer of the fact that AppCache access was blocked. |
153 IPC_MESSAGE_CONTROL2(AppCacheMsg_ContentBlocked, | 154 IPC_MESSAGE_CONTROL2(AppCacheMsg_ContentBlocked, |
154 int /* host_id */, | 155 int /* host_id */, |
155 GURL /* manifest_url */) | 156 GURL /* manifest_url */) |
OLD | NEW |