diff options
author | jorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-17 11:27:26 +0000 |
---|---|---|
committer | jorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-17 11:27:26 +0000 |
commit | e7fd1980c7fbe92aea58b6d7256770d7be9ac621 (patch) | |
tree | a5ad99c8f423f086d79bd1612ebf517434650ea4 /chrome/renderer/indexed_db_dispatcher.cc | |
parent | 56d73f2dcb38999c4ec15f8a9c5236bf1ab5cf2d (diff) | |
download | chromium_src-e7fd1980c7fbe92aea58b6d7256770d7be9ac621.zip chromium_src-e7fd1980c7fbe92aea58b6d7256770d7be9ac621.tar.gz chromium_src-e7fd1980c7fbe92aea58b6d7256770d7be9ac621.tar.bz2 |
Add IDBIndex plumbing (for IndexedDB).
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3442001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59780 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/indexed_db_dispatcher.cc')
-rw-r--r-- | chrome/renderer/indexed_db_dispatcher.cc | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/chrome/renderer/indexed_db_dispatcher.cc b/chrome/renderer/indexed_db_dispatcher.cc index fa6d307..3ba6f08 100644 --- a/chrome/renderer/indexed_db_dispatcher.cc +++ b/chrome/renderer/indexed_db_dispatcher.cc @@ -149,6 +149,56 @@ void IndexedDBDispatcher::RequestIDBDatabaseSetVersion( version)); } +void IndexedDBDispatcher::RequestIDBIndexOpenObjectCursor( + const WebIDBKeyRange& idb_key_range, unsigned short direction, + WebIDBCallbacks* callbacks_ptr, int32 idb_index_id) { + scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr); + ViewHostMsg_IDBIndexOpenCursor_Params params; + params.response_id_ = pending_callbacks_.Add(callbacks.release()); + params.left_key_.Set(idb_key_range.left()); + params.right_key_.Set(idb_key_range.right()); + params.key_flags_ = idb_key_range.flags(); + params.direction_ = direction; + params.idb_index_id_ = idb_index_id; + RenderThread::current()->Send( + new ViewHostMsg_IDBIndexOpenObjectCursor(params)); +} + +void IndexedDBDispatcher::RequestIDBIndexOpenCursor( + const WebIDBKeyRange& idb_key_range, unsigned short direction, + WebIDBCallbacks* callbacks_ptr, int32 idb_index_id) { + scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr); + ViewHostMsg_IDBIndexOpenCursor_Params params; + params.response_id_ = pending_callbacks_.Add(callbacks.release()); + params.left_key_.Set(idb_key_range.left()); + params.right_key_.Set(idb_key_range.right()); + params.key_flags_ = idb_key_range.flags(); + params.direction_ = direction; + params.idb_index_id_ = idb_index_id; + RenderThread::current()->Send( + new ViewHostMsg_IDBIndexOpenCursor(params)); +} + +void IndexedDBDispatcher::RequestIDBIndexGetObject( + const IndexedDBKey& key, WebKit::WebIDBCallbacks* callbacks_ptr, + int32 idb_index_id) { + scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr); + + RenderThread::current()->Send( + new ViewHostMsg_IDBIndexGetObject( + idb_index_id, pending_callbacks_.Add(callbacks.release()), key)); +} + +void IndexedDBDispatcher::RequestIDBIndexGet( + const IndexedDBKey& key, WebKit::WebIDBCallbacks* callbacks_ptr, + int32 idb_index_id) { + scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr); + + RenderThread::current()->Send( + new ViewHostMsg_IDBIndexGet( + idb_index_id, pending_callbacks_.Add(callbacks.release()), key)); +} + void IndexedDBDispatcher::RequestIDBObjectStoreGet( const IndexedDBKey& key, WebKit::WebIDBCallbacks* callbacks_ptr, int32 idb_object_store_id) { |