Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Side by Side Diff: content/common/indexed_db_messages.h

Issue 8779003: Chromium side of IDBIndex.count() and IDBObjectStore.count() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Accomodate worker thread changes Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_key.h" 9 #include "content/common/indexed_db_key.h"
10 #include "content/common/indexed_db_param_traits.h" 10 #include "content/common/indexed_db_param_traits.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // Is the upper bound open? 79 // Is the upper bound open?
80 IPC_STRUCT_MEMBER(bool, upper_open) 80 IPC_STRUCT_MEMBER(bool, upper_open)
81 // The direction of this cursor. 81 // The direction of this cursor.
82 IPC_STRUCT_MEMBER(int32, direction) 82 IPC_STRUCT_MEMBER(int32, direction)
83 // The index the index belongs to. 83 // The index the index belongs to.
84 IPC_STRUCT_MEMBER(int32, idb_index_id) 84 IPC_STRUCT_MEMBER(int32, idb_index_id)
85 // The transaction this request belongs to. 85 // The transaction this request belongs to.
86 IPC_STRUCT_MEMBER(int, transaction_id) 86 IPC_STRUCT_MEMBER(int, transaction_id)
87 IPC_STRUCT_END() 87 IPC_STRUCT_END()
88 88
89 // Used for counting values within an index IndexedDB.
90 IPC_STRUCT_BEGIN(IndexedDBHostMsg_IndexCount_Params)
91 // The response should have these ids.
92 IPC_STRUCT_MEMBER(int32, thread_id)
93 IPC_STRUCT_MEMBER(int32, response_id)
94 // The serialized lower key.
95 IPC_STRUCT_MEMBER(IndexedDBKey, lower_key)
96 // The serialized upper key.
97 IPC_STRUCT_MEMBER(IndexedDBKey, upper_key)
98 // Is the lower bound open?
99 IPC_STRUCT_MEMBER(bool, lower_open)
100 // Is the upper bound open?
101 IPC_STRUCT_MEMBER(bool, upper_open)
102 // The index the index belongs to.
103 IPC_STRUCT_MEMBER(int32, idb_index_id)
104 // The transaction this request belongs to.
105 IPC_STRUCT_MEMBER(int, transaction_id)
106 IPC_STRUCT_END()
107
89 // Used to set a value in an object store. 108 // Used to set a value in an object store.
90 IPC_STRUCT_BEGIN(IndexedDBHostMsg_ObjectStorePut_Params) 109 IPC_STRUCT_BEGIN(IndexedDBHostMsg_ObjectStorePut_Params)
91 // The object store's id. 110 // The object store's id.
92 IPC_STRUCT_MEMBER(int32, idb_object_store_id) 111 IPC_STRUCT_MEMBER(int32, idb_object_store_id)
93 // The id any response should contain. 112 // The id any response should contain.
94 IPC_STRUCT_MEMBER(int32, thread_id) 113 IPC_STRUCT_MEMBER(int32, thread_id)
95 IPC_STRUCT_MEMBER(int32, response_id) 114 IPC_STRUCT_MEMBER(int32, response_id)
96 // The value to set. 115 // The value to set.
97 IPC_STRUCT_MEMBER(content::SerializedScriptValue, serialized_value) 116 IPC_STRUCT_MEMBER(content::SerializedScriptValue, serialized_value)
98 // The key to set it on (may not be "valid"/set in some cases). 117 // The key to set it on (may not be "valid"/set in some cases).
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params) 180 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params)
162 IPC_STRUCT_MEMBER(int32, thread_id) 181 IPC_STRUCT_MEMBER(int32, thread_id)
163 IPC_STRUCT_MEMBER(int32, response_id) 182 IPC_STRUCT_MEMBER(int32, response_id)
164 IPC_STRUCT_MEMBER(int32, cursor_id) 183 IPC_STRUCT_MEMBER(int32, cursor_id)
165 IPC_STRUCT_MEMBER(std::vector<IndexedDBKey>, keys) 184 IPC_STRUCT_MEMBER(std::vector<IndexedDBKey>, keys)
166 IPC_STRUCT_MEMBER(std::vector<IndexedDBKey>, primary_keys) 185 IPC_STRUCT_MEMBER(std::vector<IndexedDBKey>, primary_keys)
167 IPC_STRUCT_MEMBER(std::vector<content::SerializedScriptValue>, values) 186 IPC_STRUCT_MEMBER(std::vector<content::SerializedScriptValue>, values)
168 IPC_STRUCT_END() 187 IPC_STRUCT_END()
169 188
170 189
190 // Used to count within an IndexedDB object store.
191 IPC_STRUCT_BEGIN(IndexedDBHostMsg_ObjectStoreCount_Params)
192 // The response should have these ids.
193 IPC_STRUCT_MEMBER(int32, thread_id)
194 IPC_STRUCT_MEMBER(int32, response_id)
195 // The serialized lower key.
196 IPC_STRUCT_MEMBER(IndexedDBKey, lower_key)
197 // The serialized upper key.
198 IPC_STRUCT_MEMBER(IndexedDBKey, upper_key)
199 // Is the lower bound open?
200 IPC_STRUCT_MEMBER(bool, lower_open)
201 // Is the upper bound open?
202 IPC_STRUCT_MEMBER(bool, upper_open)
203 // The object store the cursor belongs to.
204 IPC_STRUCT_MEMBER(int32, idb_object_store_id)
205 // The transaction this request belongs to.
206 IPC_STRUCT_MEMBER(int, transaction_id)
207 IPC_STRUCT_END()
208
171 // Indexed DB messages sent from the browser to the renderer. 209 // Indexed DB messages sent from the browser to the renderer.
172 210
173 // The thread_id needs to be the first parameter in these messages. In the IO 211 // The thread_id needs to be the first parameter in these messages. In the IO
174 // thread on the renderer/client process, an IDB message filter assumes the 212 // thread on the renderer/client process, an IDB message filter assumes the
175 // thread_id is the first int. 213 // thread_id is the first int.
176 214
177 // IDBCallback message handlers. 215 // IDBCallback message handlers.
178 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessIDBCursor, 216 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessIDBCursor,
179 IndexedDBMsg_CallbacksSuccessIDBCursor_Params) 217 IndexedDBMsg_CallbacksSuccessIDBCursor_Params)
180 218
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 // WebIDBIndex::openObjectCursor() message. 406 // WebIDBIndex::openObjectCursor() message.
369 IPC_SYNC_MESSAGE_CONTROL1_1(IndexedDBHostMsg_IndexOpenObjectCursor, 407 IPC_SYNC_MESSAGE_CONTROL1_1(IndexedDBHostMsg_IndexOpenObjectCursor,
370 IndexedDBHostMsg_IndexOpenCursor_Params, 408 IndexedDBHostMsg_IndexOpenCursor_Params,
371 WebKit::WebExceptionCode /* ec */) 409 WebKit::WebExceptionCode /* ec */)
372 410
373 // WebIDBIndex::openKeyCursor() message. 411 // WebIDBIndex::openKeyCursor() message.
374 IPC_SYNC_MESSAGE_CONTROL1_1(IndexedDBHostMsg_IndexOpenKeyCursor, 412 IPC_SYNC_MESSAGE_CONTROL1_1(IndexedDBHostMsg_IndexOpenKeyCursor,
375 IndexedDBHostMsg_IndexOpenCursor_Params, 413 IndexedDBHostMsg_IndexOpenCursor_Params,
376 WebKit::WebExceptionCode /* ec */) 414 WebKit::WebExceptionCode /* ec */)
377 415
416 // WebIDBIndex::count() message.
417 IPC_SYNC_MESSAGE_CONTROL1_1(IndexedDBHostMsg_IndexCount,
418 IndexedDBHostMsg_IndexCount_Params,
419 WebKit::WebExceptionCode /* ec */)
420
378 // WebIDBIndex::getObject() message. 421 // WebIDBIndex::getObject() message.
379 IPC_SYNC_MESSAGE_CONTROL5_1(IndexedDBHostMsg_IndexGetObject, 422 IPC_SYNC_MESSAGE_CONTROL5_1(IndexedDBHostMsg_IndexGetObject,
380 int32, /* idb_index_id */ 423 int32, /* idb_index_id */
381 int32, /* thread_id */ 424 int32, /* thread_id */
382 int32, /* response_id */ 425 int32, /* response_id */
383 IndexedDBKey, /* key */ 426 IndexedDBKey, /* key */
384 int32, /* transaction_id */ 427 int32, /* transaction_id */
385 WebKit::WebExceptionCode /* ec */) 428 WebKit::WebExceptionCode /* ec */)
386 429
387 // WebIDBIndex::getKey() message. 430 // WebIDBIndex::getKey() message.
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 int32, /* idb_object_store_id */ 504 int32, /* idb_object_store_id */
462 string16, /* name */ 505 string16, /* name */
463 int32, /* transaction_id */ 506 int32, /* transaction_id */
464 WebKit::WebExceptionCode /* ec */) 507 WebKit::WebExceptionCode /* ec */)
465 508
466 // WebIDBObjectStore::openCursor() message. 509 // WebIDBObjectStore::openCursor() message.
467 IPC_SYNC_MESSAGE_CONTROL1_1(IndexedDBHostMsg_ObjectStoreOpenCursor, 510 IPC_SYNC_MESSAGE_CONTROL1_1(IndexedDBHostMsg_ObjectStoreOpenCursor,
468 IndexedDBHostMsg_ObjectStoreOpenCursor_Params, 511 IndexedDBHostMsg_ObjectStoreOpenCursor_Params,
469 WebKit::WebExceptionCode /* ec */) 512 WebKit::WebExceptionCode /* ec */)
470 513
514 // WebIDBObjectStore::count() message.
515 IPC_SYNC_MESSAGE_CONTROL1_1(IndexedDBHostMsg_ObjectStoreCount,
516 IndexedDBHostMsg_ObjectStoreCount_Params,
517 WebKit::WebExceptionCode /* ec */)
518
471 // WebIDBObjectStore::~WebIDBObjectStore() message. 519 // WebIDBObjectStore::~WebIDBObjectStore() message.
472 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_ObjectStoreDestroyed, 520 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_ObjectStoreDestroyed,
473 int32 /* idb_object_store_id */) 521 int32 /* idb_object_store_id */)
474 522
475 // WebIDBDatabase::~WebIDBCursor() message. 523 // WebIDBDatabase::~WebIDBCursor() message.
476 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_CursorDestroyed, 524 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_CursorDestroyed,
477 int32 /* idb_cursor_id */) 525 int32 /* idb_cursor_id */)
478 526
479 // IDBTransaction::ObjectStore message. 527 // IDBTransaction::ObjectStore message.
480 IPC_SYNC_MESSAGE_CONTROL2_2(IndexedDBHostMsg_TransactionObjectStore, 528 IPC_SYNC_MESSAGE_CONTROL2_2(IndexedDBHostMsg_TransactionObjectStore,
(...skipping 11 matching lines...) Expand all
492 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionAbort, 540 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionAbort,
493 int32 /* idb_transaction_id */) 541 int32 /* idb_transaction_id */)
494 542
495 // IDBTransaction::DidCompleteTaskEvents() message. 543 // IDBTransaction::DidCompleteTaskEvents() message.
496 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionDidCompleteTaskEvents, 544 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionDidCompleteTaskEvents,
497 int32 /* idb_transaction_id */) 545 int32 /* idb_transaction_id */)
498 546
499 // WebIDBTransaction::~WebIDBTransaction() message. 547 // WebIDBTransaction::~WebIDBTransaction() message.
500 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionDestroyed, 548 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionDestroyed,
501 int32 /* idb_transaction_id */) 549 int32 /* idb_transaction_id */)
OLDNEW
« no previous file with comments | « content/browser/in_process_webkit/indexed_db_dispatcher_host.cc ('k') | content/renderer/indexed_db_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698