Add a stub __cxa_demangle to disable LLVM's demangler.
[chromium-blink-merge.git] / content / common / cache_storage / cache_storage_messages.h
blobdc1de3c31bad1459652d34af5ad8f8bb972be8b2
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Message definition file, included multiple times, hence no include guard.
7 #include <string>
8 #include <vector>
10 #include "base/strings/string16.h"
11 #include "content/common/cache_storage/cache_storage_types.h"
12 #include "content/common/service_worker/service_worker_types.h"
13 #include "ipc/ipc_message_macros.h"
14 #include "ipc/ipc_param_traits.h"
15 #include "third_party/WebKit/public/platform/WebServiceWorkerCacheError.h"
16 #include "url/gurl.h"
18 #undef IPC_MESSAGE_EXPORT
19 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
21 #define IPC_MESSAGE_START CacheStorageMsgStart
23 // TODO(jsbell): This depends on traits for content::ServiceWorkerResponse
24 // which are defined in service_worker_messages.h - correct this implicit
25 // cross-dependency.
27 IPC_STRUCT_TRAITS_BEGIN(content::CacheStorageCacheQueryParams)
28 IPC_STRUCT_TRAITS_MEMBER(ignore_search)
29 IPC_STRUCT_TRAITS_MEMBER(ignore_method)
30 IPC_STRUCT_TRAITS_MEMBER(ignore_vary)
31 IPC_STRUCT_TRAITS_MEMBER(cache_name)
32 IPC_STRUCT_TRAITS_END()
34 IPC_ENUM_TRAITS_MAX_VALUE(content::CacheStorageCacheOperationType,
35 content::CACHE_STORAGE_CACHE_OPERATION_TYPE_LAST)
37 IPC_STRUCT_TRAITS_BEGIN(content::CacheStorageBatchOperation)
38 IPC_STRUCT_TRAITS_MEMBER(operation_type)
39 IPC_STRUCT_TRAITS_MEMBER(request)
40 IPC_STRUCT_TRAITS_MEMBER(response)
41 IPC_STRUCT_TRAITS_MEMBER(match_params)
42 IPC_STRUCT_TRAITS_END()
44 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebServiceWorkerCacheError,
45 blink::WebServiceWorkerCacheErrorLast)
47 //---------------------------------------------------------------------------
48 // Messages sent from the child process to the browser.
50 // CacheStorage operations in the browser.
51 IPC_MESSAGE_CONTROL4(CacheStorageHostMsg_CacheStorageHas,
52 int /* thread_id */,
53 int /* request_id */,
54 GURL /* origin */,
55 base::string16 /* fetch_store_name */)
57 IPC_MESSAGE_CONTROL4(CacheStorageHostMsg_CacheStorageOpen,
58 int /* thread_id */,
59 int /* request_id */,
60 GURL /* origin */,
61 base::string16 /* fetch_store_name */)
63 IPC_MESSAGE_CONTROL4(CacheStorageHostMsg_CacheStorageDelete,
64 int /* thread_id */,
65 int /* request_id */,
66 GURL /* origin */,
67 base::string16 /* fetch_store_name */)
69 IPC_MESSAGE_CONTROL3(CacheStorageHostMsg_CacheStorageKeys,
70 int /* thread_id */,
71 int /* request_id */,
72 GURL /* origin */)
74 IPC_MESSAGE_CONTROL5(CacheStorageHostMsg_CacheStorageMatch,
75 int /* thread_id */,
76 int /* request_id */,
77 GURL /* origin */,
78 content::ServiceWorkerFetchRequest,
79 content::CacheStorageCacheQueryParams)
81 // Cache operations in the browser.
82 IPC_MESSAGE_CONTROL5(CacheStorageHostMsg_CacheMatch,
83 int /* thread_id */,
84 int /* request_id */,
85 int /* cache_id */,
86 content::ServiceWorkerFetchRequest,
87 content::CacheStorageCacheQueryParams)
89 IPC_MESSAGE_CONTROL5(CacheStorageHostMsg_CacheMatchAll,
90 int /* thread_id */,
91 int /* request_id */,
92 int /* cache_id */,
93 content::ServiceWorkerFetchRequest,
94 content::CacheStorageCacheQueryParams)
96 IPC_MESSAGE_CONTROL5(CacheStorageHostMsg_CacheKeys,
97 int /* thread_id */,
98 int /* request_id */,
99 int /* cache_id */,
100 content::ServiceWorkerFetchRequest,
101 content::CacheStorageCacheQueryParams)
103 IPC_MESSAGE_CONTROL4(CacheStorageHostMsg_CacheBatch,
104 int /* thread_id */,
105 int /* request_id */,
106 int /* cache_id */,
107 std::vector<content::CacheStorageBatchOperation>)
109 IPC_MESSAGE_CONTROL1(CacheStorageHostMsg_CacheClosed,
110 int /* cache_id */)
112 IPC_MESSAGE_CONTROL1(CacheStorageHostMsg_BlobDataHandled,
113 std::string /* uuid */)
115 //---------------------------------------------------------------------------
116 // Messages sent from the browser to the child process.
118 // All such messages must includes thread_id as the first int; it is read off
119 // by CacheStorageMessageFilter::GetWorkerThreadIdForMessage to route delivery
120 // to the appropriate thread.
122 // Sent at successful completion of CacheStorage operations.
123 IPC_MESSAGE_CONTROL2(CacheStorageMsg_CacheStorageHasSuccess,
124 int /* thread_id */,
125 int /* request_id */)
126 IPC_MESSAGE_CONTROL3(CacheStorageMsg_CacheStorageOpenSuccess,
127 int /* thread_id */,
128 int /* request_id */,
129 int /* fetch_store_id */)
130 IPC_MESSAGE_CONTROL2(CacheStorageMsg_CacheStorageDeleteSuccess,
131 int /* thread_id */,
132 int /* request_id */)
133 IPC_MESSAGE_CONTROL3(CacheStorageMsg_CacheStorageKeysSuccess,
134 int /* thread_id */,
135 int /* request_id */,
136 std::vector<base::string16> /* keys */)
137 IPC_MESSAGE_CONTROL3(CacheStorageMsg_CacheStorageMatchSuccess,
138 int /* thread_id */,
139 int /* request_id */,
140 content::ServiceWorkerResponse)
142 // Sent at erroneous completion of CacheStorage operations.
143 IPC_MESSAGE_CONTROL3(CacheStorageMsg_CacheStorageHasError,
144 int /* thread_id */,
145 int /* request_id */,
146 blink::WebServiceWorkerCacheError /* reason */)
147 IPC_MESSAGE_CONTROL3(CacheStorageMsg_CacheStorageOpenError,
148 int /* thread_id */,
149 int /* request_id */,
150 blink::WebServiceWorkerCacheError /* reason */)
151 IPC_MESSAGE_CONTROL3(CacheStorageMsg_CacheStorageDeleteError,
152 int /* thread_id */,
153 int /* request_id */,
154 blink::WebServiceWorkerCacheError /* reason */)
155 IPC_MESSAGE_CONTROL3(CacheStorageMsg_CacheStorageKeysError,
156 int /* thread_id */,
157 int /* request_id */,
158 blink::WebServiceWorkerCacheError /* reason */)
159 IPC_MESSAGE_CONTROL3(CacheStorageMsg_CacheStorageMatchError,
160 int /* thread_id */,
161 int /* request_id */,
162 blink::WebServiceWorkerCacheError)
164 // Sent at successful completion of Cache operations.
165 IPC_MESSAGE_CONTROL3(CacheStorageMsg_CacheMatchSuccess,
166 int /* thread_id */,
167 int /* request_id */,
168 content::ServiceWorkerResponse)
169 IPC_MESSAGE_CONTROL3(CacheStorageMsg_CacheMatchAllSuccess,
170 int /* thread_id */,
171 int /* request_id */,
172 std::vector<content::ServiceWorkerResponse>)
173 IPC_MESSAGE_CONTROL3(CacheStorageMsg_CacheKeysSuccess,
174 int /* thread_id */,
175 int /* request_id */,
176 std::vector<content::ServiceWorkerFetchRequest>)
177 IPC_MESSAGE_CONTROL2(CacheStorageMsg_CacheBatchSuccess,
178 int /* thread_id */,
179 int /* request_id */)
181 // Sent at erroneous completion of CacheStorage operations.
182 IPC_MESSAGE_CONTROL3(CacheStorageMsg_CacheMatchError,
183 int /* thread_id */,
184 int /* request_id */,
185 blink::WebServiceWorkerCacheError)
186 IPC_MESSAGE_CONTROL3(CacheStorageMsg_CacheMatchAllError,
187 int /* thread_id */,
188 int /* request_id */,
189 blink::WebServiceWorkerCacheError)
190 IPC_MESSAGE_CONTROL3(CacheStorageMsg_CacheKeysError,
191 int /* thread_id */,
192 int /* request_id */,
193 blink::WebServiceWorkerCacheError)
194 IPC_MESSAGE_CONTROL3(CacheStorageMsg_CacheBatchError,
195 int /* thread_id */,
196 int /* request_id */,
197 blink::WebServiceWorkerCacheError)