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