diff options
author | jorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 14:29:40 +0000 |
---|---|---|
committer | jorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 14:29:40 +0000 |
commit | 5c71640cdf15c2782b8331e9e2623da50ec5d102 (patch) | |
tree | da7cf7505bb23c3e206bdcaab66f064d3edc5936 /chrome/renderer/indexed_db_dispatcher.h | |
parent | 699f2246bf56e1aadf31e1edd6c5aef9b4b39638 (diff) | |
download | chromium_src-5c71640cdf15c2782b8331e9e2623da50ec5d102.zip chromium_src-5c71640cdf15c2782b8331e9e2623da50ec5d102.tar.gz chromium_src-5c71640cdf15c2782b8331e9e2623da50ec5d102.tar.bz2 |
The Chrome half of implementing get/put/remove for object stores (https://bugs.webkit.org/show_bug.cgi?id=41250).
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/2830030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52313 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/indexed_db_dispatcher.h')
-rw-r--r-- | chrome/renderer/indexed_db_dispatcher.h | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/chrome/renderer/indexed_db_dispatcher.h b/chrome/renderer/indexed_db_dispatcher.h index a9eb1cb..e405ea9 100644 --- a/chrome/renderer/indexed_db_dispatcher.h +++ b/chrome/renderer/indexed_db_dispatcher.h @@ -6,11 +6,14 @@ #define CHROME_RENDERER_INDEXED_DB_DISPATCHER_H_ #include "base/id_map.h" -#include "base/string16.h" +#include "base/nullable_string16.h" #include "ipc/ipc_message.h" #include "third_party/WebKit/WebKit/chromium/public/WebIDBCallbacks.h" #include "third_party/WebKit/WebKit/chromium/public/WebIDBDatabase.h" +class IndexedDBKey; +class SerializedScriptValue; + namespace WebKit { class WebFrame; } @@ -31,15 +34,29 @@ class IndexedDBDispatcher { WebKit::WebFrame* web_frame); void RequestIDBDatabaseCreateObjectStore( - const string16& name, const string16& keypath, bool auto_increment, - WebKit::WebIDBCallbacks* callbacks, int32 idb_database_id); + 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 RequestIDBObjectStoreGet( + const IndexedDBKey& key, WebKit::WebIDBCallbacks* callbacks, + int32 idb_object_store_id); + + void RequestIDBObjectStorePut( + const SerializedScriptValue& value, const IndexedDBKey& key, + bool add_only, WebKit::WebIDBCallbacks* callbacks, + int32 idb_object_store_id); + + void RequestIDBObjectStoreRemove( + const IndexedDBKey& key, WebKit::WebIDBCallbacks* callbacks, + int32 idb_object_store_id); + void RequestIDBObjectStoreCreateIndex( - const string16& name, const string16& keypath, bool unique, + const string16& name, const NullableString16& key_path, bool unique, WebKit::WebIDBCallbacks* callbacks, int32 idb_object_store_id); void RequestIDBObjectStoreRemoveIndex( @@ -48,10 +65,13 @@ class IndexedDBDispatcher { private: // IDBCallback message handlers. - void OnSuccessReturnNull(int32 response_id); - void OnSuccessCreateIDBDatabase(int32 response_id, int32 object_id); - void OnSuccessCreateIDBObjectStore(int32 response_id, int32 object_id); - void OnSuccessCreateIDBIndex(int32 response_id, int32 object_id); + void OnSuccessNull(int32 response_id); + 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 OnSuccessIDBIndex(int32 response_id, int32 object_id); + void OnSuccessSerializedScriptValue(int32 response_id, + const SerializedScriptValue& value); void OnError(int32 response_id, int code, const string16& message); // Careful! WebIDBCallbacks wraps non-threadsafe data types. It must be |