summaryrefslogtreecommitdiffstats
path: root/content/common/indexed_db/indexed_db_dispatcher.cc
diff options
context:
space:
mode:
authoralecflett@chromium.org <alecflett@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-19 02:35:33 +0000
committeralecflett@chromium.org <alecflett@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-19 02:35:33 +0000
commit9fee277fa201cc1c1290dad08d5898130308cef4 (patch)
treef6f222ce99ee1dd57e0b4411ec79b723ae34985f /content/common/indexed_db/indexed_db_dispatcher.cc
parent05b6a82cc9bb9215c8e86ce6113c537e9da1064d (diff)
downloadchromium_src-9fee277fa201cc1c1290dad08d5898130308cef4.zip
chromium_src-9fee277fa201cc1c1290dad08d5898130308cef4.tar.gz
chromium_src-9fee277fa201cc1c1290dad08d5898130308cef4.tar.bz2
IndexedDB: Support get/getKey(keyRange)
This is the Chromium IPC plumbing to talk to the WebKit API. This won't be used until https://bugs.webkit.org/show_bug.cgi?id=83638 is fixed. BUG=92047 Review URL: http://codereview.chromium.org/10083053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132918 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/indexed_db/indexed_db_dispatcher.cc')
-rw-r--r--content/common/indexed_db/indexed_db_dispatcher.cc50
1 files changed, 50 insertions, 0 deletions
diff --git a/content/common/indexed_db/indexed_db_dispatcher.cc b/content/common/indexed_db/indexed_db_dispatcher.cc
index a914f9e..ccb123f 100644
--- a/content/common/indexed_db/indexed_db_dispatcher.cc
+++ b/content/common/indexed_db/indexed_db_dispatcher.cc
@@ -369,6 +369,23 @@ void IndexedDBDispatcher::RequestIDBIndexGetObject(
pending_callbacks_.Remove(response_id);
}
+void IndexedDBDispatcher::RequestIDBIndexGetObjectByRange(
+ const IndexedDBKeyRange& key_range,
+ WebIDBCallbacks* callbacks_ptr,
+ int32 idb_index_id,
+ const WebIDBTransaction& transaction,
+ WebExceptionCode* ec) {
+ ResetCursorPrefetchCaches();
+ scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
+ int32 response_id = pending_callbacks_.Add(callbacks.release());
+ Send(new IndexedDBHostMsg_IndexGetObjectByRange(
+ idb_index_id, CurrentWorkerId(),
+ response_id, key_range,
+ TransactionId(transaction), ec));
+ if (*ec)
+ pending_callbacks_.Remove(response_id);
+}
+
void IndexedDBDispatcher::RequestIDBIndexGetKey(
const IndexedDBKey& key,
WebIDBCallbacks* callbacks_ptr,
@@ -385,6 +402,22 @@ void IndexedDBDispatcher::RequestIDBIndexGetKey(
pending_callbacks_.Remove(response_id);
}
+void IndexedDBDispatcher::RequestIDBIndexGetKeyByRange(
+ const IndexedDBKeyRange& key_range,
+ WebIDBCallbacks* callbacks_ptr,
+ int32 idb_index_id,
+ const WebIDBTransaction& transaction,
+ WebExceptionCode* ec) {
+ ResetCursorPrefetchCaches();
+ scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
+ int32 response_id = pending_callbacks_.Add(callbacks.release());
+ Send(new IndexedDBHostMsg_IndexGetKeyByRange(
+ idb_index_id, CurrentWorkerId(), response_id, key_range,
+ TransactionId(transaction), ec));
+ if (*ec)
+ pending_callbacks_.Remove(response_id);
+}
+
void IndexedDBDispatcher::RequestIDBObjectStoreGet(
const IndexedDBKey& key,
WebIDBCallbacks* callbacks_ptr,
@@ -402,6 +435,23 @@ void IndexedDBDispatcher::RequestIDBObjectStoreGet(
pending_callbacks_.Remove(response_id);
}
+void IndexedDBDispatcher::RequestIDBObjectStoreGetByRange(
+ const IndexedDBKeyRange& key_range,
+ WebIDBCallbacks* callbacks_ptr,
+ int32 idb_object_store_id,
+ const WebIDBTransaction& transaction,
+ WebExceptionCode* ec) {
+ ResetCursorPrefetchCaches();
+ scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
+
+ int32 response_id = pending_callbacks_.Add(callbacks.release());
+ Send(new IndexedDBHostMsg_ObjectStoreGetByRange(
+ idb_object_store_id, CurrentWorkerId(), response_id,
+ key_range, TransactionId(transaction), ec));
+ if (*ec)
+ pending_callbacks_.Remove(response_id);
+}
+
void IndexedDBDispatcher::RequestIDBObjectStorePut(
const content::SerializedScriptValue& value,
const IndexedDBKey& key,