Chromium Code Reviews| 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" |
| 11 #include "content/common/indexed_db/indexed_db_key_range.h" | 11 #include "content/common/indexed_db/indexed_db_key_range.h" |
| 12 #include "content/common/indexed_db/indexed_db_param_traits.h" | 12 #include "content/common/indexed_db/indexed_db_param_traits.h" |
| 13 #include "content/public/common/serialized_script_value.h" | 13 #include "content/public/common/serialized_script_value.h" |
| 14 #include "content/public/common/webkit_param_traits.h" | 14 #include "content/public/common/webkit_param_traits.h" |
| 15 #include "ipc/ipc_message_macros.h" | 15 #include "ipc/ipc_message_macros.h" |
| 16 #include "ipc/ipc_param_traits.h" | 16 #include "ipc/ipc_param_traits.h" |
| 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebExceptionCode.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebExceptionCode.h" |
| 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBCursor.h" | |
| 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBMetadata.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBMetadata.h" |
| 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBObjectStore.h" | 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBObjectStore.h" |
| 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBTransaction.h" | |
| 20 | 22 |
| 21 #define IPC_MESSAGE_START IndexedDBMsgStart | 23 #define IPC_MESSAGE_START IndexedDBMsgStart |
| 22 | 24 |
| 23 // Argument structures used in messages | 25 // Argument structures used in messages |
| 24 | 26 |
| 25 IPC_ENUM_TRAITS(WebKit::WebIDBObjectStore::PutMode) | 27 IPC_ENUM_TRAITS(WebKit::WebIDBObjectStore::PutMode) |
| 28 IPC_ENUM_TRAITS(WebKit::WebIDBCursor::Direction) | |
| 29 IPC_ENUM_TRAITS(WebKit::WebIDBTransaction::TaskType) | |
| 26 | 30 |
| 27 // Used to enumerate indexed databases. | 31 // Used to enumerate indexed databases. |
| 28 IPC_STRUCT_BEGIN(IndexedDBHostMsg_FactoryGetDatabaseNames_Params) | 32 IPC_STRUCT_BEGIN(IndexedDBHostMsg_FactoryGetDatabaseNames_Params) |
| 29 // The response should have these ids. | 33 // The response should have these ids. |
| 30 IPC_STRUCT_MEMBER(int32, thread_id) | 34 IPC_STRUCT_MEMBER(int32, thread_id) |
| 31 IPC_STRUCT_MEMBER(int32, response_id) | 35 IPC_STRUCT_MEMBER(int32, response_id) |
| 32 // The origin doing the initiating. | 36 // The origin doing the initiating. |
| 33 IPC_STRUCT_MEMBER(string16, origin) | 37 IPC_STRUCT_MEMBER(string16, origin) |
| 34 IPC_STRUCT_END() | 38 IPC_STRUCT_END() |
| 35 | 39 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 139 IPC_STRUCT_END() | 143 IPC_STRUCT_END() |
| 140 | 144 |
| 141 // Used to open an IndexedDB cursor. | 145 // Used to open an IndexedDB cursor. |
| 142 IPC_STRUCT_BEGIN(IndexedDBHostMsg_ObjectStoreOpenCursor_Params) | 146 IPC_STRUCT_BEGIN(IndexedDBHostMsg_ObjectStoreOpenCursor_Params) |
| 143 // The response should have these ids. | 147 // The response should have these ids. |
| 144 IPC_STRUCT_MEMBER(int32, thread_id) | 148 IPC_STRUCT_MEMBER(int32, thread_id) |
| 145 IPC_STRUCT_MEMBER(int32, response_id) | 149 IPC_STRUCT_MEMBER(int32, response_id) |
| 146 // The serialized key range. | 150 // The serialized key range. |
| 147 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range) | 151 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range) |
| 148 // The direction of this cursor. | 152 // The direction of this cursor. |
| 149 IPC_STRUCT_MEMBER(int32, direction) | 153 IPC_STRUCT_MEMBER(WebKit::WebIDBCursor::Direction, direction) |
| 154 // The priority of this cursor. | |
| 155 IPC_STRUCT_MEMBER(WebKit::WebIDBTransaction::TaskType, task_type) | |
| 150 // The object store the cursor belongs to. | 156 // The object store the cursor belongs to. |
| 151 IPC_STRUCT_MEMBER(int32, idb_object_store_id) | 157 IPC_STRUCT_MEMBER(int32, idb_object_store_id) |
| 152 // The transaction this request belongs to. | 158 // The transaction this request belongs to. |
| 153 IPC_STRUCT_MEMBER(int, transaction_id) | 159 IPC_STRUCT_MEMBER(int, transaction_id) |
| 154 IPC_STRUCT_END() | 160 IPC_STRUCT_END() |
| 155 | 161 |
| 156 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessIDBCursor_Params) | 162 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessIDBCursor_Params) |
| 157 IPC_STRUCT_MEMBER(int32, thread_id) | 163 IPC_STRUCT_MEMBER(int32, thread_id) |
| 158 IPC_STRUCT_MEMBER(int32, response_id) | 164 IPC_STRUCT_MEMBER(int32, response_id) |
| 159 IPC_STRUCT_MEMBER(int32, cursor_id) | 165 IPC_STRUCT_MEMBER(int32, cursor_id) |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 447 int32, /* response_id */ | 453 int32, /* response_id */ |
| 448 content::IndexedDBKeyRange, /* key_range */ | 454 content::IndexedDBKeyRange, /* key_range */ |
| 449 int32, /* transaction_id */ | 455 int32, /* transaction_id */ |
| 450 WebKit::WebExceptionCode /* ec */) | 456 WebKit::WebExceptionCode /* ec */) |
| 451 | 457 |
| 452 // WebIDBObjectStore::putWithIndexKeys() message. | 458 // WebIDBObjectStore::putWithIndexKeys() message. |
| 453 IPC_SYNC_MESSAGE_CONTROL1_1(IndexedDBHostMsg_ObjectStorePut, | 459 IPC_SYNC_MESSAGE_CONTROL1_1(IndexedDBHostMsg_ObjectStorePut, |
| 454 IndexedDBHostMsg_ObjectStorePut_Params, | 460 IndexedDBHostMsg_ObjectStorePut_Params, |
| 455 WebKit::WebExceptionCode /* ec */) | 461 WebKit::WebExceptionCode /* ec */) |
| 456 | 462 |
| 463 // WebIDBObjectStore::setIndexKeys() message. | |
| 464 // FIXME: should this be async? | |
|
dgrogan
2012/08/08 23:02:50
Would the only code difference be to remove _SYNC
alecflett
2012/08/09 20:54:18
Done.
| |
| 465 IPC_SYNC_MESSAGE_CONTROL5_0(IndexedDBHostMsg_ObjectStoreSetIndexKeys, | |
| 466 int32, /* idb_object_store_id */ | |
| 467 content::IndexedDBKey, /* primary_key */ | |
| 468 std::vector<string16>, /* index_names */ | |
| 469 std::vector<std::vector<content::IndexedDBKey> >, /* index_keys */ | |
| 470 int32 /* transaction_id */) | |
| 471 | |
| 472 // WebIDBObjectStore::setIndexesReady() message. | |
| 473 IPC_SYNC_MESSAGE_CONTROL3_0(IndexedDBHostMsg_ObjectStoreSetIndexesReady, | |
| 474 int32, /* idb_object_store_id */ | |
| 475 std::vector<string16>, /* index_names */ | |
| 476 int32 /* transaction_id */) | |
| 477 | |
| 457 // WebIDBObjectStore::delete() message. | 478 // WebIDBObjectStore::delete() message. |
| 458 IPC_SYNC_MESSAGE_CONTROL5_1(IndexedDBHostMsg_ObjectStoreDelete, | 479 IPC_SYNC_MESSAGE_CONTROL5_1(IndexedDBHostMsg_ObjectStoreDelete, |
| 459 int32, /* idb_object_store_id */ | 480 int32, /* idb_object_store_id */ |
| 460 int32, /* thread_id */ | 481 int32, /* thread_id */ |
| 461 int32, /* response_id */ | 482 int32, /* response_id */ |
| 462 content::IndexedDBKeyRange, /* key_range */ | 483 content::IndexedDBKeyRange, /* key_range */ |
| 463 int32, /* transaction_id */ | 484 int32, /* transaction_id */ |
| 464 WebKit::WebExceptionCode /* ec */) | 485 WebKit::WebExceptionCode /* ec */) |
| 465 | 486 |
| 466 // WebIDBObjectStore::clear() message. | 487 // WebIDBObjectStore::clear() message. |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 524 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionAbort, | 545 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionAbort, |
| 525 int32 /* idb_transaction_id */) | 546 int32 /* idb_transaction_id */) |
| 526 | 547 |
| 527 // IDBTransaction::DidCompleteTaskEvents() message. | 548 // IDBTransaction::DidCompleteTaskEvents() message. |
| 528 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionDidCompleteTaskEvents, | 549 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionDidCompleteTaskEvents, |
| 529 int32 /* idb_transaction_id */) | 550 int32 /* idb_transaction_id */) |
| 530 | 551 |
| 531 // WebIDBTransaction::~WebIDBTransaction() message. | 552 // WebIDBTransaction::~WebIDBTransaction() message. |
| 532 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionDestroyed, | 553 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionDestroyed, |
| 533 int32 /* idb_transaction_id */) | 554 int32 /* idb_transaction_id */) |
| OLD | NEW |