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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
62 // The response should have these ids. | 62 // The response should have these ids. |
63 IPC_STRUCT_MEMBER(int32, ipc_thread_id) | 63 IPC_STRUCT_MEMBER(int32, ipc_thread_id) |
64 IPC_STRUCT_MEMBER(int32, ipc_response_id) | 64 IPC_STRUCT_MEMBER(int32, ipc_response_id) |
65 // The origin doing the initiating. | 65 // The origin doing the initiating. |
66 IPC_STRUCT_MEMBER(string16, origin) | 66 IPC_STRUCT_MEMBER(string16, origin) |
67 // The name of the database. | 67 // The name of the database. |
68 IPC_STRUCT_MEMBER(string16, name) | 68 IPC_STRUCT_MEMBER(string16, name) |
69 IPC_STRUCT_END() | 69 IPC_STRUCT_END() |
70 | 70 |
71 // Used to create an object store. | 71 // Used to create an object store. |
72 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCreateObjectStore_Params) | 72 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCreateObjectStoreOld_Params) |
73 // The storage id of the object store. | 73 // The storage id of the object store. |
74 IPC_STRUCT_MEMBER(int64, id) | 74 IPC_STRUCT_MEMBER(int64, id) |
75 // The name of the object store. | 75 // The name of the object store. |
76 IPC_STRUCT_MEMBER(string16, name) | 76 IPC_STRUCT_MEMBER(string16, name) |
77 // The keyPath of the object store. | 77 // The keyPath of the object store. |
78 IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, key_path) | 78 IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, key_path) |
79 // Whether the object store created should have a key generator. | 79 // Whether the object store created should have a key generator. |
80 IPC_STRUCT_MEMBER(bool, auto_increment) | 80 IPC_STRUCT_MEMBER(bool, auto_increment) |
81 // The transaction this is associated with. | 81 // The transaction this is associated with. |
82 IPC_STRUCT_MEMBER(int32, ipc_transaction_id) | 82 IPC_STRUCT_MEMBER(int32, ipc_transaction_id) |
83 // The database the object store belongs to. | 83 // The database the object store belongs to. |
84 IPC_STRUCT_MEMBER(int32, ipc_database_id) | 84 IPC_STRUCT_MEMBER(int32, ipc_database_id) |
85 IPC_STRUCT_END() | 85 IPC_STRUCT_END() |
86 | 86 |
87 // Used to create an object store. | |
88 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCreateObjectStore_Params) | |
89 // The database the object store belongs to. | |
90 IPC_STRUCT_MEMBER(int32, ipc_database_id) | |
91 // The transaction id used if a database upgrade is needed. | |
jsbell
2013/01/08 18:44:36
Nit: This comment reads a little strangely. If thi
| |
92 IPC_STRUCT_MEMBER(int64, transaction_id) | |
93 // The storage id of the object store. | |
94 IPC_STRUCT_MEMBER(int64, object_store_id) | |
95 // The name of the object store. | |
96 IPC_STRUCT_MEMBER(string16, name) | |
97 // The keyPath of the object store. | |
98 IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, key_path) | |
99 // Whether the object store created should have a key generator. | |
100 IPC_STRUCT_MEMBER(bool, auto_increment) | |
101 IPC_STRUCT_END() | |
102 | |
87 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseGet_Params) | 103 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseGet_Params) |
88 IPC_STRUCT_MEMBER(int32, ipc_thread_id) | 104 IPC_STRUCT_MEMBER(int32, ipc_thread_id) |
89 // The id any response should contain. | 105 // The id any response should contain. |
90 IPC_STRUCT_MEMBER(int32, ipc_response_id) | 106 IPC_STRUCT_MEMBER(int32, ipc_response_id) |
91 // The database the object store belongs to. | 107 // The database the object store belongs to. |
92 IPC_STRUCT_MEMBER(int32, ipc_database_id) | 108 IPC_STRUCT_MEMBER(int32, ipc_database_id) |
93 // The transaction its associated with. | 109 // The transaction its associated with. |
94 IPC_STRUCT_MEMBER(int64, transaction_id) | 110 IPC_STRUCT_MEMBER(int64, transaction_id) |
95 // The object store's id. | 111 // The object store's id. |
96 IPC_STRUCT_MEMBER(int64, object_store_id) | 112 IPC_STRUCT_MEMBER(int64, object_store_id) |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
244 // The object store key that we're setting index keys for. | 260 // The object store key that we're setting index keys for. |
245 IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key) | 261 IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key) |
246 // The indexes that we're setting keys on. | 262 // The indexes that we're setting keys on. |
247 IPC_STRUCT_MEMBER(std::vector<int64>, index_ids) | 263 IPC_STRUCT_MEMBER(std::vector<int64>, index_ids) |
248 // A list of index keys for each index. | 264 // A list of index keys for each index. |
249 IPC_STRUCT_MEMBER(std::vector<std::vector<content::IndexedDBKey> >, | 265 IPC_STRUCT_MEMBER(std::vector<std::vector<content::IndexedDBKey> >, |
250 index_keys) | 266 index_keys) |
251 IPC_STRUCT_END() | 267 IPC_STRUCT_END() |
252 | 268 |
253 // Used to create an index. | 269 // Used to create an index. |
270 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCreateIndex_Params) | |
271 // The transaction this is associated with. | |
272 IPC_STRUCT_MEMBER(int64, transaction_id) | |
273 // The database being used. | |
274 IPC_STRUCT_MEMBER(int32, ipc_database_id) | |
275 // The object store the index belongs to. | |
276 IPC_STRUCT_MEMBER(int64, object_store_id) | |
277 // The storage id of the index. | |
278 IPC_STRUCT_MEMBER(int64, index_id) | |
279 // The name of the index. | |
280 IPC_STRUCT_MEMBER(string16, name) | |
281 // The keyPath of the index. | |
282 IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, key_path) | |
283 // Whether the index created has unique keys. | |
284 IPC_STRUCT_MEMBER(bool, unique) | |
285 // Whether the index created produces keys for each array entry. | |
286 IPC_STRUCT_MEMBER(bool, multi_entry) | |
287 IPC_STRUCT_END() | |
288 | |
289 // Used to create an index. | |
254 IPC_STRUCT_BEGIN(IndexedDBHostMsg_ObjectStoreCreateIndex_Params) | 290 IPC_STRUCT_BEGIN(IndexedDBHostMsg_ObjectStoreCreateIndex_Params) |
255 // The storage id of the index. | 291 // The storage id of the index. |
256 IPC_STRUCT_MEMBER(int64, id) | 292 IPC_STRUCT_MEMBER(int64, id) |
257 // The name of the index. | 293 // The name of the index. |
258 IPC_STRUCT_MEMBER(string16, name) | 294 IPC_STRUCT_MEMBER(string16, name) |
259 // The keyPath of the index. | 295 // The keyPath of the index. |
260 IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, key_path) | 296 IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, key_path) |
261 // Whether the index created has unique keys. | 297 // Whether the index created has unique keys. |
262 IPC_STRUCT_MEMBER(bool, unique) | 298 IPC_STRUCT_MEMBER(bool, unique) |
263 // Whether the index created produces keys for each array entry. | 299 // Whether the index created produces keys for each array entry. |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
494 IPC_STRUCT_MEMBER(int64, max_object_store_id) | 530 IPC_STRUCT_MEMBER(int64, max_object_store_id) |
495 IPC_STRUCT_MEMBER(std::vector<IndexedDBObjectStoreMetadata>, object_stores) | 531 IPC_STRUCT_MEMBER(std::vector<IndexedDBObjectStoreMetadata>, object_stores) |
496 IPC_STRUCT_END() | 532 IPC_STRUCT_END() |
497 | 533 |
498 // WebIDBDatabase::metadata() message. | 534 // WebIDBDatabase::metadata() message. |
499 IPC_SYNC_MESSAGE_CONTROL1_1(IndexedDBHostMsg_DatabaseMetadata, | 535 IPC_SYNC_MESSAGE_CONTROL1_1(IndexedDBHostMsg_DatabaseMetadata, |
500 int32, /* ipc_database_id */ | 536 int32, /* ipc_database_id */ |
501 IndexedDBDatabaseMetadata /* metadata */) | 537 IndexedDBDatabaseMetadata /* metadata */) |
502 | 538 |
503 // WebIDBDatabase::createObjectStore() message. | 539 // WebIDBDatabase::createObjectStore() message. |
504 IPC_SYNC_MESSAGE_CONTROL1_2(IndexedDBHostMsg_DatabaseCreateObjectStore, | 540 IPC_SYNC_MESSAGE_CONTROL1_2( |
505 IndexedDBHostMsg_DatabaseCreateObjectStore_Params, | 541 IndexedDBHostMsg_DatabaseCreateObjectStoreOld, |
506 int32, /* ipc_object_store_id */ | 542 IndexedDBHostMsg_DatabaseCreateObjectStoreOld_Params, |
507 WebKit::WebExceptionCode /* ec */) | 543 int32, /* ipc_object_store_id */ |
544 WebKit::WebExceptionCode /* ec */) | |
545 | |
546 // WebIDBDatabase::createObjectStore() message. | |
547 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseCreateObjectStore, | |
548 IndexedDBHostMsg_DatabaseCreateObjectStore_Params) | |
508 | 549 |
509 // WebIDBDatabase::deleteObjectStore() message. | 550 // WebIDBDatabase::deleteObjectStore() message. |
510 IPC_SYNC_MESSAGE_CONTROL3_1(IndexedDBHostMsg_DatabaseDeleteObjectStore, | 551 IPC_SYNC_MESSAGE_CONTROL3_1(IndexedDBHostMsg_DatabaseDeleteObjectStoreOld, |
511 int32, /* ipc_database_id */ | 552 int32, /* ipc_database_id */ |
512 int64, /* object_store_id */ | 553 int64, /* object_store_id */ |
513 int32, /* ipc_transaction_id */ | 554 int32, /* ipc_transaction_id */ |
514 WebKit::WebExceptionCode /* ec */) | 555 WebKit::WebExceptionCode /* ec */) |
515 | 556 |
557 // WebIDBDatabase::deleteObjectStore() message. | |
558 IPC_MESSAGE_CONTROL3(IndexedDBHostMsg_DatabaseDeleteObjectStore, | |
559 int32, /* ipc_database_id */ | |
560 int64, /* transaction_id */ | |
561 int64) /* object_store_id */ | |
562 | |
516 // WebIDBDatabase::createTransaction() message. | 563 // WebIDBDatabase::createTransaction() message. |
517 // TODO: make this message async. | 564 // TODO: make this message async. |
518 IPC_SYNC_MESSAGE_CONTROL5_1(IndexedDBHostMsg_DatabaseCreateTransaction, | 565 IPC_SYNC_MESSAGE_CONTROL5_1(IndexedDBHostMsg_DatabaseCreateTransaction, |
519 int32, /* ipc_thread_id */ | 566 int32, /* ipc_thread_id */ |
520 int32, /* ipc_database_id */ | 567 int32, /* ipc_database_id */ |
521 int64, /* transaction_id */ | 568 int64, /* transaction_id */ |
522 std::vector<int64>, /* object_stores */ | 569 std::vector<int64>, /* object_stores */ |
523 int32, /* mode */ | 570 int32, /* mode */ |
524 int32) /* ipc_transaction_id */ | 571 int32) /* ipc_transaction_id */ |
525 | 572 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
563 IndexedDBHostMsg_DatabaseDeleteRange_Params) | 610 IndexedDBHostMsg_DatabaseDeleteRange_Params) |
564 | 611 |
565 // WebIDBDatabase::clear() message. | 612 // WebIDBDatabase::clear() message. |
566 IPC_MESSAGE_CONTROL5(IndexedDBHostMsg_DatabaseClear, | 613 IPC_MESSAGE_CONTROL5(IndexedDBHostMsg_DatabaseClear, |
567 int32, /* ipc_thread_id */ | 614 int32, /* ipc_thread_id */ |
568 int32, /* ipc_response_id */ | 615 int32, /* ipc_response_id */ |
569 int32, /* ipc_database_id */ | 616 int32, /* ipc_database_id */ |
570 int64, /* transaction_id */ | 617 int64, /* transaction_id */ |
571 int64) /* object_store_id */ | 618 int64) /* object_store_id */ |
572 | 619 |
620 // WebIDBDatabase::createIndex() message. | |
621 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseCreateIndex, | |
622 IndexedDBHostMsg_DatabaseCreateIndex_Params) | |
623 | |
624 // WebIDBDatabase::deleteIndex() message. | |
625 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_DatabaseDeleteIndex, | |
626 int32, /* ipc_database_id */ | |
627 int64, /* transaction_id */ | |
628 int64, /* object_store_id */ | |
629 int64) /* index_id */ | |
630 | |
573 // WebIDBIndex::openObjectCursor() message. | 631 // WebIDBIndex::openObjectCursor() message. |
574 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_IndexOpenObjectCursor, | 632 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_IndexOpenObjectCursor, |
575 IndexedDBHostMsg_IndexOpenCursor_Params) | 633 IndexedDBHostMsg_IndexOpenCursor_Params) |
576 | 634 |
577 // WebIDBIndex::openKeyCursor() message. | 635 // WebIDBIndex::openKeyCursor() message. |
578 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_IndexOpenKeyCursor, | 636 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_IndexOpenKeyCursor, |
579 IndexedDBHostMsg_IndexOpenCursor_Params) | 637 IndexedDBHostMsg_IndexOpenCursor_Params) |
580 | 638 |
581 // WebIDBIndex::count() message. | 639 // WebIDBIndex::count() message. |
582 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_IndexCount, | 640 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_IndexCount, |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
694 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionAbort, | 752 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionAbort, |
695 int32 /* ipc_transaction_id */) | 753 int32 /* ipc_transaction_id */) |
696 | 754 |
697 // IDBTransaction::DidCompleteTaskEvents() message. | 755 // IDBTransaction::DidCompleteTaskEvents() message. |
698 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionDidCompleteTaskEvents, | 756 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionDidCompleteTaskEvents, |
699 int32 /* ipc_transaction_id */) | 757 int32 /* ipc_transaction_id */) |
700 | 758 |
701 // WebIDBTransaction::~WebIDBTransaction() message. | 759 // WebIDBTransaction::~WebIDBTransaction() message. |
702 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionDestroyed, | 760 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionDestroyed, |
703 int32 /* ipc_transaction_id */) | 761 int32 /* ipc_transaction_id */) |
OLD | NEW |