Index: content/browser/indexed_db/webidbcursor_impl.cc |
diff --git a/content/browser/indexed_db/webidbcursor_impl.cc b/content/browser/indexed_db/webidbcursor_impl.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..629ebaf5ed78d5f0e2bc408e6113b2ae6d4df45b |
--- /dev/null |
+++ b/content/browser/indexed_db/webidbcursor_impl.cc |
@@ -0,0 +1,51 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "content/browser/indexed_db/webidbcursor_impl.h" |
+ |
+#include "content/browser/indexed_db/indexed_db_callbacks_wrapper.h" |
+#include "content/browser/indexed_db/indexed_db_cursor.h" |
+#include "content/common/indexed_db/indexed_db_key.h" |
+#include "third_party/WebKit/public/platform/WebIDBKey.h" |
+ |
+using WebKit::WebIDBCallbacks; |
+ |
+namespace content { |
+ |
+WebIDBCursorImpl::WebIDBCursorImpl( |
+ scoped_refptr<IndexedDBCursor> idb_cursor_backend) |
+ : idb_cursor_backend_(idb_cursor_backend) {} |
+ |
+WebIDBCursorImpl::~WebIDBCursorImpl() {} |
+ |
+void WebIDBCursorImpl::advance(unsigned long count, |
+ WebIDBCallbacks* callbacks) { |
+ idb_cursor_backend_->Advance(count, |
+ IndexedDBCallbacksWrapper::Create(callbacks)); |
+} |
+ |
+void WebIDBCursorImpl::continueFunction(const WebKit::WebIDBKey& key, |
+ WebIDBCallbacks* callbacks) { |
+ idb_cursor_backend_->ContinueFunction( |
+ make_scoped_ptr(new IndexedDBKey(key)), |
+ IndexedDBCallbacksWrapper::Create(callbacks)); |
+} |
+ |
+void WebIDBCursorImpl::deleteFunction(WebIDBCallbacks* callbacks) { |
+ idb_cursor_backend_->DeleteFunction( |
+ IndexedDBCallbacksWrapper::Create(callbacks)); |
+} |
+ |
+void WebIDBCursorImpl::prefetchContinue(int number_to_fetch, |
+ WebKit::WebIDBCallbacks* callbacks) { |
+ idb_cursor_backend_->PrefetchContinue( |
+ number_to_fetch, IndexedDBCallbacksWrapper::Create(callbacks)); |
+} |
+ |
+void WebIDBCursorImpl::prefetchReset(int used_prefetches, |
+ int unused_prefetches) { |
+ idb_cursor_backend_->PrefetchReset(used_prefetches, unused_prefetches); |
+} |
+ |
+} // namespace content |