OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 #ifndef CONTENT_BROWSER_INDEXED_DB_CURSOR_IMPL_H_ |
| 6 #define CONTENT_BROWSER_INDEXED_DB_CURSOR_IMPL_H_ |
| 7 |
| 8 #include "base/memory/ref_counted.h" |
| 9 #include "content/common/indexed_db/indexed_db.mojom.h" |
| 10 |
| 11 namespace base { |
| 12 class SingleThreadTaskRunner; |
| 13 } |
| 14 |
| 15 namespace content { |
| 16 |
| 17 class IndexedDBCursor; |
| 18 class IndexedDBDispatcherHost; |
| 19 class IndexedDBKey; |
| 20 |
| 21 class CursorImpl : public ::indexed_db::mojom::Cursor { |
| 22 public: |
| 23 CursorImpl(scoped_refptr<IndexedDBCursor> cursor, |
| 24 const url::Origin& origin, |
| 25 scoped_refptr<IndexedDBDispatcherHost> dispatcher_host); |
| 26 ~CursorImpl() override; |
| 27 |
| 28 // ::indexed_db::mojom::Cursor implementation |
| 29 void Advance( |
| 30 uint32_t count, |
| 31 ::indexed_db::mojom::CallbacksAssociatedPtrInfo callbacks) override; |
| 32 void Continue( |
| 33 const IndexedDBKey& key, |
| 34 const IndexedDBKey& primary_key, |
| 35 ::indexed_db::mojom::CallbacksAssociatedPtrInfo callbacks) override; |
| 36 void Prefetch( |
| 37 int32_t count, |
| 38 ::indexed_db::mojom::CallbacksAssociatedPtrInfo callbacks) override; |
| 39 void PrefetchReset( |
| 40 int32_t used_prefetches, |
| 41 int32_t unused_prefetches, |
| 42 const std::vector<std::string>& unused_blob_uuids) override; |
| 43 |
| 44 private: |
| 45 class IDBThreadHelper; |
| 46 |
| 47 IDBThreadHelper* helper_; |
| 48 scoped_refptr<IndexedDBDispatcherHost> dispatcher_host_; |
| 49 const url::Origin origin_; |
| 50 scoped_refptr<base::SingleThreadTaskRunner> idb_runner_; |
| 51 |
| 52 DISALLOW_COPY_AND_ASSIGN(CursorImpl); |
| 53 }; |
| 54 |
| 55 } // namespace content |
| 56 |
| 57 #endif // CONTENT_BROWSER_INDEXED_DB_CURSOR_IMPL_H_ |
OLD | NEW |