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 <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "content/common/indexed_db/indexed_db_key.h" | 10 #include "content/common/indexed_db/indexed_db_key.h" |
11 #include "content/common/indexed_db/indexed_db_key_path.h" | 11 #include "content/common/indexed_db/indexed_db_key_path.h" |
12 #include "content/common/indexed_db/indexed_db_key_range.h" | 12 #include "content/common/indexed_db/indexed_db_key_range.h" |
13 #include "content/common/indexed_db/indexed_db_param_traits.h" | 13 #include "content/common/indexed_db/indexed_db_param_traits.h" |
14 #include "ipc/ipc_message_macros.h" | 14 #include "ipc/ipc_message_macros.h" |
15 #include "ipc/ipc_param_traits.h" | 15 #include "ipc/ipc_param_traits.h" |
16 #include "third_party/WebKit/public/platform/WebIDBCursor.h" | 16 #include "third_party/WebKit/public/platform/WebIDBCursor.h" |
17 #include "third_party/WebKit/public/platform/WebIDBDatabase.h" | 17 #include "third_party/WebKit/public/platform/WebIDBDatabase.h" |
jsbell
2014/06/09 16:38:27
Need to #include "third_party/WebKit/public/platfo
Pritam Nikam
2014/06/11 14:05:16
Done.
| |
18 | 18 |
19 #undef IPC_MESSAGE_EXPORT | 19 #undef IPC_MESSAGE_EXPORT |
20 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 20 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
21 #define IPC_MESSAGE_START IndexedDBMsgStart | 21 #define IPC_MESSAGE_START IndexedDBMsgStart |
22 | 22 |
23 // Argument structures used in messages | 23 // Argument structures used in messages |
24 | 24 |
25 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBCursor::Direction, | 25 IPC_ENUM_TRAITS_MAX_VALUE(blink::Direction, blink::DirectionLast) |
26 blink::WebIDBCursor::DirectionLast) | 26 IPC_ENUM_TRAITS_MAX_VALUE(blink::PutMode, blink::PutModeLast) |
27 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBDatabase::PutMode, | 27 IPC_ENUM_TRAITS_MAX_VALUE(blink::TaskType, blink::TaskTypeLast) |
28 blink::WebIDBDatabase::PutModeLast) | 28 IPC_ENUM_TRAITS(blink::TransactionMode) |
29 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBDatabase::TaskType, | |
30 blink::WebIDBDatabase::TaskTypeLast) | |
31 IPC_ENUM_TRAITS(blink::WebIDBDatabase::TransactionMode) | |
32 | 29 |
33 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBDataLoss, blink::WebIDBDataLossTotal) | 30 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBDataLoss, blink::WebIDBDataLossTotal) |
34 | 31 |
35 // An index id, and corresponding set of keys to insert. | 32 // An index id, and corresponding set of keys to insert. |
36 typedef std::pair<int64, std::vector<content::IndexedDBKey> > IndexKeys; | 33 typedef std::pair<int64, std::vector<content::IndexedDBKey> > IndexKeys; |
37 | 34 |
38 // Used to enumerate indexed databases. | 35 // Used to enumerate indexed databases. |
39 IPC_STRUCT_BEGIN(IndexedDBHostMsg_FactoryGetDatabaseNames_Params) | 36 IPC_STRUCT_BEGIN(IndexedDBHostMsg_FactoryGetDatabaseNames_Params) |
40 // The response should have these ids. | 37 // The response should have these ids. |
41 IPC_STRUCT_MEMBER(int32, ipc_thread_id) | 38 IPC_STRUCT_MEMBER(int32, ipc_thread_id) |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
77 IPC_STRUCT_MEMBER(int32, ipc_thread_id) | 74 IPC_STRUCT_MEMBER(int32, ipc_thread_id) |
78 // The database the object store belongs to. | 75 // The database the object store belongs to. |
79 IPC_STRUCT_MEMBER(int32, ipc_database_id) | 76 IPC_STRUCT_MEMBER(int32, ipc_database_id) |
80 // The transaction id as minted by the frontend. | 77 // The transaction id as minted by the frontend. |
81 IPC_STRUCT_MEMBER(int64, transaction_id) | 78 IPC_STRUCT_MEMBER(int64, transaction_id) |
82 // To get to WebIDBDatabaseCallbacks. | 79 // To get to WebIDBDatabaseCallbacks. |
83 IPC_STRUCT_MEMBER(int32, ipc_database_callbacks_id) | 80 IPC_STRUCT_MEMBER(int32, ipc_database_callbacks_id) |
84 // The scope of the transaction. | 81 // The scope of the transaction. |
85 IPC_STRUCT_MEMBER(std::vector<int64>, object_store_ids) | 82 IPC_STRUCT_MEMBER(std::vector<int64>, object_store_ids) |
86 // The transaction mode. | 83 // The transaction mode. |
87 IPC_STRUCT_MEMBER(blink::WebIDBDatabase::TransactionMode, mode) | 84 IPC_STRUCT_MEMBER(blink::TransactionMode, mode) |
88 IPC_STRUCT_END() | 85 IPC_STRUCT_END() |
89 | 86 |
90 // Used to create an object store. | 87 // Used to create an object store. |
91 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCreateObjectStore_Params) | 88 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCreateObjectStore_Params) |
92 // The database the object store belongs to. | 89 // The database the object store belongs to. |
93 IPC_STRUCT_MEMBER(int32, ipc_database_id) | 90 IPC_STRUCT_MEMBER(int32, ipc_database_id) |
94 // The transaction its associated with. | 91 // The transaction its associated with. |
95 IPC_STRUCT_MEMBER(int64, transaction_id) | 92 IPC_STRUCT_MEMBER(int64, transaction_id) |
96 // The storage id of the object store. | 93 // The storage id of the object store. |
97 IPC_STRUCT_MEMBER(int64, object_store_id) | 94 IPC_STRUCT_MEMBER(int64, object_store_id) |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
142 IPC_STRUCT_MEMBER(int64, transaction_id) | 139 IPC_STRUCT_MEMBER(int64, transaction_id) |
143 // The object store's id. | 140 // The object store's id. |
144 IPC_STRUCT_MEMBER(int64, object_store_id) | 141 IPC_STRUCT_MEMBER(int64, object_store_id) |
145 // The index's id. | 142 // The index's id. |
146 IPC_STRUCT_MEMBER(int64, index_id) | 143 IPC_STRUCT_MEMBER(int64, index_id) |
147 // The value to set. | 144 // The value to set. |
148 IPC_STRUCT_MEMBER(std::string, value) | 145 IPC_STRUCT_MEMBER(std::string, value) |
149 // The key to set it on (may not be "valid"/set in some cases). | 146 // The key to set it on (may not be "valid"/set in some cases). |
150 IPC_STRUCT_MEMBER(content::IndexedDBKey, key) | 147 IPC_STRUCT_MEMBER(content::IndexedDBKey, key) |
151 // Whether this is an add or a put. | 148 // Whether this is an add or a put. |
152 IPC_STRUCT_MEMBER(blink::WebIDBDatabase::PutMode, put_mode) | 149 IPC_STRUCT_MEMBER(blink::PutMode, put_mode) |
153 // The index ids and the list of keys for each index. | 150 // The index ids and the list of keys for each index. |
154 IPC_STRUCT_MEMBER(std::vector<IndexKeys>, index_keys) | 151 IPC_STRUCT_MEMBER(std::vector<IndexKeys>, index_keys) |
155 // Sideband data for any blob or file encoded in value. | 152 // Sideband data for any blob or file encoded in value. |
156 IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_BlobOrFileInfo>, blob_or_file_info) | 153 IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_BlobOrFileInfo>, blob_or_file_info) |
157 IPC_STRUCT_END() | 154 IPC_STRUCT_END() |
158 | 155 |
159 // Used to open both cursors and object cursors in IndexedDB. | 156 // Used to open both cursors and object cursors in IndexedDB. |
160 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseOpenCursor_Params) | 157 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseOpenCursor_Params) |
161 // The response should have these ids. | 158 // The response should have these ids. |
162 IPC_STRUCT_MEMBER(int32, ipc_thread_id) | 159 IPC_STRUCT_MEMBER(int32, ipc_thread_id) |
163 IPC_STRUCT_MEMBER(int32, ipc_callbacks_id) | 160 IPC_STRUCT_MEMBER(int32, ipc_callbacks_id) |
164 // The database the object store belongs to. | 161 // The database the object store belongs to. |
165 IPC_STRUCT_MEMBER(int32, ipc_database_id) | 162 IPC_STRUCT_MEMBER(int32, ipc_database_id) |
166 // The transaction this request belongs to. | 163 // The transaction this request belongs to. |
167 IPC_STRUCT_MEMBER(int64, transaction_id) | 164 IPC_STRUCT_MEMBER(int64, transaction_id) |
168 // The object store. | 165 // The object store. |
169 IPC_STRUCT_MEMBER(int64, object_store_id) | 166 IPC_STRUCT_MEMBER(int64, object_store_id) |
170 // The index if any. | 167 // The index if any. |
171 IPC_STRUCT_MEMBER(int64, index_id) | 168 IPC_STRUCT_MEMBER(int64, index_id) |
172 // The serialized key range. | 169 // The serialized key range. |
173 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range) | 170 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range) |
174 // The direction of this cursor. | 171 // The direction of this cursor. |
175 IPC_STRUCT_MEMBER(blink::WebIDBCursor::Direction, direction) | 172 IPC_STRUCT_MEMBER(blink::Direction, direction) |
176 // If this is just retrieving the key | 173 // If this is just retrieving the key |
177 IPC_STRUCT_MEMBER(bool, key_only) | 174 IPC_STRUCT_MEMBER(bool, key_only) |
178 // The priority of this cursor. | 175 // The priority of this cursor. |
179 IPC_STRUCT_MEMBER(blink::WebIDBDatabase::TaskType, task_type) | 176 IPC_STRUCT_MEMBER(blink::TaskType, task_type) |
180 IPC_STRUCT_END() | 177 IPC_STRUCT_END() |
181 | 178 |
182 // Used to open both cursors and object cursors in IndexedDB. | 179 // Used to open both cursors and object cursors in IndexedDB. |
183 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCount_Params) | 180 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCount_Params) |
184 // The response should have these ids. | 181 // The response should have these ids. |
185 IPC_STRUCT_MEMBER(int32, ipc_thread_id) | 182 IPC_STRUCT_MEMBER(int32, ipc_thread_id) |
186 IPC_STRUCT_MEMBER(int32, ipc_callbacks_id) | 183 IPC_STRUCT_MEMBER(int32, ipc_callbacks_id) |
187 // The transaction this request belongs to. | 184 // The transaction this request belongs to. |
188 IPC_STRUCT_MEMBER(int64, transaction_id) | 185 IPC_STRUCT_MEMBER(int64, transaction_id) |
189 // The IPC id of the database. | 186 // The IPC id of the database. |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
537 int64) /* transaction_id */ | 534 int64) /* transaction_id */ |
538 | 535 |
539 // WebIDBDatabase::commit() message. | 536 // WebIDBDatabase::commit() message. |
540 IPC_MESSAGE_CONTROL2(IndexedDBHostMsg_DatabaseCommit, | 537 IPC_MESSAGE_CONTROL2(IndexedDBHostMsg_DatabaseCommit, |
541 int32, /* ipc_database_id */ | 538 int32, /* ipc_database_id */ |
542 int64) /* transaction_id */ | 539 int64) /* transaction_id */ |
543 | 540 |
544 // WebIDBDatabase::~WebIDBCursor() message. | 541 // WebIDBDatabase::~WebIDBCursor() message. |
545 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_CursorDestroyed, | 542 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_CursorDestroyed, |
546 int32 /* ipc_cursor_id */) | 543 int32 /* ipc_cursor_id */) |
OLD | NEW |