Home | History | Annotate | Download | only in indexed_db
      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(IndexedDBDatabaseMetadata, idb_metadata)
    293 IPC_STRUCT_END()
    294 
    295 // Indexed DB messages sent from the browser to the renderer.
    296 
    297 // The thread_id needs to be the first parameter in these messages.  In the IO
    298 // thread on the renderer/client process, an IDB message filter assumes the
    299 // thread_id is the first int.
    300 
    301 // IDBCallback message handlers.
    302 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessIDBCursor,
    303                      IndexedDBMsg_CallbacksSuccessIDBCursor_Params)
    304 
    305 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessCursorContinue,
    306                      IndexedDBMsg_CallbacksSuccessCursorContinue_Params)
    307 
    308 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessCursorAdvance,
    309                      IndexedDBMsg_CallbacksSuccessCursorContinue_Params)
    310 
    311 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessCursorPrefetch,
    312                      IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params)
    313 
    314 IPC_MESSAGE_CONTROL5(IndexedDBMsg_CallbacksSuccessIDBDatabase,
    315                      int32 /* ipc_thread_id */,
    316                      int32 /* ipc_callbacks_id */,
    317                      int32 /* ipc_database_callbacks_id */,
    318                      int32 /* ipc_database_id */,
    319                      IndexedDBDatabaseMetadata)
    320 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessIndexedDBKey,
    321                      int32 /* ipc_thread_id */,
    322                      int32 /* ipc_callbacks_id */,
    323                      content::IndexedDBKey /* indexed_db_key */)
    324 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessValue,
    325                      int32 /* ipc_thread_id */,
    326                      int32 /* ipc_callbacks_id */,
    327                      std::string /* value */)
    328 IPC_MESSAGE_CONTROL5(IndexedDBMsg_CallbacksSuccessValueWithKey,
    329                      int32 /* ipc_thread_id */,
    330                      int32 /* ipc_callbacks_id */,
    331                      std::string /* value */,
    332                      content::IndexedDBKey /* indexed_db_key */,
    333                      content::IndexedDBKeyPath /* indexed_db_keypath */)
    334 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessInteger,
    335                      int32 /* ipc_thread_id */,
    336                      int32 /* ipc_callbacks_id */,
    337                      int64 /* value */)
    338 IPC_MESSAGE_CONTROL2(IndexedDBMsg_CallbacksSuccessUndefined,
    339                      int32 /* ipc_thread_id */,
    340                      int32 /* ipc_callbacks_id */)
    341 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessStringList,
    342                      int32 /* ipc_thread_id */,
    343                      int32 /* ipc_callbacks_id */,
    344                      std::vector<string16> /* dom_string_list */)
    345 IPC_MESSAGE_CONTROL4(IndexedDBMsg_CallbacksError,
    346                      int32 /* ipc_thread_id */,
    347                      int32 /* ipc_callbacks_id */,
    348                      int /* code */,
    349                      string16 /* message */)
    350 IPC_MESSAGE_CONTROL2(IndexedDBMsg_CallbacksBlocked,
    351                      int32 /* ipc_thread_id */,
    352                      int32 /* ipc_callbacks_id */)
    353 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksIntBlocked,
    354                      int32 /* ipc_thread_id */,
    355                      int32 /* ipc_callbacks_id */,
    356                      int64 /* existing_version */)
    357 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksUpgradeNeeded,
    358                      IndexedDBMsg_CallbacksUpgradeNeeded_Params)
    359 
    360 // IDBDatabaseCallback message handlers
    361 IPC_MESSAGE_CONTROL2(IndexedDBMsg_DatabaseCallbacksForcedClose,
    362                      int32, /* ipc_thread_id */
    363                      int32) /* ipc_database_callbacks_id */
    364 IPC_MESSAGE_CONTROL4(IndexedDBMsg_DatabaseCallbacksIntVersionChange,
    365                      int32, /* ipc_thread_id */
    366                      int32, /* ipc_database_callbacks_id */
    367                      int64, /* old_version */
    368                      int64) /* new_version */
    369 IPC_MESSAGE_CONTROL5(IndexedDBMsg_DatabaseCallbacksAbort,
    370                      int32, /* ipc_thread_id */
    371                      int32, /* ipc_database_callbacks_id */
    372                      int64, /* transaction_id */
    373                      int, /* code */
    374                      string16) /* message */
    375 IPC_MESSAGE_CONTROL3(IndexedDBMsg_DatabaseCallbacksComplete,
    376                      int32, /* ipc_thread_id */
    377                      int32, /* ipc_database_callbacks_id */
    378                      int64) /* transaction_id */
    379 
    380 // Indexed DB messages sent from the renderer to the browser.
    381 
    382 // WebIDBCursor::advance() message.
    383 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_CursorAdvance,
    384                      int32, /* ipc_cursor_id */
    385                      int32, /* ipc_thread_id */
    386                      int32, /* ipc_callbacks_id */
    387                      unsigned long) /* count */
    388 
    389 // WebIDBCursor::continue() message.
    390 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_CursorContinue,
    391                      int32, /* ipc_cursor_id */
    392                      int32, /* ipc_thread_id */
    393                      int32, /* ipc_callbacks_id */
    394                      content::IndexedDBKey) /* key */
    395 
    396 // WebIDBCursor::prefetchContinue() message.
    397 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_CursorPrefetch,
    398                      int32, /* ipc_cursor_id */
    399                      int32, /* ipc_thread_id */
    400                      int32, /* ipc_callbacks_id */
    401                      int32) /* n */
    402 
    403 // WebIDBCursor::prefetchReset() message.
    404 IPC_MESSAGE_CONTROL3(IndexedDBHostMsg_CursorPrefetchReset,
    405                      int32, /* ipc_cursor_id */
    406                      int32, /* used_prefetches */
    407                      int32)  /* used_prefetches */
    408 
    409 // WebIDBFactory::getDatabaseNames() message.
    410 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_FactoryGetDatabaseNames,
    411                      IndexedDBHostMsg_FactoryGetDatabaseNames_Params)
    412 
    413 // WebIDBFactory::open() message.
    414 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_FactoryOpen,
    415                      IndexedDBHostMsg_FactoryOpen_Params)
    416 
    417 // WebIDBFactory::deleteDatabase() message.
    418 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_FactoryDeleteDatabase,
    419                      IndexedDBHostMsg_FactoryDeleteDatabase_Params)
    420 
    421 // WebIDBDatabase::createObjectStore() message.
    422 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseCreateObjectStore,
    423                      IndexedDBHostMsg_DatabaseCreateObjectStore_Params)
    424 
    425 // WebIDBDatabase::deleteObjectStore() message.
    426 IPC_MESSAGE_CONTROL3(IndexedDBHostMsg_DatabaseDeleteObjectStore,
    427                      int32, /* ipc_database_id */
    428                      int64, /* transaction_id */
    429                      int64) /* object_store_id */
    430 
    431 // WebIDBDatabase::createTransaction() message.
    432 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseCreateTransaction,
    433                      IndexedDBHostMsg_DatabaseCreateTransaction_Params)
    434 
    435 // WebIDBDatabase::close() message.
    436 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseClose,
    437                      int32 /* ipc_database_callbacks_id */)
    438 
    439 // WebIDBDatabase::~WebIDBDatabase() message.
    440 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseDestroyed,
    441                      int32 /* ipc_database_id */)
    442 
    443 // WebIDBDatabase::get() message.
    444 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseGet,
    445                      IndexedDBHostMsg_DatabaseGet_Params)
    446 
    447 // WebIDBDatabase::put() message.
    448 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabasePut,
    449                      IndexedDBHostMsg_DatabasePut_Params)
    450 
    451 // WebIDBDatabase::setIndexKeys() message.
    452 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseSetIndexKeys,
    453                      IndexedDBHostMsg_DatabaseSetIndexKeys_Params)
    454 
    455 // WebIDBDatabase::setIndexesReady() message.
    456 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_DatabaseSetIndexesReady,
    457                      int32, /* ipc_database_id */
    458                      int64, /* transaction_id */
    459                      int64, /* object_store_id */
    460                      std::vector<int64>) /* index_ids */
    461 
    462 // WebIDBDatabase::openCursor() message.
    463 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseOpenCursor,
    464                      IndexedDBHostMsg_DatabaseOpenCursor_Params)
    465 
    466 // WebIDBDatabase::count() message.
    467 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseCount,
    468                      IndexedDBHostMsg_DatabaseCount_Params)
    469 
    470 // WebIDBDatabase::deleteRange() message.
    471 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseDeleteRange,
    472                      IndexedDBHostMsg_DatabaseDeleteRange_Params)
    473 
    474 // WebIDBDatabase::clear() message.
    475 IPC_MESSAGE_CONTROL5(IndexedDBHostMsg_DatabaseClear,
    476                      int32, /* ipc_thread_id */
    477                      int32, /* ipc_callbacks_id */
    478                      int32, /* ipc_database_id */
    479                      int64, /* transaction_id */
    480                      int64) /* object_store_id */
    481 
    482 // WebIDBDatabase::createIndex() message.
    483 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseCreateIndex,
    484                      IndexedDBHostMsg_DatabaseCreateIndex_Params)
    485 
    486 // WebIDBDatabase::deleteIndex() message.
    487 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_DatabaseDeleteIndex,
    488                      int32, /* ipc_database_id */
    489                      int64, /* transaction_id */
    490                      int64, /* object_store_id */
    491                      int64) /* index_id */
    492 
    493 // WebIDBDatabase::abort() message.
    494 IPC_MESSAGE_CONTROL2(IndexedDBHostMsg_DatabaseAbort,
    495                      int32, /* ipc_database_id */
    496                      int64) /* transaction_id */
    497 
    498 // WebIDBDatabase::commit() message.
    499 IPC_MESSAGE_CONTROL2(IndexedDBHostMsg_DatabaseCommit,
    500                      int32, /* ipc_database_id */
    501                      int64) /* transaction_id */
    502 
    503 // WebIDBDatabase::~WebIDBCursor() message.
    504 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_CursorDestroyed,
    505                      int32 /* ipc_cursor_id */)
    506 
    507