| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Message definition file, included multiple times, hence no include guard. | 5 // Message definition file, included multiple times, hence no include guard. |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "content/common/indexed_db/indexed_db_key.h" | 9 #include "content/common/indexed_db/indexed_db_key.h" |
| 10 #include "content/common/indexed_db/indexed_db_key_path.h" | 10 #include "content/common/indexed_db/indexed_db_key_path.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 IPC_STRUCT_MEMBER(int32, response_id) | 101 IPC_STRUCT_MEMBER(int32, response_id) |
| 102 // The serialized key range. | 102 // The serialized key range. |
| 103 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range) | 103 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range) |
| 104 // The index the index belongs to. | 104 // The index the index belongs to. |
| 105 IPC_STRUCT_MEMBER(int32, idb_index_id) | 105 IPC_STRUCT_MEMBER(int32, idb_index_id) |
| 106 // The transaction this request belongs to. | 106 // The transaction this request belongs to. |
| 107 IPC_STRUCT_MEMBER(int, transaction_id) | 107 IPC_STRUCT_MEMBER(int, transaction_id) |
| 108 IPC_STRUCT_END() | 108 IPC_STRUCT_END() |
| 109 | 109 |
| 110 // Used to set a value in an object store. | 110 // Used to set a value in an object store. |
| 111 IPC_STRUCT_BEGIN(IndexedDBHostMsg_ObjectStorePutOld_Params) | |
| 112 // The object store's id. | |
| 113 IPC_STRUCT_MEMBER(int32, object_store_ipc_id) | |
| 114 // The id any response should contain. | |
| 115 IPC_STRUCT_MEMBER(int32, thread_id) | |
| 116 IPC_STRUCT_MEMBER(int32, response_id) | |
| 117 // The value to set. | |
| 118 IPC_STRUCT_MEMBER(content::SerializedScriptValue, serialized_value) | |
| 119 // The key to set it on (may not be "valid"/set in some cases). | |
| 120 IPC_STRUCT_MEMBER(content::IndexedDBKey, key) | |
| 121 // Whether this is an add or a put. | |
| 122 IPC_STRUCT_MEMBER(WebKit::WebIDBObjectStore::PutMode, put_mode) | |
| 123 // The names of the indexes used below. | |
| 124 IPC_STRUCT_MEMBER(std::vector<string16>, index_names) | |
| 125 // The keys for each index, such that each inner vector corresponds | |
| 126 // to each index named in index_names, respectively. | |
| 127 IPC_STRUCT_MEMBER(std::vector<std::vector<content::IndexedDBKey> >, | |
| 128 index_keys) | |
| 129 // The transaction it's associated with. | |
| 130 IPC_STRUCT_MEMBER(int, transaction_id) | |
| 131 IPC_STRUCT_END() | |
| 132 | |
| 133 // Used to set a value in an object store. | |
| 134 IPC_STRUCT_BEGIN(IndexedDBHostMsg_ObjectStorePut_Params) | 111 IPC_STRUCT_BEGIN(IndexedDBHostMsg_ObjectStorePut_Params) |
| 135 // The object store's id. | 112 // The object store's id. |
| 136 IPC_STRUCT_MEMBER(int32, object_store_ipc_id) | 113 IPC_STRUCT_MEMBER(int32, object_store_ipc_id) |
| 137 // The id any response should contain. | 114 // The id any response should contain. |
| 138 IPC_STRUCT_MEMBER(int32, thread_id) | 115 IPC_STRUCT_MEMBER(int32, thread_id) |
| 139 IPC_STRUCT_MEMBER(int32, response_id) | 116 IPC_STRUCT_MEMBER(int32, response_id) |
| 140 // The value to set. | 117 // The value to set. |
| 141 IPC_STRUCT_MEMBER(content::SerializedScriptValue, serialized_value) | 118 IPC_STRUCT_MEMBER(content::SerializedScriptValue, serialized_value) |
| 142 // The key to set it on (may not be "valid"/set in some cases). | 119 // The key to set it on (may not be "valid"/set in some cases). |
| 143 IPC_STRUCT_MEMBER(content::IndexedDBKey, key) | 120 IPC_STRUCT_MEMBER(content::IndexedDBKey, key) |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 int32, /* idb_database_id */ | 381 int32, /* idb_database_id */ |
| 405 IndexedDBDatabaseMetadata /* metadata */) | 382 IndexedDBDatabaseMetadata /* metadata */) |
| 406 | 383 |
| 407 // WebIDBDatabase::createObjectStore() message. | 384 // WebIDBDatabase::createObjectStore() message. |
| 408 IPC_SYNC_MESSAGE_CONTROL1_2(IndexedDBHostMsg_DatabaseCreateObjectStore, | 385 IPC_SYNC_MESSAGE_CONTROL1_2(IndexedDBHostMsg_DatabaseCreateObjectStore, |
| 409 IndexedDBHostMsg_DatabaseCreateObjectStore_Params, | 386 IndexedDBHostMsg_DatabaseCreateObjectStore_Params, |
| 410 int32, /* object_store_ipc_id */ | 387 int32, /* object_store_ipc_id */ |
| 411 WebKit::WebExceptionCode /* ec */) | 388 WebKit::WebExceptionCode /* ec */) |
| 412 | 389 |
| 413 // WebIDBDatabase::deleteObjectStore() message. | 390 // WebIDBDatabase::deleteObjectStore() message. |
| 414 IPC_SYNC_MESSAGE_CONTROL3_1(IndexedDBHostMsg_DatabaseDeleteObjectStoreOld, | |
| 415 int32, /* idb_database_id */ | |
| 416 string16, /* name */ | |
| 417 int32, /* transaction_id */ | |
| 418 WebKit::WebExceptionCode /* ec */) | |
| 419 | |
| 420 // WebIDBDatabase::deleteObjectStore() message. | |
| 421 IPC_SYNC_MESSAGE_CONTROL3_1(IndexedDBHostMsg_DatabaseDeleteObjectStore, | 391 IPC_SYNC_MESSAGE_CONTROL3_1(IndexedDBHostMsg_DatabaseDeleteObjectStore, |
| 422 int32, /* idb_database_id */ | 392 int32, /* idb_database_id */ |
| 423 int64, /* object_store_id */ | 393 int64, /* object_store_id */ |
| 424 int32, /* transaction_id */ | 394 int32, /* transaction_id */ |
| 425 WebKit::WebExceptionCode /* ec */) | 395 WebKit::WebExceptionCode /* ec */) |
| 426 | 396 |
| 427 // WebIDBDatabase::setVersion() message. | 397 // WebIDBDatabase::setVersion() message. |
| 428 IPC_SYNC_MESSAGE_CONTROL4_1(IndexedDBHostMsg_DatabaseSetVersion, | 398 IPC_SYNC_MESSAGE_CONTROL4_1(IndexedDBHostMsg_DatabaseSetVersion, |
| 429 int32, /* idb_database_id */ | 399 int32, /* idb_database_id */ |
| 430 int32, /* thread_id */ | 400 int32, /* thread_id */ |
| 431 int32, /* response_id */ | 401 int32, /* response_id */ |
| 432 string16, /* version */ | 402 string16, /* version */ |
| 433 WebKit::WebExceptionCode /* ec */) | 403 WebKit::WebExceptionCode /* ec */) |
| 434 | 404 |
| 435 // WebIDBDatabase::transaction() message. | 405 // WebIDBDatabase::transaction() message. |
| 436 // TODO: make this message async. Have the renderer create a | 406 // TODO: make this message async. Have the renderer create a |
| 437 // temporary ID and keep a map in the browser process of real | 407 // temporary ID and keep a map in the browser process of real |
| 438 // IDs to temporary IDs. We can then update the transaction | 408 // IDs to temporary IDs. We can then update the transaction |
| 439 // to its real ID asynchronously. | 409 // to its real ID asynchronously. |
| 440 // (Or make the key a pair <connection_id, transaction_id>.) | 410 // (Or make the key a pair <connection_id, transaction_id>.) |
| 441 IPC_SYNC_MESSAGE_CONTROL4_2(IndexedDBHostMsg_DatabaseTransactionOld, | |
| 442 int32, /* thread_id */ | |
| 443 int32, /* idb_database_id */ | |
| 444 std::vector<string16>, /* object_stores */ | |
| 445 int32, /* mode */ | |
| 446 int32, /* idb_transaction_id */ | |
| 447 WebKit::WebExceptionCode /* ec */) | |
| 448 IPC_SYNC_MESSAGE_CONTROL4_1(IndexedDBHostMsg_DatabaseTransaction, | 411 IPC_SYNC_MESSAGE_CONTROL4_1(IndexedDBHostMsg_DatabaseTransaction, |
| 449 int32, /* thread_id */ | 412 int32, /* thread_id */ |
| 450 int32, /* idb_database_id */ | 413 int32, /* idb_database_id */ |
| 451 std::vector<int64>, /* object_stores */ | 414 std::vector<int64>, /* object_stores */ |
| 452 int32, /* mode */ | 415 int32, /* mode */ |
| 453 int32) /* idb_transaction_id */ | 416 int32) /* idb_transaction_id */ |
| 454 | 417 |
| 455 // WebIDBDatabase::close() message. | 418 // WebIDBDatabase::close() message. |
| 456 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseClose, | 419 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseClose, |
| 457 int32 /* idb_database_id */) | 420 int32 /* idb_database_id */) |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 | 457 |
| 495 // WebIDBObjectStore::get() message. | 458 // WebIDBObjectStore::get() message. |
| 496 IPC_MESSAGE_CONTROL5(IndexedDBHostMsg_ObjectStoreGet, | 459 IPC_MESSAGE_CONTROL5(IndexedDBHostMsg_ObjectStoreGet, |
| 497 int32, /* object_store_ipc_id */ | 460 int32, /* object_store_ipc_id */ |
| 498 int32, /* thread_id */ | 461 int32, /* thread_id */ |
| 499 int32, /* response_id */ | 462 int32, /* response_id */ |
| 500 content::IndexedDBKeyRange, /* key_range */ | 463 content::IndexedDBKeyRange, /* key_range */ |
| 501 int32) /* transaction_id */ | 464 int32) /* transaction_id */ |
| 502 | 465 |
| 503 // WebIDBObjectStore::put() message. | 466 // WebIDBObjectStore::put() message. |
| 504 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_ObjectStorePutOld, | |
| 505 IndexedDBHostMsg_ObjectStorePutOld_Params) | |
| 506 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_ObjectStorePut, | 467 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_ObjectStorePut, |
| 507 IndexedDBHostMsg_ObjectStorePut_Params) | 468 IndexedDBHostMsg_ObjectStorePut_Params) |
| 508 | 469 |
| 509 // WebIDBObjectStore::setIndexKeys() message. | 470 // WebIDBObjectStore::setIndexKeys() message. |
| 510 IPC_MESSAGE_CONTROL5(IndexedDBHostMsg_ObjectStoreSetIndexKeysOld, | |
| 511 int32, /* object_store_ipc_id */ | |
| 512 content::IndexedDBKey, /* primary_key */ | |
| 513 std::vector<string16>, /* index_names */ | |
| 514 std::vector<std::vector<content::IndexedDBKey> >, | |
| 515 /* index_keys */ | |
| 516 int32 /* transaction_id */) | |
| 517 IPC_MESSAGE_CONTROL5(IndexedDBHostMsg_ObjectStoreSetIndexKeys, | 471 IPC_MESSAGE_CONTROL5(IndexedDBHostMsg_ObjectStoreSetIndexKeys, |
| 518 int32, /* object_store_ipc_id */ | 472 int32, /* object_store_ipc_id */ |
| 519 content::IndexedDBKey, /* primary_key */ | 473 content::IndexedDBKey, /* primary_key */ |
| 520 std::vector<int64>, /* index_ids */ | 474 std::vector<int64>, /* index_ids */ |
| 521 std::vector<std::vector<content::IndexedDBKey> >, | 475 std::vector<std::vector<content::IndexedDBKey> >, |
| 522 /* index_keys */ | 476 /* index_keys */ |
| 523 int32 /* transaction_id */) | 477 int32 /* transaction_id */) |
| 524 | 478 |
| 525 // WebIDBObjectStore::setIndexesReady() message. | 479 // WebIDBObjectStore::setIndexesReady() message. |
| 526 IPC_MESSAGE_CONTROL3(IndexedDBHostMsg_ObjectStoreSetIndexesReadyOld, | |
| 527 int32, /* object_store_ipc_id */ | |
| 528 std::vector<string16>, /* index_names */ | |
| 529 int32 /* transaction_id */) | |
| 530 IPC_MESSAGE_CONTROL3(IndexedDBHostMsg_ObjectStoreSetIndexesReady, | 480 IPC_MESSAGE_CONTROL3(IndexedDBHostMsg_ObjectStoreSetIndexesReady, |
| 531 int32, /* object_store_ipc_id */ | 481 int32, /* object_store_ipc_id */ |
| 532 std::vector<int64>, /* index_names */ | 482 std::vector<int64>, /* index_names */ |
| 533 int32 /* transaction_id */) | 483 int32 /* transaction_id */) |
| 534 | 484 |
| 535 // WebIDBObjectStore::delete() message. | 485 // WebIDBObjectStore::delete() message. |
| 536 IPC_MESSAGE_CONTROL5(IndexedDBHostMsg_ObjectStoreDelete, | 486 IPC_MESSAGE_CONTROL5(IndexedDBHostMsg_ObjectStoreDelete, |
| 537 int32, /* object_store_ipc_id */ | 487 int32, /* object_store_ipc_id */ |
| 538 int32, /* thread_id */ | 488 int32, /* thread_id */ |
| 539 int32, /* response_id */ | 489 int32, /* response_id */ |
| 540 content::IndexedDBKeyRange, /* key_range */ | 490 content::IndexedDBKeyRange, /* key_range */ |
| 541 int32) /* transaction_id */ | 491 int32) /* transaction_id */ |
| 542 | 492 |
| 543 // WebIDBObjectStore::clear() message. | 493 // WebIDBObjectStore::clear() message. |
| 544 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_ObjectStoreClear, | 494 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_ObjectStoreClear, |
| 545 int32, /* object_store_ipc_id */ | 495 int32, /* object_store_ipc_id */ |
| 546 int32, /* thread_id */ | 496 int32, /* thread_id */ |
| 547 int32, /* response_id */ | 497 int32, /* response_id */ |
| 548 int32) /* transaction_id */ | 498 int32) /* transaction_id */ |
| 549 | 499 |
| 550 // WebIDBObjectStore::createIndex() message. | 500 // WebIDBObjectStore::createIndex() message. |
| 551 IPC_SYNC_MESSAGE_CONTROL1_2(IndexedDBHostMsg_ObjectStoreCreateIndex, | 501 IPC_SYNC_MESSAGE_CONTROL1_2(IndexedDBHostMsg_ObjectStoreCreateIndex, |
| 552 IndexedDBHostMsg_ObjectStoreCreateIndex_Params, | 502 IndexedDBHostMsg_ObjectStoreCreateIndex_Params, |
| 553 int32, /* index_id */ | 503 int32, /* index_id */ |
| 554 WebKit::WebExceptionCode /* ec */) | 504 WebKit::WebExceptionCode /* ec */) |
| 555 | 505 |
| 556 // WebIDBObjectStore::index() message. | 506 // WebIDBObjectStore::index() message. |
| 557 IPC_SYNC_MESSAGE_CONTROL2_2(IndexedDBHostMsg_ObjectStoreIndexOld, | |
| 558 int32, /* object_store_ipc_id */ | |
| 559 string16, /* name */ | |
| 560 int32, /* idb_index_id */ | |
| 561 WebKit::WebExceptionCode /* ec */) | |
| 562 IPC_SYNC_MESSAGE_CONTROL2_1(IndexedDBHostMsg_ObjectStoreIndex, | 507 IPC_SYNC_MESSAGE_CONTROL2_1(IndexedDBHostMsg_ObjectStoreIndex, |
| 563 int32, /* object_store_ipc_id */ | 508 int32, /* object_store_ipc_id */ |
| 564 int64, /* name */ | 509 int64, /* name */ |
| 565 int32) /* idb_index_id */ | 510 int32) /* idb_index_id */ |
| 566 | 511 |
| 567 // WebIDBObjectStore::deleteIndex() message. | 512 // WebIDBObjectStore::deleteIndex() message. |
| 568 IPC_SYNC_MESSAGE_CONTROL3_1(IndexedDBHostMsg_ObjectStoreDeleteIndexOld, | |
| 569 int32, /* object_store_ipc_id */ | |
| 570 string16, /* name */ | |
| 571 int32, /* transaction_id */ | |
| 572 WebKit::WebExceptionCode /* ec */) | |
| 573 IPC_SYNC_MESSAGE_CONTROL3_1(IndexedDBHostMsg_ObjectStoreDeleteIndex, | 513 IPC_SYNC_MESSAGE_CONTROL3_1(IndexedDBHostMsg_ObjectStoreDeleteIndex, |
| 574 int32, /* object_store_ipc_id */ | 514 int32, /* object_store_ipc_id */ |
| 575 int64, /* object_store_id */ | 515 int64, /* object_store_id */ |
| 576 int32, /* transaction_id */ | 516 int32, /* transaction_id */ |
| 577 WebKit::WebExceptionCode /* ec */) | 517 WebKit::WebExceptionCode /* ec */) |
| 578 | 518 |
| 579 // WebIDBObjectStore::openCursor() message. | 519 // WebIDBObjectStore::openCursor() message. |
| 580 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_ObjectStoreOpenCursor, | 520 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_ObjectStoreOpenCursor, |
| 581 IndexedDBHostMsg_ObjectStoreOpenCursor_Params) | 521 IndexedDBHostMsg_ObjectStoreOpenCursor_Params) |
| 582 | 522 |
| 583 // WebIDBObjectStore::count() message. | 523 // WebIDBObjectStore::count() message. |
| 584 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_ObjectStoreCount, | 524 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_ObjectStoreCount, |
| 585 IndexedDBHostMsg_ObjectStoreCount_Params) | 525 IndexedDBHostMsg_ObjectStoreCount_Params) |
| 586 | 526 |
| 587 // WebIDBObjectStore::~WebIDBObjectStore() message. | 527 // WebIDBObjectStore::~WebIDBObjectStore() message. |
| 588 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_ObjectStoreDestroyed, | 528 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_ObjectStoreDestroyed, |
| 589 int32 /* object_store_ipc_id */) | 529 int32 /* object_store_ipc_id */) |
| 590 | 530 |
| 591 // WebIDBDatabase::~WebIDBCursor() message. | 531 // WebIDBDatabase::~WebIDBCursor() message. |
| 592 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_CursorDestroyed, | 532 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_CursorDestroyed, |
| 593 int32 /* idb_cursor_id */) | 533 int32 /* idb_cursor_id */) |
| 594 | 534 |
| 595 // IDBTransaction::ObjectStore message. | 535 // IDBTransaction::ObjectStore message. |
| 596 IPC_SYNC_MESSAGE_CONTROL2_2(IndexedDBHostMsg_TransactionObjectStoreOld, | |
| 597 int32, /* transaction_id */ | |
| 598 string16, /* name */ | |
| 599 int32, /* object_store_ipc_id */ | |
| 600 WebKit::WebExceptionCode /* ec */) | |
| 601 | |
| 602 // IDBTransaction::ObjectStore message. | |
| 603 IPC_SYNC_MESSAGE_CONTROL2_2(IndexedDBHostMsg_TransactionObjectStore, | 536 IPC_SYNC_MESSAGE_CONTROL2_2(IndexedDBHostMsg_TransactionObjectStore, |
| 604 int32, /* transaction_id */ | 537 int32, /* transaction_id */ |
| 605 int64, /* id */ | 538 int64, /* id */ |
| 606 int32, /* object_store_ipc_id */ | 539 int32, /* object_store_ipc_id */ |
| 607 WebKit::WebExceptionCode /* ec */) | 540 WebKit::WebExceptionCode /* ec */) |
| 608 | 541 |
| 609 // WebIDBTransaction::commit() message. | 542 // WebIDBTransaction::commit() message. |
| 610 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionCommit, | 543 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionCommit, |
| 611 int32 /* idb_transaction_id */) | 544 int32 /* idb_transaction_id */) |
| 612 | 545 |
| 613 // WebIDBTransaction::abort() message. | 546 // WebIDBTransaction::abort() message. |
| 614 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionAbort, | 547 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionAbort, |
| 615 int32 /* idb_transaction_id */) | 548 int32 /* idb_transaction_id */) |
| 616 | 549 |
| 617 // IDBTransaction::DidCompleteTaskEvents() message. | 550 // IDBTransaction::DidCompleteTaskEvents() message. |
| 618 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionDidCompleteTaskEvents, | 551 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionDidCompleteTaskEvents, |
| 619 int32 /* idb_transaction_id */) | 552 int32 /* idb_transaction_id */) |
| 620 | 553 |
| 621 // WebIDBTransaction::~WebIDBTransaction() message. | 554 // WebIDBTransaction::~WebIDBTransaction() message. |
| 622 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionDestroyed, | 555 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionDestroyed, |
| 623 int32 /* idb_transaction_id */) | 556 int32 /* idb_transaction_id */) |
| OLD | NEW |