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" |
18 #include "url/gurl.h" | |
cmumford
2014/04/08 21:47:26
Is gurl.h needed?
ericu
2014/04/08 22:07:11
No, that's old. Removed.
| |
18 | 19 |
19 #undef IPC_MESSAGE_EXPORT | 20 #undef IPC_MESSAGE_EXPORT |
20 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 21 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
21 #define IPC_MESSAGE_START IndexedDBMsgStart | 22 #define IPC_MESSAGE_START IndexedDBMsgStart |
22 | 23 |
23 // Argument structures used in messages | 24 // Argument structures used in messages |
24 | 25 |
25 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBCursor::Direction, | 26 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBCursor::Direction, |
26 blink::WebIDBCursor::DirectionLast) | 27 blink::WebIDBCursor::DirectionLast) |
27 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBDatabase::PutMode, | 28 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBDatabase::PutMode, |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
114 // The object store's id. | 115 // The object store's id. |
115 IPC_STRUCT_MEMBER(int64, object_store_id) | 116 IPC_STRUCT_MEMBER(int64, object_store_id) |
116 // The index's id. | 117 // The index's id. |
117 IPC_STRUCT_MEMBER(int64, index_id) | 118 IPC_STRUCT_MEMBER(int64, index_id) |
118 // The serialized key range. | 119 // The serialized key range. |
119 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range) | 120 IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range) |
120 // If this is just retrieving the key | 121 // If this is just retrieving the key |
121 IPC_STRUCT_MEMBER(bool, key_only) | 122 IPC_STRUCT_MEMBER(bool, key_only) |
122 IPC_STRUCT_END() | 123 IPC_STRUCT_END() |
123 | 124 |
125 IPC_STRUCT_BEGIN(IndexedDBMsg_BlobOrFileInfo) | |
126 IPC_STRUCT_MEMBER(bool, is_file) | |
127 IPC_STRUCT_MEMBER(std::string, uuid) | |
128 IPC_STRUCT_MEMBER(base::string16, mime_type) | |
129 IPC_STRUCT_MEMBER(uint64, size) | |
130 IPC_STRUCT_MEMBER(base::string16, file_path) | |
131 IPC_STRUCT_MEMBER(base::string16, file_name) | |
132 IPC_STRUCT_MEMBER(double, last_modified) | |
133 IPC_STRUCT_END() | |
134 | |
124 // Used to set a value in an object store. | 135 // Used to set a value in an object store. |
125 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabasePut_Params) | 136 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabasePut_Params) |
126 // The id any response should contain. | 137 // The id any response should contain. |
127 IPC_STRUCT_MEMBER(int32, ipc_thread_id) | 138 IPC_STRUCT_MEMBER(int32, ipc_thread_id) |
128 IPC_STRUCT_MEMBER(int32, ipc_callbacks_id) | 139 IPC_STRUCT_MEMBER(int32, ipc_callbacks_id) |
129 // The database the object store belongs to. | 140 // The database the object store belongs to. |
130 IPC_STRUCT_MEMBER(int32, ipc_database_id) | 141 IPC_STRUCT_MEMBER(int32, ipc_database_id) |
131 // The transaction it's associated with. | 142 // The transaction it's associated with. |
132 IPC_STRUCT_MEMBER(int64, transaction_id) | 143 IPC_STRUCT_MEMBER(int64, transaction_id) |
133 // The object store's id. | 144 // The object store's id. |
134 IPC_STRUCT_MEMBER(int64, object_store_id) | 145 IPC_STRUCT_MEMBER(int64, object_store_id) |
135 // The index's id. | 146 // The index's id. |
136 IPC_STRUCT_MEMBER(int64, index_id) | 147 IPC_STRUCT_MEMBER(int64, index_id) |
137 // The value to set. | 148 // The value to set. |
138 IPC_STRUCT_MEMBER(std::string, value) | 149 IPC_STRUCT_MEMBER(std::string, value) |
139 // The key to set it on (may not be "valid"/set in some cases). | 150 // The key to set it on (may not be "valid"/set in some cases). |
140 IPC_STRUCT_MEMBER(content::IndexedDBKey, key) | 151 IPC_STRUCT_MEMBER(content::IndexedDBKey, key) |
141 // Whether this is an add or a put. | 152 // Whether this is an add or a put. |
142 IPC_STRUCT_MEMBER(blink::WebIDBDatabase::PutMode, put_mode) | 153 IPC_STRUCT_MEMBER(blink::WebIDBDatabase::PutMode, put_mode) |
143 // The index ids and the list of keys for each index. | 154 // The index ids and the list of keys for each index. |
144 IPC_STRUCT_MEMBER(std::vector<IndexKeys>, index_keys) | 155 IPC_STRUCT_MEMBER(std::vector<IndexKeys>, index_keys) |
156 // Sideband data for any blob or file encoded in value. | |
157 IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_BlobOrFileInfo>, blob_or_file_info) | |
145 IPC_STRUCT_END() | 158 IPC_STRUCT_END() |
146 | 159 |
147 // Used to open both cursors and object cursors in IndexedDB. | 160 // Used to open both cursors and object cursors in IndexedDB. |
148 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseOpenCursor_Params) | 161 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseOpenCursor_Params) |
149 // The response should have these ids. | 162 // The response should have these ids. |
150 IPC_STRUCT_MEMBER(int32, ipc_thread_id) | 163 IPC_STRUCT_MEMBER(int32, ipc_thread_id) |
151 IPC_STRUCT_MEMBER(int32, ipc_callbacks_id) | 164 IPC_STRUCT_MEMBER(int32, ipc_callbacks_id) |
152 // The database the object store belongs to. | 165 // The database the object store belongs to. |
153 IPC_STRUCT_MEMBER(int32, ipc_database_id) | 166 IPC_STRUCT_MEMBER(int32, ipc_database_id) |
154 // The transaction this request belongs to. | 167 // The transaction this request belongs to. |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
231 IPC_STRUCT_MEMBER(bool, multi_entry) | 244 IPC_STRUCT_MEMBER(bool, multi_entry) |
232 IPC_STRUCT_END() | 245 IPC_STRUCT_END() |
233 | 246 |
234 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessIDBCursor_Params) | 247 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessIDBCursor_Params) |
235 IPC_STRUCT_MEMBER(int32, ipc_thread_id) | 248 IPC_STRUCT_MEMBER(int32, ipc_thread_id) |
236 IPC_STRUCT_MEMBER(int32, ipc_callbacks_id) | 249 IPC_STRUCT_MEMBER(int32, ipc_callbacks_id) |
237 IPC_STRUCT_MEMBER(int32, ipc_cursor_id) | 250 IPC_STRUCT_MEMBER(int32, ipc_cursor_id) |
238 IPC_STRUCT_MEMBER(content::IndexedDBKey, key) | 251 IPC_STRUCT_MEMBER(content::IndexedDBKey, key) |
239 IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key) | 252 IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key) |
240 IPC_STRUCT_MEMBER(std::string, value) | 253 IPC_STRUCT_MEMBER(std::string, value) |
254 // Sideband data for any blob or file encoded in value. | |
255 IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_BlobOrFileInfo>, blob_or_file_info) | |
241 IPC_STRUCT_END() | 256 IPC_STRUCT_END() |
242 | 257 |
243 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessCursorContinue_Params) | 258 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessCursorContinue_Params) |
244 IPC_STRUCT_MEMBER(int32, ipc_thread_id) | 259 IPC_STRUCT_MEMBER(int32, ipc_thread_id) |
245 IPC_STRUCT_MEMBER(int32, ipc_callbacks_id) | 260 IPC_STRUCT_MEMBER(int32, ipc_callbacks_id) |
246 IPC_STRUCT_MEMBER(int32, ipc_cursor_id) | 261 IPC_STRUCT_MEMBER(int32, ipc_cursor_id) |
247 IPC_STRUCT_MEMBER(content::IndexedDBKey, key) | 262 IPC_STRUCT_MEMBER(content::IndexedDBKey, key) |
248 IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key) | 263 IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key) |
249 IPC_STRUCT_MEMBER(std::string, value) | 264 IPC_STRUCT_MEMBER(std::string, value) |
265 // Sideband data for any blob or file encoded in value. | |
266 IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_BlobOrFileInfo>, blob_or_file_info) | |
250 IPC_STRUCT_END() | 267 IPC_STRUCT_END() |
251 | 268 |
252 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params) | 269 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params) |
253 IPC_STRUCT_MEMBER(int32, ipc_thread_id) | 270 IPC_STRUCT_MEMBER(int32, ipc_thread_id) |
254 IPC_STRUCT_MEMBER(int32, ipc_callbacks_id) | 271 IPC_STRUCT_MEMBER(int32, ipc_callbacks_id) |
255 IPC_STRUCT_MEMBER(int32, ipc_cursor_id) | 272 IPC_STRUCT_MEMBER(int32, ipc_cursor_id) |
256 IPC_STRUCT_MEMBER(std::vector<content::IndexedDBKey>, keys) | 273 IPC_STRUCT_MEMBER(std::vector<content::IndexedDBKey>, keys) |
257 IPC_STRUCT_MEMBER(std::vector<content::IndexedDBKey>, primary_keys) | 274 IPC_STRUCT_MEMBER(std::vector<content::IndexedDBKey>, primary_keys) |
258 IPC_STRUCT_MEMBER(std::vector<std::string>, values) | 275 IPC_STRUCT_MEMBER(std::vector<std::string>, values) |
276 // Sideband data for any blob or file encoded in value. | |
277 IPC_STRUCT_MEMBER(std::vector<std::vector<IndexedDBMsg_BlobOrFileInfo> >, | |
278 blob_or_file_infos) | |
279 IPC_STRUCT_END() | |
280 | |
281 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessValue_Params) | |
282 IPC_STRUCT_MEMBER(int32, ipc_thread_id) | |
283 IPC_STRUCT_MEMBER(int32, ipc_callbacks_id) | |
284 IPC_STRUCT_MEMBER(std::string, value) | |
285 // Sideband data for any blob or file encoded in value. | |
286 IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_BlobOrFileInfo>, blob_or_file_info) | |
287 IPC_STRUCT_END() | |
288 | |
289 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessValueWithKey_Params) | |
290 IPC_STRUCT_MEMBER(int32, ipc_thread_id) | |
291 IPC_STRUCT_MEMBER(int32, ipc_callbacks_id) | |
292 IPC_STRUCT_MEMBER(std::string, value) | |
293 IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key) | |
cmumford
2014/04/08 21:47:26
The other messages only use primary_key when there
ericu
2014/04/08 22:07:11
I used primary_key as that was the name of the par
| |
294 IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, key_path) | |
295 // Sideband data for any blob or file encoded in value. | |
296 IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_BlobOrFileInfo>, blob_or_file_info) | |
259 IPC_STRUCT_END() | 297 IPC_STRUCT_END() |
260 | 298 |
261 IPC_STRUCT_BEGIN(IndexedDBIndexMetadata) | 299 IPC_STRUCT_BEGIN(IndexedDBIndexMetadata) |
262 IPC_STRUCT_MEMBER(int64, id) | 300 IPC_STRUCT_MEMBER(int64, id) |
263 IPC_STRUCT_MEMBER(base::string16, name) | 301 IPC_STRUCT_MEMBER(base::string16, name) |
264 IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, keyPath) | 302 IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, keyPath) |
265 IPC_STRUCT_MEMBER(bool, unique) | 303 IPC_STRUCT_MEMBER(bool, unique) |
266 IPC_STRUCT_MEMBER(bool, multiEntry) | 304 IPC_STRUCT_MEMBER(bool, multiEntry) |
267 IPC_STRUCT_END() | 305 IPC_STRUCT_END() |
268 | 306 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
317 IPC_MESSAGE_CONTROL5(IndexedDBMsg_CallbacksSuccessIDBDatabase, | 355 IPC_MESSAGE_CONTROL5(IndexedDBMsg_CallbacksSuccessIDBDatabase, |
318 int32 /* ipc_thread_id */, | 356 int32 /* ipc_thread_id */, |
319 int32 /* ipc_callbacks_id */, | 357 int32 /* ipc_callbacks_id */, |
320 int32 /* ipc_database_callbacks_id */, | 358 int32 /* ipc_database_callbacks_id */, |
321 int32 /* ipc_database_id */, | 359 int32 /* ipc_database_id */, |
322 IndexedDBDatabaseMetadata) | 360 IndexedDBDatabaseMetadata) |
323 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessIndexedDBKey, | 361 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessIndexedDBKey, |
324 int32 /* ipc_thread_id */, | 362 int32 /* ipc_thread_id */, |
325 int32 /* ipc_callbacks_id */, | 363 int32 /* ipc_callbacks_id */, |
326 content::IndexedDBKey /* indexed_db_key */) | 364 content::IndexedDBKey /* indexed_db_key */) |
327 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessValue, | 365 |
328 int32 /* ipc_thread_id */, | 366 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessValue, |
329 int32 /* ipc_callbacks_id */, | 367 IndexedDBMsg_CallbacksSuccessValue_Params) |
330 std::string /* value */) | 368 |
331 IPC_MESSAGE_CONTROL5(IndexedDBMsg_CallbacksSuccessValueWithKey, | 369 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessValueWithKey, |
332 int32 /* ipc_thread_id */, | 370 IndexedDBMsg_CallbacksSuccessValueWithKey_Params) |
333 int32 /* ipc_callbacks_id */, | 371 |
334 std::string /* value */, | |
335 content::IndexedDBKey /* indexed_db_key */, | |
336 content::IndexedDBKeyPath /* indexed_db_keypath */) | |
337 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessInteger, | 372 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessInteger, |
338 int32 /* ipc_thread_id */, | 373 int32 /* ipc_thread_id */, |
339 int32 /* ipc_callbacks_id */, | 374 int32 /* ipc_callbacks_id */, |
340 int64 /* value */) | 375 int64 /* value */) |
341 IPC_MESSAGE_CONTROL2(IndexedDBMsg_CallbacksSuccessUndefined, | 376 IPC_MESSAGE_CONTROL2(IndexedDBMsg_CallbacksSuccessUndefined, |
342 int32 /* ipc_thread_id */, | 377 int32 /* ipc_thread_id */, |
343 int32 /* ipc_callbacks_id */) | 378 int32 /* ipc_callbacks_id */) |
344 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessStringList, | 379 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessStringList, |
345 int32 /* ipc_thread_id */, | 380 int32 /* ipc_thread_id */, |
346 int32 /* ipc_callbacks_id */, | 381 int32 /* ipc_callbacks_id */, |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
503 int64) /* transaction_id */ | 538 int64) /* transaction_id */ |
504 | 539 |
505 // WebIDBDatabase::commit() message. | 540 // WebIDBDatabase::commit() message. |
506 IPC_MESSAGE_CONTROL2(IndexedDBHostMsg_DatabaseCommit, | 541 IPC_MESSAGE_CONTROL2(IndexedDBHostMsg_DatabaseCommit, |
507 int32, /* ipc_database_id */ | 542 int32, /* ipc_database_id */ |
508 int64) /* transaction_id */ | 543 int64) /* transaction_id */ |
509 | 544 |
510 // WebIDBDatabase::~WebIDBCursor() message. | 545 // WebIDBDatabase::~WebIDBCursor() message. |
511 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_CursorDestroyed, | 546 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_CursorDestroyed, |
512 int32 /* ipc_cursor_id */) | 547 int32 /* ipc_cursor_id */) |
OLD | NEW |