diff options
author | jorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-06 21:27:17 +0000 |
---|---|---|
committer | jorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-06 21:27:17 +0000 |
commit | 6450c6e0b529029790ca3ae00aeae89f4340ff51 (patch) | |
tree | c2405188e7bb6aeb7fc014a6661a751db1f72086 /chrome/renderer/indexed_db_dispatcher.h | |
parent | 5a90bd13b08d53364929beacafcfa8640ba167b1 (diff) | |
download | chromium_src-6450c6e0b529029790ca3ae00aeae89f4340ff51.zip chromium_src-6450c6e0b529029790ca3ae00aeae89f4340ff51.tar.gz chromium_src-6450c6e0b529029790ca3ae00aeae89f4340ff51.tar.bz2 |
Fix up the IndexedDB plumbing layers to match the latest WebKit code.
Landing http://codereview.chromium.org/3550015/show
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/3575019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61709 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/indexed_db_dispatcher.h')
-rw-r--r-- | chrome/renderer/indexed_db_dispatcher.h | 53 |
1 files changed, 22 insertions, 31 deletions
diff --git a/chrome/renderer/indexed_db_dispatcher.h b/chrome/renderer/indexed_db_dispatcher.h index 2868358..8e78141 100644 --- a/chrome/renderer/indexed_db_dispatcher.h +++ b/chrome/renderer/indexed_db_dispatcher.h @@ -19,6 +19,7 @@ class SerializedScriptValue; namespace WebKit { class WebFrame; class WebIDBKeyRange; +class WebIDBTransaction; } // Handle the indexed db related communication for this entire renderer. @@ -50,15 +51,6 @@ class IndexedDBDispatcher { WebKit::WebIDBCallbacks* callbacks_ptr, int32 idb_cursor_id); - void RequestIDBDatabaseCreateObjectStore( - const string16& name, const NullableString16& key_path, - bool auto_increment, WebKit::WebIDBCallbacks* callbacks, - int32 idb_database_id); - - void RequestIDBDatabaseRemoveObjectStore( - const string16& name, WebKit::WebIDBCallbacks* callbacks, - int32 idb_database_id); - void RequestIDBDatabaseSetVersion( const string16& version, WebKit::WebIDBCallbacks* callbacks, @@ -69,58 +61,54 @@ class IndexedDBDispatcher { unsigned short direction, WebKit::WebIDBCallbacks* callbacks, int32 idb_index_id, - int transaction_id); + const WebKit::WebIDBTransaction& transaction); void RequestIDBIndexOpenCursor(const WebKit::WebIDBKeyRange& idb_key_range, unsigned short direction, WebKit::WebIDBCallbacks* callbacks, int32 idb_index_id, - int transaction_id); + const WebKit::WebIDBTransaction& transaction); void RequestIDBIndexGetObject(const IndexedDBKey& key, WebKit::WebIDBCallbacks* callbacks, int32 idb_index_id, - int transaction_id); + const WebKit::WebIDBTransaction& transaction); void RequestIDBIndexGet(const IndexedDBKey& key, WebKit::WebIDBCallbacks* callbacks, int32 idb_index_id, - int transaction_id); + const WebKit::WebIDBTransaction& transaction); void RequestIDBObjectStoreGet(const IndexedDBKey& key, WebKit::WebIDBCallbacks* callbacks, int32 idb_object_store_id, - int transaction_id); + const WebKit::WebIDBTransaction& transaction); void RequestIDBObjectStorePut(const SerializedScriptValue& value, const IndexedDBKey& key, bool add_only, WebKit::WebIDBCallbacks* callbacks, int32 idb_object_store_id, - int transaction_id); - - void RequestIDBObjectStoreRemove(const IndexedDBKey& key, - WebKit::WebIDBCallbacks* callbacks, - int32 idb_object_store_id, - int transaction_id); + const WebKit::WebIDBTransaction& transaction); - void RequestIDBObjectStoreCreateIndex( - const string16& name, const NullableString16& key_path, bool unique, - WebKit::WebIDBCallbacks* callbacks, int32 idb_object_store_id); - - void RequestIDBObjectStoreRemoveIndex( - const string16& name, WebKit::WebIDBCallbacks* callbacks, - int32 idb_object_store_id); + void RequestIDBObjectStoreRemove( + const IndexedDBKey& key, + WebKit::WebIDBCallbacks* callbacks, + int32 idb_object_store_id, + const WebKit::WebIDBTransaction& transaction); void RequestIDBObjectStoreOpenCursor( const WebKit::WebIDBKeyRange& idb_key_range, unsigned short direction, WebKit::WebIDBCallbacks* callbacks, int32 idb_object_store_id, - int transaction_id); + const WebKit::WebIDBTransaction& transaction); + + void RegisterWebIDBTransactionCallbacks( + WebKit::WebIDBTransactionCallbacks* callbacks, + int32 id); - void RequestIDBTransactionSetCallbacks( - WebKit::WebIDBTransactionCallbacks* callbacks); + static int32 TransactionId(const WebKit::WebIDBTransaction& transaction); private: // IDBCallback message handlers. @@ -128,12 +116,15 @@ class IndexedDBDispatcher { void OnSuccessIDBDatabase(int32 response_id, int32 object_id); void OnSuccessIndexedDBKey(int32 response_id, const IndexedDBKey& key); void OnSuccessIDBObjectStore(int32 response_id, int32 object_id); + void OnSuccessIDBTransaction(int32 response_id, int32 object_id); void OnSuccessIDBIndex(int32 response_id, int32 object_id); void OnSuccessOpenCursor(int32 response_id, int32 object_id); void OnSuccessSerializedScriptValue(int32 response_id, const SerializedScriptValue& value); void OnError(int32 response_id, int code, const string16& message); - void OnAbort(int transaction_id); + void OnAbort(int32 transaction_id); + void OnComplete(int32 transaction_id); + void OnTimeout(int32 transaction_id); // Careful! WebIDBCallbacks wraps non-threadsafe data types. It must be // destroyed and used on the same thread it was created on. |