- add sources.
[platform/framework/web/crosswalk.git] / src / content / common / indexed_db / indexed_db_messages.h
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.
4
5 // Message definition file, included multiple times, hence no include guard.
6
7 #include <vector>
8
9 #include "content/common/indexed_db/indexed_db_key.h"
10 #include "content/common/indexed_db/indexed_db_key_path.h"
11 #include "content/common/indexed_db/indexed_db_key_range.h"
12 #include "content/common/indexed_db/indexed_db_param_traits.h"
13 #include "ipc/ipc_message_macros.h"
14 #include "ipc/ipc_param_traits.h"
15 #include "third_party/WebKit/public/platform/WebIDBCursor.h"
16 #include "third_party/WebKit/public/platform/WebIDBDatabase.h"
17
18 #define IPC_MESSAGE_START IndexedDBMsgStart
19
20 // Argument structures used in messages
21
22 IPC_ENUM_TRAITS(WebKit::WebIDBCursor::Direction)
23 IPC_ENUM_TRAITS(WebKit::WebIDBDatabase::PutMode)
24 IPC_ENUM_TRAITS(WebKit::WebIDBDatabase::TaskType)
25
26 IPC_ENUM_TRAITS_MAX_VALUE(WebKit::WebIDBCallbacks::DataLoss,
27                           WebKit::WebIDBCallbacks::DataLossTotal)
28
29 // Used to enumerate indexed databases.
30 IPC_STRUCT_BEGIN(IndexedDBHostMsg_FactoryGetDatabaseNames_Params)
31   // The response should have these ids.
32   IPC_STRUCT_MEMBER(int32, ipc_thread_id)
33   IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
34   // The string id of the origin doing the initiating.
35   IPC_STRUCT_MEMBER(std::string, database_identifier)
36 IPC_STRUCT_END()
37
38 // Used to open an indexed database.
39 IPC_STRUCT_BEGIN(IndexedDBHostMsg_FactoryOpen_Params)
40   // The response should have these ids.
41   IPC_STRUCT_MEMBER(int32, ipc_thread_id)
42   // Identifier of the request
43   IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
44   // Identifier for database callbacks
45   IPC_STRUCT_MEMBER(int32, ipc_database_callbacks_id)
46   // The string id of the origin doing the initiating.
47   IPC_STRUCT_MEMBER(std::string, database_identifier)
48   // The name of the database.
49   IPC_STRUCT_MEMBER(string16, name)
50   // The transaction id used if a database upgrade is needed.
51   IPC_STRUCT_MEMBER(int64, transaction_id)
52   // The requested version of the database.
53   IPC_STRUCT_MEMBER(int64, version)
54 IPC_STRUCT_END()
55
56 // Used to delete an indexed database.
57 IPC_STRUCT_BEGIN(IndexedDBHostMsg_FactoryDeleteDatabase_Params)
58   // The response should have these ids.
59   IPC_STRUCT_MEMBER(int32, ipc_thread_id)
60   IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
61   // The string id of the origin doing the initiating.
62   IPC_STRUCT_MEMBER(std::string, database_identifier)
63   // The name of the database.
64   IPC_STRUCT_MEMBER(string16, name)
65 IPC_STRUCT_END()
66
67 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCreateTransaction_Params)
68   IPC_STRUCT_MEMBER(int32, ipc_thread_id)
69   // The database the object store belongs to.
70   IPC_STRUCT_MEMBER(int32, ipc_database_id)
71   // The transaction id as minted by the frontend.
72   IPC_STRUCT_MEMBER(int64, transaction_id)
73   // To get to WebIDBDatabaseCallbacks.
74   IPC_STRUCT_MEMBER(int32, ipc_database_callbacks_id)
75   // The scope of the transaction.
76   IPC_STRUCT_MEMBER(std::vector<int64>, object_store_ids)
77   // The transaction mode.
78   IPC_STRUCT_MEMBER(int32, mode)
79 IPC_STRUCT_END()
80
81 // Used to create an object store.
82 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCreateObjectStore_Params)
83   // The database the object store belongs to.
84   IPC_STRUCT_MEMBER(int32, ipc_database_id)
85   // The transaction its associated with.
86   IPC_STRUCT_MEMBER(int64, transaction_id)
87   // The storage id of the object store.
88   IPC_STRUCT_MEMBER(int64, object_store_id)
89   // The name of the object store.
90   IPC_STRUCT_MEMBER(string16, name)
91   // The keyPath of the object store.
92   IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, key_path)
93   // Whether the object store created should have a key generator.
94   IPC_STRUCT_MEMBER(bool, auto_increment)
95 IPC_STRUCT_END()
96
97 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseGet_Params)
98   IPC_STRUCT_MEMBER(int32, ipc_thread_id)
99   // The id any response should contain.
100   IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
101   // The database the object store belongs to.
102   IPC_STRUCT_MEMBER(int32, ipc_database_id)
103   // The transaction its associated with.
104   IPC_STRUCT_MEMBER(int64, transaction_id)
105   // The object store's id.
106   IPC_STRUCT_MEMBER(int64, object_store_id)
107   // The index's id.
108   IPC_STRUCT_MEMBER(int64, index_id)
109   // The serialized key range.
110   IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range)
111   // If this is just retrieving the key
112   IPC_STRUCT_MEMBER(bool, key_only)
113 IPC_STRUCT_END()
114
115 // Used to set a value in an object store.
116 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabasePut_Params)
117   // The id any response should contain.
118   IPC_STRUCT_MEMBER(int32, ipc_thread_id)
119   IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
120   // The database the object store belongs to.
121   IPC_STRUCT_MEMBER(int32, ipc_database_id)
122   // The transaction it's associated with.
123   IPC_STRUCT_MEMBER(int64, transaction_id)
124   // The object store's id.
125   IPC_STRUCT_MEMBER(int64, object_store_id)
126   // The index's id.
127   IPC_STRUCT_MEMBER(int64, index_id)
128   // The value to set.
129   IPC_STRUCT_MEMBER(std::string, value)
130   // The key to set it on (may not be "valid"/set in some cases).
131   IPC_STRUCT_MEMBER(content::IndexedDBKey, key)
132   // Whether this is an add or a put.
133   IPC_STRUCT_MEMBER(WebKit::WebIDBDatabase::PutMode, put_mode)
134   // The names of the indexes used below.
135   IPC_STRUCT_MEMBER(std::vector<int64>, index_ids)
136   // The keys for each index, such that each inner vector corresponds
137   // to each index named in index_names, respectively.
138   IPC_STRUCT_MEMBER(std::vector<std::vector<content::IndexedDBKey> >,
139                     index_keys)
140 IPC_STRUCT_END()
141
142 // Used to open both cursors and object cursors in IndexedDB.
143 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseOpenCursor_Params)
144   // The response should have these ids.
145   IPC_STRUCT_MEMBER(int32, ipc_thread_id)
146   IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
147   // The database the object store belongs to.
148   IPC_STRUCT_MEMBER(int32, ipc_database_id)
149   // The transaction this request belongs to.
150   IPC_STRUCT_MEMBER(int64, transaction_id)
151   // The object store.
152   IPC_STRUCT_MEMBER(int64, object_store_id)
153   // The index if any.
154   IPC_STRUCT_MEMBER(int64, index_id)
155   // The serialized key range.
156   IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range)
157   // The direction of this cursor.
158   IPC_STRUCT_MEMBER(int32, direction)
159   // If this is just retrieving the key
160   IPC_STRUCT_MEMBER(bool, key_only)
161   // The priority of this cursor.
162   IPC_STRUCT_MEMBER(WebKit::WebIDBDatabase::TaskType, task_type)
163 IPC_STRUCT_END()
164
165 // Used to open both cursors and object cursors in IndexedDB.
166 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCount_Params)
167   // The response should have these ids.
168   IPC_STRUCT_MEMBER(int32, ipc_thread_id)
169   IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
170   // The transaction this request belongs to.
171   IPC_STRUCT_MEMBER(int64, transaction_id)
172   // The IPC id of the database.
173   IPC_STRUCT_MEMBER(int32, ipc_database_id)
174   // The object store.
175   IPC_STRUCT_MEMBER(int64, object_store_id)
176   // The index if any.
177   IPC_STRUCT_MEMBER(int64, index_id)
178   // The serialized key range.
179   IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range)
180 IPC_STRUCT_END()
181
182 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseDeleteRange_Params)
183   // The response should have these ids.
184   IPC_STRUCT_MEMBER(int32, ipc_thread_id)
185   IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
186   // The IPC id of the database.
187   IPC_STRUCT_MEMBER(int32, ipc_database_id)
188   // The transaction this request belongs to.
189   IPC_STRUCT_MEMBER(int64, transaction_id)
190   // The object store.
191   IPC_STRUCT_MEMBER(int64, object_store_id)
192   // The serialized key range.
193   IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range)
194 IPC_STRUCT_END()
195
196 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseSetIndexKeys_Params)
197   // The IPC id of the database.
198   IPC_STRUCT_MEMBER(int32, ipc_database_id)
199   // The transaction this request belongs to.
200   IPC_STRUCT_MEMBER(int64, transaction_id)
201   // The object store's id.
202   IPC_STRUCT_MEMBER(int64, object_store_id)
203   // The object store key that we're setting index keys for.
204   IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key)
205   // The indexes that we're setting keys on.
206   IPC_STRUCT_MEMBER(std::vector<int64>, index_ids)
207   // A list of index keys for each index.
208   IPC_STRUCT_MEMBER(std::vector<std::vector<content::IndexedDBKey> >,
209                     index_keys)
210 IPC_STRUCT_END()
211
212 // Used to create an index.
213 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCreateIndex_Params)
214   // The transaction this is associated with.
215   IPC_STRUCT_MEMBER(int64, transaction_id)
216   // The database being used.
217   IPC_STRUCT_MEMBER(int32, ipc_database_id)
218   // The object store the index belongs to.
219   IPC_STRUCT_MEMBER(int64, object_store_id)
220   // The storage id of the index.
221   IPC_STRUCT_MEMBER(int64, index_id)
222   // The name of the index.
223   IPC_STRUCT_MEMBER(string16, name)
224   // The keyPath of the index.
225   IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, key_path)
226   // Whether the index created has unique keys.
227   IPC_STRUCT_MEMBER(bool, unique)
228   // Whether the index created produces keys for each array entry.
229   IPC_STRUCT_MEMBER(bool, multi_entry)
230 IPC_STRUCT_END()
231
232 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessIDBCursor_Params)
233   IPC_STRUCT_MEMBER(int32, ipc_thread_id)
234   IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
235   IPC_STRUCT_MEMBER(int32, ipc_cursor_id)
236   IPC_STRUCT_MEMBER(content::IndexedDBKey, key)
237   IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key)
238   IPC_STRUCT_MEMBER(std::string, value)
239 IPC_STRUCT_END()
240
241 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessCursorContinue_Params)
242   IPC_STRUCT_MEMBER(int32, ipc_thread_id)
243   IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
244   IPC_STRUCT_MEMBER(int32, ipc_cursor_id)
245   IPC_STRUCT_MEMBER(content::IndexedDBKey, key)
246   IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key)
247   IPC_STRUCT_MEMBER(std::string, value)
248 IPC_STRUCT_END()
249
250 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params)
251   IPC_STRUCT_MEMBER(int32, ipc_thread_id)
252   IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
253   IPC_STRUCT_MEMBER(int32, ipc_cursor_id)
254   IPC_STRUCT_MEMBER(std::vector<content::IndexedDBKey>, keys)
255   IPC_STRUCT_MEMBER(std::vector<content::IndexedDBKey>, primary_keys)
256   IPC_STRUCT_MEMBER(std::vector<std::string>, values)
257 IPC_STRUCT_END()
258
259 IPC_STRUCT_BEGIN(IndexedDBIndexMetadata)
260   IPC_STRUCT_MEMBER(int64, id)
261   IPC_STRUCT_MEMBER(string16, name)
262   IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, keyPath)
263   IPC_STRUCT_MEMBER(bool, unique)
264   IPC_STRUCT_MEMBER(bool, multiEntry)
265 IPC_STRUCT_END()
266
267 IPC_STRUCT_BEGIN(IndexedDBObjectStoreMetadata)
268   IPC_STRUCT_MEMBER(int64, id)
269   IPC_STRUCT_MEMBER(string16, name)
270   IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, keyPath)
271   IPC_STRUCT_MEMBER(bool, autoIncrement)
272   IPC_STRUCT_MEMBER(int64, max_index_id)
273   IPC_STRUCT_MEMBER(std::vector<IndexedDBIndexMetadata>, indexes)
274 IPC_STRUCT_END()
275
276 IPC_STRUCT_BEGIN(IndexedDBDatabaseMetadata)
277   IPC_STRUCT_MEMBER(int64, id)
278   IPC_STRUCT_MEMBER(string16, name)
279   IPC_STRUCT_MEMBER(string16, version)
280   IPC_STRUCT_MEMBER(int64, int_version)
281   IPC_STRUCT_MEMBER(int64, max_object_store_id)
282   IPC_STRUCT_MEMBER(std::vector<IndexedDBObjectStoreMetadata>, object_stores)
283 IPC_STRUCT_END()
284
285 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksUpgradeNeeded_Params)
286   IPC_STRUCT_MEMBER(int32, ipc_thread_id)
287   IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
288   IPC_STRUCT_MEMBER(int32, ipc_database_callbacks_id)
289   IPC_STRUCT_MEMBER(int32, ipc_database_id)
290   IPC_STRUCT_MEMBER(int64, old_version)
291   IPC_STRUCT_MEMBER(WebKit::WebIDBCallbacks::DataLoss, data_loss)
292   IPC_STRUCT_MEMBER(std::string, data_loss_message)
293   IPC_STRUCT_MEMBER(IndexedDBDatabaseMetadata, idb_metadata)
294 IPC_STRUCT_END()
295
296 // Indexed DB messages sent from the browser to the renderer.
297
298 // The thread_id needs to be the first parameter in these messages.  In the IO
299 // thread on the renderer/client process, an IDB message filter assumes the
300 // thread_id is the first int.
301
302 // IDBCallback message handlers.
303 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessIDBCursor,
304                      IndexedDBMsg_CallbacksSuccessIDBCursor_Params)
305
306 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessCursorContinue,
307                      IndexedDBMsg_CallbacksSuccessCursorContinue_Params)
308
309 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessCursorAdvance,
310                      IndexedDBMsg_CallbacksSuccessCursorContinue_Params)
311
312 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessCursorPrefetch,
313                      IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params)
314
315 IPC_MESSAGE_CONTROL5(IndexedDBMsg_CallbacksSuccessIDBDatabase,
316                      int32 /* ipc_thread_id */,
317                      int32 /* ipc_callbacks_id */,
318                      int32 /* ipc_database_callbacks_id */,
319                      int32 /* ipc_database_id */,
320                      IndexedDBDatabaseMetadata)
321 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessIndexedDBKey,
322                      int32 /* ipc_thread_id */,
323                      int32 /* ipc_callbacks_id */,
324                      content::IndexedDBKey /* indexed_db_key */)
325 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessValue,
326                      int32 /* ipc_thread_id */,
327                      int32 /* ipc_callbacks_id */,
328                      std::string /* value */)
329 IPC_MESSAGE_CONTROL5(IndexedDBMsg_CallbacksSuccessValueWithKey,
330                      int32 /* ipc_thread_id */,
331                      int32 /* ipc_callbacks_id */,
332                      std::string /* value */,
333                      content::IndexedDBKey /* indexed_db_key */,
334                      content::IndexedDBKeyPath /* indexed_db_keypath */)
335 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessInteger,
336                      int32 /* ipc_thread_id */,
337                      int32 /* ipc_callbacks_id */,
338                      int64 /* value */)
339 IPC_MESSAGE_CONTROL2(IndexedDBMsg_CallbacksSuccessUndefined,
340                      int32 /* ipc_thread_id */,
341                      int32 /* ipc_callbacks_id */)
342 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessStringList,
343                      int32 /* ipc_thread_id */,
344                      int32 /* ipc_callbacks_id */,
345                      std::vector<string16> /* dom_string_list */)
346 IPC_MESSAGE_CONTROL4(IndexedDBMsg_CallbacksError,
347                      int32 /* ipc_thread_id */,
348                      int32 /* ipc_callbacks_id */,
349                      int /* code */,
350                      string16 /* message */)
351 IPC_MESSAGE_CONTROL2(IndexedDBMsg_CallbacksBlocked,
352                      int32 /* ipc_thread_id */,
353                      int32 /* ipc_callbacks_id */)
354 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksIntBlocked,
355                      int32 /* ipc_thread_id */,
356                      int32 /* ipc_callbacks_id */,
357                      int64 /* existing_version */)
358 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksUpgradeNeeded,
359                      IndexedDBMsg_CallbacksUpgradeNeeded_Params)
360
361 // IDBDatabaseCallback message handlers
362 IPC_MESSAGE_CONTROL2(IndexedDBMsg_DatabaseCallbacksForcedClose,
363                      int32, /* ipc_thread_id */
364                      int32) /* ipc_database_callbacks_id */
365 IPC_MESSAGE_CONTROL4(IndexedDBMsg_DatabaseCallbacksIntVersionChange,
366                      int32, /* ipc_thread_id */
367                      int32, /* ipc_database_callbacks_id */
368                      int64, /* old_version */
369                      int64) /* new_version */
370 IPC_MESSAGE_CONTROL5(IndexedDBMsg_DatabaseCallbacksAbort,
371                      int32, /* ipc_thread_id */
372                      int32, /* ipc_database_callbacks_id */
373                      int64, /* transaction_id */
374                      int, /* code */
375                      string16) /* message */
376 IPC_MESSAGE_CONTROL3(IndexedDBMsg_DatabaseCallbacksComplete,
377                      int32, /* ipc_thread_id */
378                      int32, /* ipc_database_callbacks_id */
379                      int64) /* transaction_id */
380
381 // Indexed DB messages sent from the renderer to the browser.
382
383 // WebIDBCursor::advance() message.
384 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_CursorAdvance,
385                      int32, /* ipc_cursor_id */
386                      int32, /* ipc_thread_id */
387                      int32, /* ipc_callbacks_id */
388                      unsigned long) /* count */
389
390 // WebIDBCursor::continue() message.
391 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_CursorContinue,
392                      int32, /* ipc_cursor_id */
393                      int32, /* ipc_thread_id */
394                      int32, /* ipc_callbacks_id */
395                      content::IndexedDBKey) /* key */
396
397 // WebIDBCursor::prefetchContinue() message.
398 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_CursorPrefetch,
399                      int32, /* ipc_cursor_id */
400                      int32, /* ipc_thread_id */
401                      int32, /* ipc_callbacks_id */
402                      int32) /* n */
403
404 // WebIDBCursor::prefetchReset() message.
405 IPC_MESSAGE_CONTROL3(IndexedDBHostMsg_CursorPrefetchReset,
406                      int32, /* ipc_cursor_id */
407                      int32, /* used_prefetches */
408                      int32)  /* used_prefetches */
409
410 // WebIDBFactory::getDatabaseNames() message.
411 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_FactoryGetDatabaseNames,
412                      IndexedDBHostMsg_FactoryGetDatabaseNames_Params)
413
414 // WebIDBFactory::open() message.
415 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_FactoryOpen,
416                      IndexedDBHostMsg_FactoryOpen_Params)
417
418 // WebIDBFactory::deleteDatabase() message.
419 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_FactoryDeleteDatabase,
420                      IndexedDBHostMsg_FactoryDeleteDatabase_Params)
421
422 // WebIDBDatabase::createObjectStore() message.
423 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseCreateObjectStore,
424                      IndexedDBHostMsg_DatabaseCreateObjectStore_Params)
425
426 // WebIDBDatabase::deleteObjectStore() message.
427 IPC_MESSAGE_CONTROL3(IndexedDBHostMsg_DatabaseDeleteObjectStore,
428                      int32, /* ipc_database_id */
429                      int64, /* transaction_id */
430                      int64) /* object_store_id */
431
432 // WebIDBDatabase::createTransaction() message.
433 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseCreateTransaction,
434                      IndexedDBHostMsg_DatabaseCreateTransaction_Params)
435
436 // WebIDBDatabase::close() message.
437 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseClose,
438                      int32 /* ipc_database_callbacks_id */)
439
440 // WebIDBDatabase::~WebIDBDatabase() message.
441 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseDestroyed,
442                      int32 /* ipc_database_id */)
443
444 // WebIDBDatabase::get() message.
445 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseGet,
446                      IndexedDBHostMsg_DatabaseGet_Params)
447
448 // WebIDBDatabase::put() message.
449 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabasePut,
450                      IndexedDBHostMsg_DatabasePut_Params)
451
452 // WebIDBDatabase::setIndexKeys() message.
453 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseSetIndexKeys,
454                      IndexedDBHostMsg_DatabaseSetIndexKeys_Params)
455
456 // WebIDBDatabase::setIndexesReady() message.
457 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_DatabaseSetIndexesReady,
458                      int32, /* ipc_database_id */
459                      int64, /* transaction_id */
460                      int64, /* object_store_id */
461                      std::vector<int64>) /* index_ids */
462
463 // WebIDBDatabase::openCursor() message.
464 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseOpenCursor,
465                      IndexedDBHostMsg_DatabaseOpenCursor_Params)
466
467 // WebIDBDatabase::count() message.
468 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseCount,
469                      IndexedDBHostMsg_DatabaseCount_Params)
470
471 // WebIDBDatabase::deleteRange() message.
472 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseDeleteRange,
473                      IndexedDBHostMsg_DatabaseDeleteRange_Params)
474
475 // WebIDBDatabase::clear() message.
476 IPC_MESSAGE_CONTROL5(IndexedDBHostMsg_DatabaseClear,
477                      int32, /* ipc_thread_id */
478                      int32, /* ipc_callbacks_id */
479                      int32, /* ipc_database_id */
480                      int64, /* transaction_id */
481                      int64) /* object_store_id */
482
483 // WebIDBDatabase::createIndex() message.
484 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseCreateIndex,
485                      IndexedDBHostMsg_DatabaseCreateIndex_Params)
486
487 // WebIDBDatabase::deleteIndex() message.
488 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_DatabaseDeleteIndex,
489                      int32, /* ipc_database_id */
490                      int64, /* transaction_id */
491                      int64, /* object_store_id */
492                      int64) /* index_id */
493
494 // WebIDBDatabase::abort() message.
495 IPC_MESSAGE_CONTROL2(IndexedDBHostMsg_DatabaseAbort,
496                      int32, /* ipc_database_id */
497                      int64) /* transaction_id */
498
499 // WebIDBDatabase::commit() message.
500 IPC_MESSAGE_CONTROL2(IndexedDBHostMsg_DatabaseCommit,
501                      int32, /* ipc_database_id */
502                      int64) /* transaction_id */
503
504 // WebIDBDatabase::~WebIDBCursor() message.
505 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_CursorDestroyed,
506                      int32 /* ipc_cursor_id */)
507