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
3 // found in the LICENSE file.
5 // Message definition file, included multiple times, hence no include guard.
10 #include "content/common/indexed_db/indexed_db_key.h"
11 #include "content/common/indexed_db/indexed_db_key_path.h"
12 #include "content/common/indexed_db/indexed_db_key_range.h"
13 #include "content/common/indexed_db/indexed_db_param_traits.h"
14 #include "ipc/ipc_message_macros.h"
15 #include "ipc/ipc_param_traits.h"
16 #include "third_party/WebKit/public/platform/WebIDBCursor.h"
17 #include "third_party/WebKit/public/platform/WebIDBDatabase.h"
19 #undef IPC_MESSAGE_EXPORT
20 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
21 #define IPC_MESSAGE_START IndexedDBMsgStart
23 // Argument structures used in messages
25 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBCursor::Direction
,
26 blink::WebIDBCursor::DirectionLast
)
27 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBDatabase::PutMode
,
28 blink::WebIDBDatabase::PutModeLast
)
29 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBDatabase::TaskType
,
30 blink::WebIDBDatabase::TaskTypeLast
)
31 IPC_ENUM_TRAITS(blink::WebIDBDatabase::TransactionMode
)
33 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBDataLoss
, blink::WebIDBDataLossTotal
)
35 // An index id, and corresponding set of keys to insert.
36 typedef std::pair
<int64
, std::vector
<content::IndexedDBKey
> > IndexKeys
;
38 // Used to enumerate indexed databases.
39 IPC_STRUCT_BEGIN(IndexedDBHostMsg_FactoryGetDatabaseNames_Params
)
40 // The response should have these ids.
41 IPC_STRUCT_MEMBER(int32
, ipc_thread_id
)
42 IPC_STRUCT_MEMBER(int32
, ipc_callbacks_id
)
43 // The string id of the origin doing the initiating.
44 IPC_STRUCT_MEMBER(std::string
, database_identifier
)
47 // Used to open an indexed database.
48 IPC_STRUCT_BEGIN(IndexedDBHostMsg_FactoryOpen_Params
)
49 // The response should have these ids.
50 IPC_STRUCT_MEMBER(int32
, ipc_thread_id
)
51 // Identifier of the request
52 IPC_STRUCT_MEMBER(int32
, ipc_callbacks_id
)
53 // Identifier for database callbacks
54 IPC_STRUCT_MEMBER(int32
, ipc_database_callbacks_id
)
55 // The string id of the origin doing the initiating.
56 IPC_STRUCT_MEMBER(std::string
, database_identifier
)
57 // The name of the database.
58 IPC_STRUCT_MEMBER(base::string16
, name
)
59 // The transaction id used if a database upgrade is needed.
60 IPC_STRUCT_MEMBER(int64
, transaction_id
)
61 // The requested version of the database.
62 IPC_STRUCT_MEMBER(int64
, version
)
65 // Used to delete an indexed database.
66 IPC_STRUCT_BEGIN(IndexedDBHostMsg_FactoryDeleteDatabase_Params
)
67 // The response should have these ids.
68 IPC_STRUCT_MEMBER(int32
, ipc_thread_id
)
69 IPC_STRUCT_MEMBER(int32
, ipc_callbacks_id
)
70 // The string id of the origin doing the initiating.
71 IPC_STRUCT_MEMBER(std::string
, database_identifier
)
72 // The name of the database.
73 IPC_STRUCT_MEMBER(base::string16
, name
)
76 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCreateTransaction_Params
)
77 IPC_STRUCT_MEMBER(int32
, ipc_thread_id
)
78 // The database the object store belongs to.
79 IPC_STRUCT_MEMBER(int32
, ipc_database_id
)
80 // The transaction id as minted by the frontend.
81 IPC_STRUCT_MEMBER(int64
, transaction_id
)
82 // To get to WebIDBDatabaseCallbacks.
83 IPC_STRUCT_MEMBER(int32
, ipc_database_callbacks_id
)
84 // The scope of the transaction.
85 IPC_STRUCT_MEMBER(std::vector
<int64
>, object_store_ids
)
86 // The transaction mode.
87 IPC_STRUCT_MEMBER(blink::WebIDBDatabase::TransactionMode
, mode
)
90 // Used to create an object store.
91 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCreateObjectStore_Params
)
92 // The database the object store belongs to.
93 IPC_STRUCT_MEMBER(int32
, ipc_database_id
)
94 // The transaction its associated with.
95 IPC_STRUCT_MEMBER(int64
, transaction_id
)
96 // The storage id of the object store.
97 IPC_STRUCT_MEMBER(int64
, object_store_id
)
98 // The name of the object store.
99 IPC_STRUCT_MEMBER(base::string16
, name
)
100 // The keyPath of the object store.
101 IPC_STRUCT_MEMBER(content::IndexedDBKeyPath
, key_path
)
102 // Whether the object store created should have a key generator.
103 IPC_STRUCT_MEMBER(bool, auto_increment
)
106 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseGet_Params
)
107 IPC_STRUCT_MEMBER(int32
, ipc_thread_id
)
108 // The id any response should contain.
109 IPC_STRUCT_MEMBER(int32
, ipc_callbacks_id
)
110 // The database the object store belongs to.
111 IPC_STRUCT_MEMBER(int32
, ipc_database_id
)
112 // The transaction its associated with.
113 IPC_STRUCT_MEMBER(int64
, transaction_id
)
114 // The object store's id.
115 IPC_STRUCT_MEMBER(int64
, object_store_id
)
117 IPC_STRUCT_MEMBER(int64
, index_id
)
118 // The serialized key range.
119 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange
, key_range
)
120 // If this is just retrieving the key
121 IPC_STRUCT_MEMBER(bool, key_only
)
124 IPC_STRUCT_BEGIN(IndexedDBMsg_BlobOrFileInfo
)
125 IPC_STRUCT_MEMBER(bool, is_file
)
126 IPC_STRUCT_MEMBER(std::string
, uuid
)
127 IPC_STRUCT_MEMBER(base::string16
, mime_type
)
128 IPC_STRUCT_MEMBER(uint64
, size
)
129 IPC_STRUCT_MEMBER(base::string16
, file_path
)
130 IPC_STRUCT_MEMBER(base::string16
, file_name
)
131 IPC_STRUCT_MEMBER(double, last_modified
)
134 // Used to set a value in an object store.
135 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabasePut_Params
)
136 // The id any response should contain.
137 IPC_STRUCT_MEMBER(int32
, ipc_thread_id
)
138 IPC_STRUCT_MEMBER(int32
, ipc_callbacks_id
)
139 // The database the object store belongs to.
140 IPC_STRUCT_MEMBER(int32
, ipc_database_id
)
141 // The transaction it's associated with.
142 IPC_STRUCT_MEMBER(int64
, transaction_id
)
143 // The object store's id.
144 IPC_STRUCT_MEMBER(int64
, object_store_id
)
146 IPC_STRUCT_MEMBER(int64
, index_id
)
148 IPC_STRUCT_MEMBER(std::string
, value
)
149 // The key to set it on (may not be "valid"/set in some cases).
150 IPC_STRUCT_MEMBER(content::IndexedDBKey
, key
)
151 // Whether this is an add or a put.
152 IPC_STRUCT_MEMBER(blink::WebIDBDatabase::PutMode
, put_mode
)
153 // The index ids and the list of keys for each index.
154 IPC_STRUCT_MEMBER(std::vector
<IndexKeys
>, index_keys
)
155 // Sideband data for any blob or file encoded in value.
156 IPC_STRUCT_MEMBER(std::vector
<IndexedDBMsg_BlobOrFileInfo
>, blob_or_file_info
)
159 // Used to open both cursors and object cursors in IndexedDB.
160 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseOpenCursor_Params
)
161 // The response should have these ids.
162 IPC_STRUCT_MEMBER(int32
, ipc_thread_id
)
163 IPC_STRUCT_MEMBER(int32
, ipc_callbacks_id
)
164 // The database the object store belongs to.
165 IPC_STRUCT_MEMBER(int32
, ipc_database_id
)
166 // The transaction this request belongs to.
167 IPC_STRUCT_MEMBER(int64
, transaction_id
)
169 IPC_STRUCT_MEMBER(int64
, object_store_id
)
171 IPC_STRUCT_MEMBER(int64
, index_id
)
172 // The serialized key range.
173 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange
, key_range
)
174 // The direction of this cursor.
175 IPC_STRUCT_MEMBER(blink::WebIDBCursor::Direction
, direction
)
176 // If this is just retrieving the key
177 IPC_STRUCT_MEMBER(bool, key_only
)
178 // The priority of this cursor.
179 IPC_STRUCT_MEMBER(blink::WebIDBDatabase::TaskType
, task_type
)
182 // Used to open both cursors and object cursors in IndexedDB.
183 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCount_Params
)
184 // The response should have these ids.
185 IPC_STRUCT_MEMBER(int32
, ipc_thread_id
)
186 IPC_STRUCT_MEMBER(int32
, ipc_callbacks_id
)
187 // The transaction this request belongs to.
188 IPC_STRUCT_MEMBER(int64
, transaction_id
)
189 // The IPC id of the database.
190 IPC_STRUCT_MEMBER(int32
, ipc_database_id
)
192 IPC_STRUCT_MEMBER(int64
, object_store_id
)
194 IPC_STRUCT_MEMBER(int64
, index_id
)
195 // The serialized key range.
196 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange
, key_range
)
199 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseDeleteRange_Params
)
200 // The response should have these ids.
201 IPC_STRUCT_MEMBER(int32
, ipc_thread_id
)
202 IPC_STRUCT_MEMBER(int32
, ipc_callbacks_id
)
203 // The IPC id of the database.
204 IPC_STRUCT_MEMBER(int32
, ipc_database_id
)
205 // The transaction this request belongs to.
206 IPC_STRUCT_MEMBER(int64
, transaction_id
)
208 IPC_STRUCT_MEMBER(int64
, object_store_id
)
209 // The serialized key range.
210 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange
, key_range
)
213 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseSetIndexKeys_Params
)
214 // The IPC id of the database.
215 IPC_STRUCT_MEMBER(int32
, ipc_database_id
)
216 // The transaction this request belongs to.
217 IPC_STRUCT_MEMBER(int64
, transaction_id
)
218 // The object store's id.
219 IPC_STRUCT_MEMBER(int64
, object_store_id
)
220 // The object store key that we're setting index keys for.
221 IPC_STRUCT_MEMBER(content::IndexedDBKey
, primary_key
)
222 // The index ids and the list of keys for each index.
223 IPC_STRUCT_MEMBER(std::vector
<IndexKeys
>, index_keys
)
226 // Used to create an index.
227 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCreateIndex_Params
)
228 // The transaction this is associated with.
229 IPC_STRUCT_MEMBER(int64
, transaction_id
)
230 // The database being used.
231 IPC_STRUCT_MEMBER(int32
, ipc_database_id
)
232 // The object store the index belongs to.
233 IPC_STRUCT_MEMBER(int64
, object_store_id
)
234 // The storage id of the index.
235 IPC_STRUCT_MEMBER(int64
, index_id
)
236 // The name of the index.
237 IPC_STRUCT_MEMBER(base::string16
, name
)
238 // The keyPath of the index.
239 IPC_STRUCT_MEMBER(content::IndexedDBKeyPath
, key_path
)
240 // Whether the index created has unique keys.
241 IPC_STRUCT_MEMBER(bool, unique
)
242 // Whether the index created produces keys for each array entry.
243 IPC_STRUCT_MEMBER(bool, multi_entry
)
246 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessIDBCursor_Params
)
247 IPC_STRUCT_MEMBER(int32
, ipc_thread_id
)
248 IPC_STRUCT_MEMBER(int32
, ipc_callbacks_id
)
249 IPC_STRUCT_MEMBER(int32
, ipc_cursor_id
)
250 IPC_STRUCT_MEMBER(content::IndexedDBKey
, key
)
251 IPC_STRUCT_MEMBER(content::IndexedDBKey
, primary_key
)
252 IPC_STRUCT_MEMBER(std::string
, value
)
253 // Sideband data for any blob or file encoded in value.
254 IPC_STRUCT_MEMBER(std::vector
<IndexedDBMsg_BlobOrFileInfo
>, blob_or_file_info
)
257 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessCursorContinue_Params
)
258 IPC_STRUCT_MEMBER(int32
, ipc_thread_id
)
259 IPC_STRUCT_MEMBER(int32
, ipc_callbacks_id
)
260 IPC_STRUCT_MEMBER(int32
, ipc_cursor_id
)
261 IPC_STRUCT_MEMBER(content::IndexedDBKey
, key
)
262 IPC_STRUCT_MEMBER(content::IndexedDBKey
, primary_key
)
263 IPC_STRUCT_MEMBER(std::string
, value
)
264 // Sideband data for any blob or file encoded in value.
265 IPC_STRUCT_MEMBER(std::vector
<IndexedDBMsg_BlobOrFileInfo
>, blob_or_file_info
)
268 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params
)
269 IPC_STRUCT_MEMBER(int32
, ipc_thread_id
)
270 IPC_STRUCT_MEMBER(int32
, ipc_callbacks_id
)
271 IPC_STRUCT_MEMBER(int32
, ipc_cursor_id
)
272 IPC_STRUCT_MEMBER(std::vector
<content::IndexedDBKey
>, keys
)
273 IPC_STRUCT_MEMBER(std::vector
<content::IndexedDBKey
>, primary_keys
)
274 IPC_STRUCT_MEMBER(std::vector
<std::string
>, values
)
275 // Sideband data for any blob or file encoded in value.
276 IPC_STRUCT_MEMBER(std::vector
<std::vector
<IndexedDBMsg_BlobOrFileInfo
> >,
280 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessValue_Params
)
281 IPC_STRUCT_MEMBER(int32
, ipc_thread_id
)
282 IPC_STRUCT_MEMBER(int32
, ipc_callbacks_id
)
283 IPC_STRUCT_MEMBER(std::string
, value
)
284 // Sideband data for any blob or file encoded in value.
285 IPC_STRUCT_MEMBER(std::vector
<IndexedDBMsg_BlobOrFileInfo
>, blob_or_file_info
)
288 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessValueWithKey_Params
)
289 IPC_STRUCT_MEMBER(int32
, ipc_thread_id
)
290 IPC_STRUCT_MEMBER(int32
, ipc_callbacks_id
)
291 IPC_STRUCT_MEMBER(std::string
, value
)
292 IPC_STRUCT_MEMBER(content::IndexedDBKey
, primary_key
)
293 IPC_STRUCT_MEMBER(content::IndexedDBKeyPath
, key_path
)
294 // Sideband data for any blob or file encoded in value.
295 IPC_STRUCT_MEMBER(std::vector
<IndexedDBMsg_BlobOrFileInfo
>, blob_or_file_info
)
298 IPC_STRUCT_BEGIN(IndexedDBIndexMetadata
)
299 IPC_STRUCT_MEMBER(int64
, id
)
300 IPC_STRUCT_MEMBER(base::string16
, name
)
301 IPC_STRUCT_MEMBER(content::IndexedDBKeyPath
, keyPath
)
302 IPC_STRUCT_MEMBER(bool, unique
)
303 IPC_STRUCT_MEMBER(bool, multiEntry
)
306 IPC_STRUCT_BEGIN(IndexedDBObjectStoreMetadata
)
307 IPC_STRUCT_MEMBER(int64
, id
)
308 IPC_STRUCT_MEMBER(base::string16
, name
)
309 IPC_STRUCT_MEMBER(content::IndexedDBKeyPath
, keyPath
)
310 IPC_STRUCT_MEMBER(bool, autoIncrement
)
311 IPC_STRUCT_MEMBER(int64
, max_index_id
)
312 IPC_STRUCT_MEMBER(std::vector
<IndexedDBIndexMetadata
>, indexes
)
315 IPC_STRUCT_BEGIN(IndexedDBDatabaseMetadata
)
316 IPC_STRUCT_MEMBER(int64
, id
)
317 IPC_STRUCT_MEMBER(base::string16
, name
)
318 IPC_STRUCT_MEMBER(base::string16
, version
)
319 IPC_STRUCT_MEMBER(int64
, int_version
)
320 IPC_STRUCT_MEMBER(int64
, max_object_store_id
)
321 IPC_STRUCT_MEMBER(std::vector
<IndexedDBObjectStoreMetadata
>, object_stores
)
324 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksUpgradeNeeded_Params
)
325 IPC_STRUCT_MEMBER(int32
, ipc_thread_id
)
326 IPC_STRUCT_MEMBER(int32
, ipc_callbacks_id
)
327 IPC_STRUCT_MEMBER(int32
, ipc_database_callbacks_id
)
328 IPC_STRUCT_MEMBER(int32
, ipc_database_id
)
329 IPC_STRUCT_MEMBER(int64
, old_version
)
330 IPC_STRUCT_MEMBER(blink::WebIDBDataLoss
, data_loss
)
331 IPC_STRUCT_MEMBER(std::string
, data_loss_message
)
332 IPC_STRUCT_MEMBER(IndexedDBDatabaseMetadata
, idb_metadata
)
335 // Indexed DB messages sent from the browser to the renderer.
337 // The thread_id needs to be the first parameter in these messages. In the IO
338 // thread on the renderer/client process, an IDB message filter assumes the
339 // thread_id is the first int.
341 // IDBCallback message handlers.
342 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessIDBCursor
,
343 IndexedDBMsg_CallbacksSuccessIDBCursor_Params
)
345 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessCursorContinue
,
346 IndexedDBMsg_CallbacksSuccessCursorContinue_Params
)
348 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessCursorAdvance
,
349 IndexedDBMsg_CallbacksSuccessCursorContinue_Params
)
351 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessCursorPrefetch
,
352 IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params
)
354 IPC_MESSAGE_CONTROL5(IndexedDBMsg_CallbacksSuccessIDBDatabase
,
355 int32
/* ipc_thread_id */,
356 int32
/* ipc_callbacks_id */,
357 int32
/* ipc_database_callbacks_id */,
358 int32
/* ipc_database_id */,
359 IndexedDBDatabaseMetadata
)
360 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessIndexedDBKey
,
361 int32
/* ipc_thread_id */,
362 int32
/* ipc_callbacks_id */,
363 content::IndexedDBKey
/* indexed_db_key */)
365 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessValue
,
366 IndexedDBMsg_CallbacksSuccessValue_Params
)
368 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessValueWithKey
,
369 IndexedDBMsg_CallbacksSuccessValueWithKey_Params
)
371 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessInteger
,
372 int32
/* ipc_thread_id */,
373 int32
/* ipc_callbacks_id */,
375 IPC_MESSAGE_CONTROL2(IndexedDBMsg_CallbacksSuccessUndefined
,
376 int32
/* ipc_thread_id */,
377 int32
/* ipc_callbacks_id */)
378 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessStringList
,
379 int32
/* ipc_thread_id */,
380 int32
/* ipc_callbacks_id */,
381 std::vector
<base::string16
> /* dom_string_list */)
382 IPC_MESSAGE_CONTROL4(IndexedDBMsg_CallbacksError
,
383 int32
/* ipc_thread_id */,
384 int32
/* ipc_callbacks_id */,
386 base::string16
/* message */)
387 IPC_MESSAGE_CONTROL2(IndexedDBMsg_CallbacksBlocked
,
388 int32
/* ipc_thread_id */,
389 int32
/* ipc_callbacks_id */)
390 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksIntBlocked
,
391 int32
/* ipc_thread_id */,
392 int32
/* ipc_callbacks_id */,
393 int64
/* existing_version */)
394 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksUpgradeNeeded
,
395 IndexedDBMsg_CallbacksUpgradeNeeded_Params
)
397 // IDBDatabaseCallback message handlers
398 IPC_MESSAGE_CONTROL2(IndexedDBMsg_DatabaseCallbacksForcedClose
,
399 int32
, /* ipc_thread_id */
400 int32
) /* ipc_database_callbacks_id */
401 IPC_MESSAGE_CONTROL4(IndexedDBMsg_DatabaseCallbacksIntVersionChange
,
402 int32
, /* ipc_thread_id */
403 int32
, /* ipc_database_callbacks_id */
404 int64
, /* old_version */
405 int64
) /* new_version */
406 IPC_MESSAGE_CONTROL5(IndexedDBMsg_DatabaseCallbacksAbort
,
407 int32
, /* ipc_thread_id */
408 int32
, /* ipc_database_callbacks_id */
409 int64
, /* transaction_id */
411 base::string16
) /* message */
412 IPC_MESSAGE_CONTROL3(IndexedDBMsg_DatabaseCallbacksComplete
,
413 int32
, /* ipc_thread_id */
414 int32
, /* ipc_database_callbacks_id */
415 int64
) /* transaction_id */
417 // Indexed DB messages sent from the renderer to the browser.
419 // WebIDBCursor::advance() message.
420 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_CursorAdvance
,
421 int32
, /* ipc_cursor_id */
422 int32
, /* ipc_thread_id */
423 int32
, /* ipc_callbacks_id */
424 unsigned long) /* count */
426 // WebIDBCursor::continue() message.
427 IPC_MESSAGE_CONTROL5(IndexedDBHostMsg_CursorContinue
,
428 int32
, /* ipc_cursor_id */
429 int32
, /* ipc_thread_id */
430 int32
, /* ipc_callbacks_id */
431 content::IndexedDBKey
, /* key */
432 content::IndexedDBKey
) /* primary_key */
434 // WebIDBCursor::prefetchContinue() message.
435 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_CursorPrefetch
,
436 int32
, /* ipc_cursor_id */
437 int32
, /* ipc_thread_id */
438 int32
, /* ipc_callbacks_id */
441 // WebIDBCursor::prefetchReset() message.
442 IPC_MESSAGE_CONTROL3(IndexedDBHostMsg_CursorPrefetchReset
,
443 int32
, /* ipc_cursor_id */
444 int32
, /* used_prefetches */
445 int32
) /* used_prefetches */
447 // WebIDBFactory::getDatabaseNames() message.
448 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_FactoryGetDatabaseNames
,
449 IndexedDBHostMsg_FactoryGetDatabaseNames_Params
)
451 // WebIDBFactory::open() message.
452 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_FactoryOpen
,
453 IndexedDBHostMsg_FactoryOpen_Params
)
455 // WebIDBFactory::deleteDatabase() message.
456 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_FactoryDeleteDatabase
,
457 IndexedDBHostMsg_FactoryDeleteDatabase_Params
)
459 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_AckReceivedBlobs
,
460 std::vector
<std::string
>) /* uuids */
462 // WebIDBDatabase::createObjectStore() message.
463 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseCreateObjectStore
,
464 IndexedDBHostMsg_DatabaseCreateObjectStore_Params
)
466 // WebIDBDatabase::deleteObjectStore() message.
467 IPC_MESSAGE_CONTROL3(IndexedDBHostMsg_DatabaseDeleteObjectStore
,
468 int32
, /* ipc_database_id */
469 int64
, /* transaction_id */
470 int64
) /* object_store_id */
472 // WebIDBDatabase::createTransaction() message.
473 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseCreateTransaction
,
474 IndexedDBHostMsg_DatabaseCreateTransaction_Params
)
476 // WebIDBDatabase::close() message.
477 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseClose
,
478 int32
/* ipc_database_callbacks_id */)
480 // WebIDBDatabase::~WebIDBDatabase() message.
481 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseDestroyed
,
482 int32
/* ipc_database_id */)
484 // WebIDBDatabase::get() message.
485 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseGet
,
486 IndexedDBHostMsg_DatabaseGet_Params
)
488 // WebIDBDatabase::put() message.
489 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabasePut
,
490 IndexedDBHostMsg_DatabasePut_Params
)
492 // WebIDBDatabase::setIndexKeys() message.
493 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseSetIndexKeys
,
494 IndexedDBHostMsg_DatabaseSetIndexKeys_Params
)
496 // WebIDBDatabase::setIndexesReady() message.
497 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_DatabaseSetIndexesReady
,
498 int32
, /* ipc_database_id */
499 int64
, /* transaction_id */
500 int64
, /* object_store_id */
501 std::vector
<int64
>) /* index_ids */
503 // WebIDBDatabase::openCursor() message.
504 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseOpenCursor
,
505 IndexedDBHostMsg_DatabaseOpenCursor_Params
)
507 // WebIDBDatabase::count() message.
508 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseCount
,
509 IndexedDBHostMsg_DatabaseCount_Params
)
511 // WebIDBDatabase::deleteRange() message.
512 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseDeleteRange
,
513 IndexedDBHostMsg_DatabaseDeleteRange_Params
)
515 // WebIDBDatabase::clear() message.
516 IPC_MESSAGE_CONTROL5(IndexedDBHostMsg_DatabaseClear
,
517 int32
, /* ipc_thread_id */
518 int32
, /* ipc_callbacks_id */
519 int32
, /* ipc_database_id */
520 int64
, /* transaction_id */
521 int64
) /* object_store_id */
523 // WebIDBDatabase::createIndex() message.
524 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseCreateIndex
,
525 IndexedDBHostMsg_DatabaseCreateIndex_Params
)
527 // WebIDBDatabase::deleteIndex() message.
528 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_DatabaseDeleteIndex
,
529 int32
, /* ipc_database_id */
530 int64
, /* transaction_id */
531 int64
, /* object_store_id */
532 int64
) /* index_id */
534 // WebIDBDatabase::abort() message.
535 IPC_MESSAGE_CONTROL2(IndexedDBHostMsg_DatabaseAbort
,
536 int32
, /* ipc_database_id */
537 int64
) /* transaction_id */
539 // WebIDBDatabase::commit() message.
540 IPC_MESSAGE_CONTROL2(IndexedDBHostMsg_DatabaseCommit
,
541 int32
, /* ipc_database_id */
542 int64
) /* transaction_id */
544 // WebIDBDatabase::~WebIDBCursor() message.
545 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_CursorDestroyed
,
546 int32
/* ipc_cursor_id */)