OLD | NEW |
| (Empty) |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "content/browser/indexed_db/webidbcursor_impl.h" | |
6 | |
7 #include "content/browser/indexed_db/indexed_db_callbacks_wrapper.h" | |
8 #include "content/browser/indexed_db/indexed_db_cursor.h" | |
9 #include "content/common/indexed_db/indexed_db_key.h" | |
10 #include "third_party/WebKit/Source/Platform/chromium/public/WebIDBKey.h" | |
11 | |
12 using WebKit::WebIDBCallbacks; | |
13 | |
14 namespace content { | |
15 | |
16 WebIDBCursorImpl::WebIDBCursorImpl( | |
17 scoped_refptr<IndexedDBCursor> idb_cursor_backend) | |
18 : idb_cursor_backend_(idb_cursor_backend) {} | |
19 | |
20 WebIDBCursorImpl::~WebIDBCursorImpl() {} | |
21 | |
22 void WebIDBCursorImpl::advance(unsigned long count, | |
23 WebIDBCallbacks* callbacks) { | |
24 idb_cursor_backend_->Advance(count, | |
25 IndexedDBCallbacksWrapper::Create(callbacks)); | |
26 } | |
27 | |
28 void WebIDBCursorImpl::continueFunction(const WebKit::WebIDBKey& key, | |
29 WebIDBCallbacks* callbacks) { | |
30 idb_cursor_backend_->ContinueFunction( | |
31 make_scoped_ptr(new IndexedDBKey(key)), | |
32 IndexedDBCallbacksWrapper::Create(callbacks)); | |
33 } | |
34 | |
35 void WebIDBCursorImpl::deleteFunction(WebIDBCallbacks* callbacks) { | |
36 idb_cursor_backend_->DeleteFunction( | |
37 IndexedDBCallbacksWrapper::Create(callbacks)); | |
38 } | |
39 | |
40 void WebIDBCursorImpl::prefetchContinue(int number_to_fetch, | |
41 WebKit::WebIDBCallbacks* callbacks) { | |
42 idb_cursor_backend_->PrefetchContinue( | |
43 number_to_fetch, IndexedDBCallbacksWrapper::Create(callbacks)); | |
44 } | |
45 | |
46 void WebIDBCursorImpl::prefetchReset(int used_prefetches, | |
47 int unused_prefetches) { | |
48 idb_cursor_backend_->PrefetchReset(used_prefetches, unused_prefetches); | |
49 } | |
50 | |
51 } // namespace content | |
OLD | NEW |