Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: content/common/indexed_db/indexed_db_messages.h

Issue 2449953008: Port messages sent by WebIDBDatabaseImpl to Mojo. (Closed)
Patch Set: Address cmumford@ and jsbell@'s comments. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 // Message definition file, included multiple times, hence no include guard. 5 // Message definition file, included multiple times, hence no include guard.
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
11 #include <utility> 11 #include <utility>
12 #include <vector> 12 #include <vector>
13 13
14 #include "content/common/indexed_db/indexed_db_key.h" 14 #include "content/common/indexed_db/indexed_db_key.h"
15 #include "content/common/indexed_db/indexed_db_key_path.h" 15 #include "content/common/indexed_db/indexed_db_key_path.h"
16 #include "content/common/indexed_db/indexed_db_key_range.h" 16 #include "content/common/indexed_db/indexed_db_key_range.h"
17 #include "content/common/indexed_db/indexed_db_param_traits.h" 17 #include "content/common/indexed_db/indexed_db_param_traits.h"
18 #include "content/public/common/common_param_traits.h" 18 #include "content/public/common/common_param_traits.h"
19 #include "content/public/common/common_param_traits_macros.h" 19 #include "content/public/common/common_param_traits_macros.h"
20 #include "ipc/ipc_message_macros.h" 20 #include "ipc/ipc_message_macros.h"
21 #include "ipc/ipc_message_utils.h" 21 #include "ipc/ipc_message_utils.h"
22 #include "ipc/ipc_param_traits.h" 22 #include "ipc/ipc_param_traits.h"
23 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h" 23 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h"
24 #include "url/origin.h"
25 24
26 // Singly-included section for typedefs in multiply-included file. 25 // Singly-included section for typedefs in multiply-included file.
27 #ifndef CONTENT_COMMON_INDEXED_DB_INDEXED_DB_MESSAGES_H_ 26 #ifndef CONTENT_COMMON_INDEXED_DB_INDEXED_DB_MESSAGES_H_
28 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_MESSAGES_H_ 27 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_MESSAGES_H_
29 28
30 // An index id, and corresponding set of keys to insert.
31
32 typedef std::pair<int64_t, std::vector<content::IndexedDBKey>> IndexKeys;
33 // IPC_MESSAGE macros fail on the std::map, when expanding. We need to define 29 // IPC_MESSAGE macros fail on the std::map, when expanding. We need to define
34 // a type to avoid that. 30 // a type to avoid that.
35 // Map observer_id to corresponding set of indices in observations. 31 // Map observer_id to corresponding set of indices in observations.
36 typedef std::map<int32_t, std::vector<int32_t>> ObservationIndex; 32 typedef std::map<int32_t, std::vector<int32_t>> ObservationIndex;
37 33
38 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_MESSAGES_H_ 34 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_MESSAGES_H_
39 35
40 #undef IPC_MESSAGE_EXPORT 36 #undef IPC_MESSAGE_EXPORT
41 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT 37 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
42 #define IPC_MESSAGE_START IndexedDBMsgStart 38 #define IPC_MESSAGE_START IndexedDBMsgStart
43 39
44 // Argument structures used in messages 40 // Argument structures used in messages
45 41
46 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBCursorDirection, 42 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBCursorDirection,
47 blink::WebIDBCursorDirectionLast) 43 blink::WebIDBCursorDirectionLast)
48 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBPutMode, blink::WebIDBPutModeLast) 44 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBPutMode, blink::WebIDBPutModeLast)
49 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBTaskType, blink::WebIDBTaskTypeLast) 45 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBTaskType, blink::WebIDBTaskTypeLast)
50 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBTransactionMode, 46 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBTransactionMode,
51 blink::WebIDBTransactionModeLast) 47 blink::WebIDBTransactionModeLast)
52 48
53 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBDataLoss, blink::WebIDBDataLossTotal) 49 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBDataLoss, blink::WebIDBDataLossTotal)
54 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBOperationType, 50 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBOperationType,
55 blink::WebIDBOperationTypeLast) 51 blink::WebIDBOperationTypeLast)
56 52
57 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCreateTransaction_Params)
58 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
59 // The database the object store belongs to.
60 IPC_STRUCT_MEMBER(int32_t, ipc_database_id)
61 // The transaction id as minted by the frontend.
62 IPC_STRUCT_MEMBER(int64_t, transaction_id)
63 // The scope of the transaction.
64 IPC_STRUCT_MEMBER(std::vector<int64_t>, object_store_ids)
65 // The transaction mode.
66 IPC_STRUCT_MEMBER(blink::WebIDBTransactionMode, mode)
67 IPC_STRUCT_END()
68
69 // Used to create an object store.
70 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCreateObjectStore_Params)
71 // The database the object store belongs to.
72 IPC_STRUCT_MEMBER(int32_t, ipc_database_id)
73 // The transaction its associated with.
74 IPC_STRUCT_MEMBER(int64_t, transaction_id)
75 // The storage id of the object store.
76 IPC_STRUCT_MEMBER(int64_t, object_store_id)
77 // The name of the object store.
78 IPC_STRUCT_MEMBER(base::string16, name)
79 // The keyPath of the object store.
80 IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, key_path)
81 // Whether the object store created should have a key generator.
82 IPC_STRUCT_MEMBER(bool, auto_increment)
83 IPC_STRUCT_END()
84
85 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseGet_Params)
86 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
87 // The id any response should contain.
88 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id)
89 // The database the object store belongs to.
90 IPC_STRUCT_MEMBER(int32_t, ipc_database_id)
91 // The transaction its associated with.
92 IPC_STRUCT_MEMBER(int64_t, transaction_id)
93 // The object store's id.
94 IPC_STRUCT_MEMBER(int64_t, object_store_id)
95 // The index's id.
96 IPC_STRUCT_MEMBER(int64_t, index_id)
97 // The serialized key range.
98 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range)
99 // If this is just retrieving the key
100 IPC_STRUCT_MEMBER(bool, key_only)
101 IPC_STRUCT_END()
102
103 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseGetAll_Params)
104 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
105 // The id any response should contain.
106 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id)
107 // The database the object store belongs to.
108 IPC_STRUCT_MEMBER(int32_t, ipc_database_id)
109 // The transaction its associated with.
110 IPC_STRUCT_MEMBER(int64_t, transaction_id)
111 // The object store's id.
112 IPC_STRUCT_MEMBER(int64_t, object_store_id)
113 // The index id.
114 IPC_STRUCT_MEMBER(int64_t, index_id)
115 // The serialized key range.
116 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range)
117 // If this is just retrieving the key
118 IPC_STRUCT_MEMBER(bool, key_only)
119 // The max number of values to retrieve.
120 IPC_STRUCT_MEMBER(int64_t, max_count)
121 IPC_STRUCT_END()
122
123 IPC_STRUCT_BEGIN(IndexedDBMsg_BlobOrFileInfo) 53 IPC_STRUCT_BEGIN(IndexedDBMsg_BlobOrFileInfo)
124 IPC_STRUCT_MEMBER(bool, is_file) 54 IPC_STRUCT_MEMBER(bool, is_file)
125 IPC_STRUCT_MEMBER(std::string, uuid) 55 IPC_STRUCT_MEMBER(std::string, uuid)
126 IPC_STRUCT_MEMBER(base::string16, mime_type) 56 IPC_STRUCT_MEMBER(base::string16, mime_type)
127 IPC_STRUCT_MEMBER(uint64_t, size) 57 IPC_STRUCT_MEMBER(uint64_t, size)
128 IPC_STRUCT_MEMBER(base::string16, file_path) 58 IPC_STRUCT_MEMBER(base::string16, file_path)
129 IPC_STRUCT_MEMBER(base::string16, file_name) 59 IPC_STRUCT_MEMBER(base::string16, file_name)
130 IPC_STRUCT_MEMBER(double, last_modified) 60 IPC_STRUCT_MEMBER(double, last_modified)
131 IPC_STRUCT_END() 61 IPC_STRUCT_END()
132 62
133 IPC_STRUCT_BEGIN(IndexedDBMsg_Value) 63 IPC_STRUCT_BEGIN(IndexedDBMsg_Value)
134 // The serialized value being transferred. 64 // The serialized value being transferred.
135 IPC_STRUCT_MEMBER(std::string, bits) 65 IPC_STRUCT_MEMBER(std::string, bits)
136 // Sideband data for any blob or file encoded in value. 66 // Sideband data for any blob or file encoded in value.
137 IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_BlobOrFileInfo>, blob_or_file_info) 67 IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_BlobOrFileInfo>, blob_or_file_info)
138 IPC_STRUCT_END() 68 IPC_STRUCT_END()
139 69
140 IPC_STRUCT_BEGIN_WITH_PARENT(IndexedDBMsg_ReturnValue, IndexedDBMsg_Value) 70 IPC_STRUCT_BEGIN_WITH_PARENT(IndexedDBMsg_ReturnValue, IndexedDBMsg_Value)
141 IPC_STRUCT_TRAITS_PARENT(IndexedDBMsg_Value) 71 IPC_STRUCT_TRAITS_PARENT(IndexedDBMsg_Value)
142 // Optional primary key & path used only when key generator specified. 72 // Optional primary key & path used only when key generator specified.
143 IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key) 73 IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key)
144 IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, key_path) 74 IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, key_path)
145 IPC_STRUCT_END() 75 IPC_STRUCT_END()
146 76
147 // WebIDBDatabase::observe() message.
148 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseObserve_Params)
149 // The database the observer observers on.
150 IPC_STRUCT_MEMBER(int32_t, ipc_database_id)
151 // The transaction it's associated with.
152 IPC_STRUCT_MEMBER(int32_t, transaction_id)
153 IPC_STRUCT_MEMBER(int32_t, observer_id)
154 IPC_STRUCT_MEMBER(bool, include_transaction)
155 IPC_STRUCT_MEMBER(bool, no_records)
156 IPC_STRUCT_MEMBER(bool, values)
157 IPC_STRUCT_MEMBER(uint16_t, operation_types)
158 IPC_STRUCT_END()
159
160 // Used to set a value in an object store.
161 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabasePut_Params)
162 // The id any response should contain.
163 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
164 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id)
165 // The database the object store belongs to.
166 IPC_STRUCT_MEMBER(int32_t, ipc_database_id)
167 // The transaction it's associated with.
168 IPC_STRUCT_MEMBER(int64_t, transaction_id)
169 // The object store's id.
170 IPC_STRUCT_MEMBER(int64_t, object_store_id)
171 // The index's id.
172 IPC_STRUCT_MEMBER(int64_t, index_id)
173 // The value to set.
174 IPC_STRUCT_MEMBER(IndexedDBMsg_Value, value)
175 // The key to set it on (may not be "valid"/set in some cases).
176 IPC_STRUCT_MEMBER(content::IndexedDBKey, key)
177 // Whether this is an add or a put.
178 IPC_STRUCT_MEMBER(blink::WebIDBPutMode, put_mode)
179 // The index ids and the list of keys for each index.
180 IPC_STRUCT_MEMBER(std::vector<IndexKeys>, index_keys)
181 IPC_STRUCT_END()
182
183 // Used to open both cursors and object cursors in IndexedDB.
184 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseOpenCursor_Params)
185 // The response should have these ids.
186 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
187 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id)
188 // The database the object store belongs to.
189 IPC_STRUCT_MEMBER(int32_t, ipc_database_id)
190 // The transaction this request belongs to.
191 IPC_STRUCT_MEMBER(int64_t, transaction_id)
192 // The object store.
193 IPC_STRUCT_MEMBER(int64_t, object_store_id)
194 // The index if any.
195 IPC_STRUCT_MEMBER(int64_t, index_id)
196 // The serialized key range.
197 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range)
198 // The direction of this cursor.
199 IPC_STRUCT_MEMBER(blink::WebIDBCursorDirection, direction)
200 // If this is just retrieving the key
201 IPC_STRUCT_MEMBER(bool, key_only)
202 // The priority of this cursor.
203 IPC_STRUCT_MEMBER(blink::WebIDBTaskType, task_type)
204 IPC_STRUCT_END()
205
206 // Used to open both cursors and object cursors in IndexedDB.
207 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCount_Params)
208 // The response should have these ids.
209 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
210 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id)
211 // The transaction this request belongs to.
212 IPC_STRUCT_MEMBER(int64_t, transaction_id)
213 // The IPC id of the database.
214 IPC_STRUCT_MEMBER(int32_t, ipc_database_id)
215 // The object store.
216 IPC_STRUCT_MEMBER(int64_t, object_store_id)
217 // The index if any.
218 IPC_STRUCT_MEMBER(int64_t, index_id)
219 // The serialized key range.
220 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range)
221 IPC_STRUCT_END()
222
223 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseDeleteRange_Params)
224 // The response should have these ids.
225 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
226 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id)
227 // The IPC id of the database.
228 IPC_STRUCT_MEMBER(int32_t, ipc_database_id)
229 // The transaction this request belongs to.
230 IPC_STRUCT_MEMBER(int64_t, transaction_id)
231 // The object store.
232 IPC_STRUCT_MEMBER(int64_t, object_store_id)
233 // The serialized key range.
234 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range)
235 IPC_STRUCT_END()
236
237 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseSetIndexKeys_Params)
238 // The IPC id of the database.
239 IPC_STRUCT_MEMBER(int32_t, ipc_database_id)
240 // The transaction this request belongs to.
241 IPC_STRUCT_MEMBER(int64_t, transaction_id)
242 // The object store's id.
243 IPC_STRUCT_MEMBER(int64_t, object_store_id)
244 // The object store key that we're setting index keys for.
245 IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key)
246 // The index ids and the list of keys for each index.
247 IPC_STRUCT_MEMBER(std::vector<IndexKeys>, index_keys)
248 IPC_STRUCT_END()
249
250 // Used to create an index.
251 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCreateIndex_Params)
252 // The transaction this is associated with.
253 IPC_STRUCT_MEMBER(int64_t, transaction_id)
254 // The database being used.
255 IPC_STRUCT_MEMBER(int32_t, ipc_database_id)
256 // The object store the index belongs to.
257 IPC_STRUCT_MEMBER(int64_t, object_store_id)
258 // The storage id of the index.
259 IPC_STRUCT_MEMBER(int64_t, index_id)
260 // The name of the index.
261 IPC_STRUCT_MEMBER(base::string16, name)
262 // The keyPath of the index.
263 IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, key_path)
264 // Whether the index created has unique keys.
265 IPC_STRUCT_MEMBER(bool, unique)
266 // Whether the index created produces keys for each array entry.
267 IPC_STRUCT_MEMBER(bool, multi_entry)
268 IPC_STRUCT_END()
269
270 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessIDBCursor_Params)
271 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
272 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id)
273 IPC_STRUCT_MEMBER(int32_t, ipc_cursor_id)
274 IPC_STRUCT_MEMBER(content::IndexedDBKey, key)
275 IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key)
276 IPC_STRUCT_MEMBER(IndexedDBMsg_Value, value)
277 IPC_STRUCT_END()
278
279 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessCursorContinue_Params) 77 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessCursorContinue_Params)
280 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id) 78 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
281 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id) 79 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id)
282 IPC_STRUCT_MEMBER(int32_t, ipc_cursor_id) 80 IPC_STRUCT_MEMBER(int32_t, ipc_cursor_id)
283 IPC_STRUCT_MEMBER(content::IndexedDBKey, key) 81 IPC_STRUCT_MEMBER(content::IndexedDBKey, key)
284 IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key) 82 IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key)
285 IPC_STRUCT_MEMBER(IndexedDBMsg_Value, value) 83 IPC_STRUCT_MEMBER(IndexedDBMsg_Value, value)
286 IPC_STRUCT_END() 84 IPC_STRUCT_END()
287 85
288 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params) 86 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params)
289 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id) 87 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
290 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id) 88 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id)
291 IPC_STRUCT_MEMBER(int32_t, ipc_cursor_id) 89 IPC_STRUCT_MEMBER(int32_t, ipc_cursor_id)
292 IPC_STRUCT_MEMBER(std::vector<content::IndexedDBKey>, keys) 90 IPC_STRUCT_MEMBER(std::vector<content::IndexedDBKey>, keys)
293 IPC_STRUCT_MEMBER(std::vector<content::IndexedDBKey>, primary_keys) 91 IPC_STRUCT_MEMBER(std::vector<content::IndexedDBKey>, primary_keys)
294 IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_Value>, values) 92 IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_Value>, values)
295 IPC_STRUCT_END() 93 IPC_STRUCT_END()
296 94
297 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessArray_Params)
298 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
299 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id)
300 IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_ReturnValue>, values)
301 IPC_STRUCT_END()
302
303 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessValue_Params) 95 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessValue_Params)
304 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id) 96 IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
305 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id) 97 IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id)
306 IPC_STRUCT_MEMBER(IndexedDBMsg_ReturnValue, value) 98 IPC_STRUCT_MEMBER(IndexedDBMsg_ReturnValue, value)
307 IPC_STRUCT_END() 99 IPC_STRUCT_END()
308 100
309 IPC_STRUCT_BEGIN(IndexedDBMsg_Observation) 101 IPC_STRUCT_BEGIN(IndexedDBMsg_Observation)
310 IPC_STRUCT_MEMBER(int64_t, object_store_id) 102 IPC_STRUCT_MEMBER(int64_t, object_store_id)
311 IPC_STRUCT_MEMBER(blink::WebIDBOperationType, type) 103 IPC_STRUCT_MEMBER(blink::WebIDBOperationType, type)
312 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range) 104 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range)
313 IPC_STRUCT_END() 105 IPC_STRUCT_END()
314 106
315 IPC_STRUCT_BEGIN(IndexedDBMsg_ObserverChanges) 107 IPC_STRUCT_BEGIN(IndexedDBMsg_ObserverChanges)
316 IPC_STRUCT_MEMBER(ObservationIndex, observation_index) 108 IPC_STRUCT_MEMBER(ObservationIndex, observation_index)
317 IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_Observation>, observations) 109 IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_Observation>, observations)
318 IPC_STRUCT_END() 110 IPC_STRUCT_END()
319 111
320 // Indexed DB messages sent from the browser to the renderer. 112 // Indexed DB messages sent from the browser to the renderer.
321 113
322 // The thread_id needs to be the first parameter in these messages. In the IO 114 // The thread_id needs to be the first parameter in these messages. In the IO
323 // thread on the renderer/client process, an IDB message filter assumes the 115 // thread on the renderer/client process, an IDB message filter assumes the
324 // thread_id is the first int. 116 // thread_id is the first int.
325 117
326 // IDBCallback message handlers. 118 // IDBCallback message handlers.
327 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessIDBCursor,
328 IndexedDBMsg_CallbacksSuccessIDBCursor_Params)
329
330 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessCursorContinue, 119 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessCursorContinue,
331 IndexedDBMsg_CallbacksSuccessCursorContinue_Params) 120 IndexedDBMsg_CallbacksSuccessCursorContinue_Params)
332 121
333 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessCursorAdvance, 122 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessCursorAdvance,
334 IndexedDBMsg_CallbacksSuccessCursorContinue_Params) 123 IndexedDBMsg_CallbacksSuccessCursorContinue_Params)
335 124
336 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessCursorPrefetch, 125 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessCursorPrefetch,
337 IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params) 126 IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params)
338 127
339 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessArray,
340 IndexedDBMsg_CallbacksSuccessArray_Params)
341
342 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessIndexedDBKey,
343 int32_t /* ipc_thread_id */,
344 int32_t /* ipc_callbacks_id */,
345 content::IndexedDBKey /* indexed_db_key */)
346
347 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessValue, 128 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessValue,
348 IndexedDBMsg_CallbacksSuccessValue_Params) 129 IndexedDBMsg_CallbacksSuccessValue_Params)
349 130
350 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessInteger, 131 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessInteger,
351 int32_t /* ipc_thread_id */, 132 int32_t /* ipc_thread_id */,
352 int32_t /* ipc_callbacks_id */, 133 int32_t /* ipc_callbacks_id */,
353 int64_t /* value */) 134 int64_t /* value */)
354 IPC_MESSAGE_CONTROL2(IndexedDBMsg_CallbacksSuccessUndefined,
355 int32_t /* ipc_thread_id */,
356 int32_t /* ipc_callbacks_id */)
357 IPC_MESSAGE_CONTROL4(IndexedDBMsg_CallbacksError, 135 IPC_MESSAGE_CONTROL4(IndexedDBMsg_CallbacksError,
358 int32_t /* ipc_thread_id */, 136 int32_t /* ipc_thread_id */,
359 int32_t /* ipc_callbacks_id */, 137 int32_t /* ipc_callbacks_id */,
360 int /* code */, 138 int /* code */,
361 base::string16 /* message */) 139 base::string16 /* message */)
362 140
363 // IDBDatabaseCallback message handlers 141 // IDBDatabaseCallback message handlers
364 IPC_MESSAGE_CONTROL2(IndexedDBMsg_DatabaseCallbacksChanges, 142 IPC_MESSAGE_CONTROL2(IndexedDBMsg_DatabaseCallbacksChanges,
365 int32_t, /* ipc_thread_id */ 143 int32_t, /* ipc_thread_id */
366 IndexedDBMsg_ObserverChanges) 144 IndexedDBMsg_ObserverChanges)
(...skipping 24 matching lines...) Expand all
391 169
392 // WebIDBCursor::prefetchReset() message. 170 // WebIDBCursor::prefetchReset() message.
393 IPC_MESSAGE_CONTROL3(IndexedDBHostMsg_CursorPrefetchReset, 171 IPC_MESSAGE_CONTROL3(IndexedDBHostMsg_CursorPrefetchReset,
394 int32_t, /* ipc_cursor_id */ 172 int32_t, /* ipc_cursor_id */
395 int32_t, /* used_prefetches */ 173 int32_t, /* used_prefetches */
396 int32_t) /* used_prefetches */ 174 int32_t) /* used_prefetches */
397 175
398 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_AckReceivedBlobs, 176 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_AckReceivedBlobs,
399 std::vector<std::string>) /* uuids */ 177 std::vector<std::string>) /* uuids */
400 178
401 // WebIDBDatabase::unobserve() message.
402 IPC_MESSAGE_CONTROL2(IndexedDBHostMsg_DatabaseUnobserve,
403 int32_t, /* ipc_database_id */
404 std::vector<int32_t>) /* list of observer_id */
405
406 // WebIDBDatabase::createObjectStore() message.
407 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseCreateObjectStore,
408 IndexedDBHostMsg_DatabaseCreateObjectStore_Params)
409
410 // WebIDBDatabase::deleteObjectStore() message.
411 IPC_MESSAGE_CONTROL3(IndexedDBHostMsg_DatabaseDeleteObjectStore,
412 int32_t, /* ipc_database_id */
413 int64_t, /* transaction_id */
414 int64_t) /* object_store_id */
415
416 // WebIDBDatabase::renameObjectStore() message.
417 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_DatabaseRenameObjectStore,
418 int32_t, /* ipc_database_id */
419 int64_t, /* transaction_id */
420 int64_t, /* object_store_id */
421 base::string16) /* new_name */
422
423 // WebIDBDatabase::createTransaction() message.
424 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseCreateTransaction,
425 IndexedDBHostMsg_DatabaseCreateTransaction_Params)
426
427 // WebIDBDatabase::close() message.
428 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseClose,
429 int32_t /* ipc_database_id */)
430
431 // WebIDBDatabase::versionChangeIgnored() message.
432 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseVersionChangeIgnored,
433 int32_t /* ipc_database_id */)
434
435 // WebIDBDatabase::~WebIDBDatabase() message.
436 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseDestroyed,
437 int32_t /* ipc_database_id */)
438
439 // WebIDBDatabase::get() message.
440 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseGet,
441 IndexedDBHostMsg_DatabaseGet_Params)
442
443 // WebIDBDatabase::getAll() message.
444 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseGetAll,
445 IndexedDBHostMsg_DatabaseGetAll_Params)
446
447 // WebIDBDatabase::observe() message.
448 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseObserve,
449 IndexedDBHostMsg_DatabaseObserve_Params)
450
451 // WebIDBDatabase::put() message.
452 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabasePut,
453 IndexedDBHostMsg_DatabasePut_Params)
454
455 // WebIDBDatabase::setIndexKeys() message.
456 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseSetIndexKeys,
457 IndexedDBHostMsg_DatabaseSetIndexKeys_Params)
458
459 // WebIDBDatabase::setIndexesReady() message.
460 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_DatabaseSetIndexesReady,
461 int32_t, /* ipc_database_id */
462 int64_t, /* transaction_id */
463 int64_t, /* object_store_id */
464 std::vector<int64_t>) /* index_ids */
465
466 // WebIDBDatabase::openCursor() message.
467 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseOpenCursor,
468 IndexedDBHostMsg_DatabaseOpenCursor_Params)
469
470 // WebIDBDatabase::count() message.
471 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseCount,
472 IndexedDBHostMsg_DatabaseCount_Params)
473
474 // WebIDBDatabase::deleteRange() message.
475 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseDeleteRange,
476 IndexedDBHostMsg_DatabaseDeleteRange_Params)
477
478 // WebIDBDatabase::clear() message.
479 IPC_MESSAGE_CONTROL5(IndexedDBHostMsg_DatabaseClear,
480 int32_t, /* ipc_thread_id */
481 int32_t, /* ipc_callbacks_id */
482 int32_t, /* ipc_database_id */
483 int64_t, /* transaction_id */
484 int64_t) /* object_store_id */
485
486 // WebIDBDatabase::createIndex() message.
487 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseCreateIndex,
488 IndexedDBHostMsg_DatabaseCreateIndex_Params)
489
490 // WebIDBDatabase::deleteIndex() message.
491 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_DatabaseDeleteIndex,
492 int32_t, /* ipc_database_id */
493 int64_t, /* transaction_id */
494 int64_t, /* object_store_id */
495 int64_t) /* index_id */
496
497 // WebIDBDatabase::renameIndex() message.
498 IPC_MESSAGE_CONTROL5(IndexedDBHostMsg_DatabaseRenameIndex,
499 int32_t, /* ipc_database_id */
500 int64_t, /* transaction_id */
501 int64_t, /* object_store_id */
502 int64_t, /* index_id */
503 base::string16) /* new_name */
504
505 // WebIDBDatabase::abort() message.
506 IPC_MESSAGE_CONTROL2(IndexedDBHostMsg_DatabaseAbort,
507 int32_t, /* ipc_database_id */
508 int64_t) /* transaction_id */
509
510 // WebIDBDatabase::commit() message.
511 IPC_MESSAGE_CONTROL2(IndexedDBHostMsg_DatabaseCommit,
512 int32_t, /* ipc_database_id */
513 int64_t) /* transaction_id */
514
515 // WebIDBDatabase::~WebIDBCursor() message. 179 // WebIDBDatabase::~WebIDBCursor() message.
516 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_CursorDestroyed, 180 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_CursorDestroyed,
517 int32_t /* ipc_cursor_id */) 181 int32_t /* ipc_cursor_id */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698