OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_INDEXED_DB_CURSOR_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_CURSOR_IMPL_H_ |
6 #define CONTENT_BROWSER_INDEXED_DB_CURSOR_IMPL_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_CURSOR_IMPL_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
9 #include "content/common/indexed_db/indexed_db.mojom.h" | 11 #include "content/common/indexed_db/indexed_db.mojom.h" |
10 | 12 |
11 namespace base { | 13 namespace base { |
12 class SingleThreadTaskRunner; | 14 class SingleThreadTaskRunner; |
13 } | 15 } |
14 | 16 |
15 namespace content { | 17 namespace content { |
16 | 18 |
17 class IndexedDBCursor; | 19 class IndexedDBCursor; |
18 class IndexedDBDispatcherHost; | 20 class IndexedDBDispatcherHost; |
19 class IndexedDBKey; | 21 class IndexedDBKey; |
20 | 22 |
21 class CursorImpl : public ::indexed_db::mojom::Cursor { | 23 class CursorImpl : public ::indexed_db::mojom::Cursor { |
22 public: | 24 public: |
23 CursorImpl(scoped_refptr<IndexedDBCursor> cursor, | 25 CursorImpl(std::unique_ptr<IndexedDBCursor> cursor, |
24 const url::Origin& origin, | 26 const url::Origin& origin, |
25 scoped_refptr<IndexedDBDispatcherHost> dispatcher_host); | 27 scoped_refptr<IndexedDBDispatcherHost> dispatcher_host); |
26 ~CursorImpl() override; | 28 ~CursorImpl() override; |
27 | 29 |
28 // ::indexed_db::mojom::Cursor implementation | 30 // ::indexed_db::mojom::Cursor implementation |
29 void Advance( | 31 void Advance( |
30 uint32_t count, | 32 uint32_t count, |
31 ::indexed_db::mojom::CallbacksAssociatedPtrInfo callbacks) override; | 33 ::indexed_db::mojom::CallbacksAssociatedPtrInfo callbacks) override; |
32 void Continue( | 34 void Continue( |
33 const IndexedDBKey& key, | 35 const IndexedDBKey& key, |
(...skipping 14 matching lines...) Expand all Loading... |
48 scoped_refptr<IndexedDBDispatcherHost> dispatcher_host_; | 50 scoped_refptr<IndexedDBDispatcherHost> dispatcher_host_; |
49 const url::Origin origin_; | 51 const url::Origin origin_; |
50 scoped_refptr<base::SingleThreadTaskRunner> idb_runner_; | 52 scoped_refptr<base::SingleThreadTaskRunner> idb_runner_; |
51 | 53 |
52 DISALLOW_COPY_AND_ASSIGN(CursorImpl); | 54 DISALLOW_COPY_AND_ASSIGN(CursorImpl); |
53 }; | 55 }; |
54 | 56 |
55 } // namespace content | 57 } // namespace content |
56 | 58 |
57 #endif // CONTENT_BROWSER_INDEXED_DB_CURSOR_IMPL_H_ | 59 #endif // CONTENT_BROWSER_INDEXED_DB_CURSOR_IMPL_H_ |
OLD | NEW |