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 | |
11 namespace content { | |
12 | |
13 WebIDBCursorImpl::WebIDBCursorImpl( | |
14 scoped_refptr<IndexedDBCursor> idb_cursor_backend) | |
15 : idb_cursor_backend_(idb_cursor_backend) {} | |
16 | |
17 WebIDBCursorImpl::~WebIDBCursorImpl() {} | |
18 | |
19 void WebIDBCursorImpl::advance(unsigned long count, | |
20 IndexedDBCallbacksBase* callbacks) { | |
21 idb_cursor_backend_->Advance(count, | |
22 IndexedDBCallbacksWrapper::Create(callbacks)); | |
23 } | |
24 | |
25 void WebIDBCursorImpl::continueFunction(const IndexedDBKey& key, | |
26 IndexedDBCallbacksBase* callbacks) { | |
27 idb_cursor_backend_->ContinueFunction( | |
28 make_scoped_ptr(new IndexedDBKey(key)), | |
29 IndexedDBCallbacksWrapper::Create(callbacks)); | |
30 } | |
31 | |
32 void WebIDBCursorImpl::prefetchContinue(int number_to_fetch, | |
33 IndexedDBCallbacksBase* callbacks) { | |
34 idb_cursor_backend_->PrefetchContinue( | |
35 number_to_fetch, IndexedDBCallbacksWrapper::Create(callbacks)); | |
36 } | |
37 | |
38 void WebIDBCursorImpl::prefetchReset(int used_prefetches, | |
39 int unused_prefetches) { | |
40 idb_cursor_backend_->PrefetchReset(used_prefetches, unused_prefetches); | |
41 } | |
42 | |
43 } // namespace content | |
OLD | NEW |