Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(367)

Unified Diff: content/browser/indexed_db/cursor_impl.h

Issue 2500263003: Port messages sent by WebIDBCursorImpl to Mojo. (Closed)
Patch Set: Address dcheng@'s comments. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/indexed_db/cursor_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/indexed_db/cursor_impl.h
diff --git a/content/browser/indexed_db/cursor_impl.h b/content/browser/indexed_db/cursor_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..a0b66c0594638b1115f87bcc37e70d947580b30d
--- /dev/null
+++ b/content/browser/indexed_db/cursor_impl.h
@@ -0,0 +1,57 @@
+// Copyright 2016 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.
+
+#ifndef CONTENT_BROWSER_INDEXED_DB_CURSOR_IMPL_H_
+#define CONTENT_BROWSER_INDEXED_DB_CURSOR_IMPL_H_
+
+#include "base/memory/ref_counted.h"
+#include "content/common/indexed_db/indexed_db.mojom.h"
+
+namespace base {
+class SingleThreadTaskRunner;
+}
+
+namespace content {
+
+class IndexedDBCursor;
+class IndexedDBDispatcherHost;
+class IndexedDBKey;
+
+class CursorImpl : public ::indexed_db::mojom::Cursor {
+ public:
+ CursorImpl(scoped_refptr<IndexedDBCursor> cursor,
+ const url::Origin& origin,
+ scoped_refptr<IndexedDBDispatcherHost> dispatcher_host);
+ ~CursorImpl() override;
+
+ // ::indexed_db::mojom::Cursor implementation
+ void Advance(
+ uint32_t count,
+ ::indexed_db::mojom::CallbacksAssociatedPtrInfo callbacks) override;
+ void Continue(
+ const IndexedDBKey& key,
+ const IndexedDBKey& primary_key,
+ ::indexed_db::mojom::CallbacksAssociatedPtrInfo callbacks) override;
+ void Prefetch(
+ int32_t count,
+ ::indexed_db::mojom::CallbacksAssociatedPtrInfo callbacks) override;
+ void PrefetchReset(
+ int32_t used_prefetches,
+ int32_t unused_prefetches,
+ const std::vector<std::string>& unused_blob_uuids) override;
+
+ private:
+ class IDBThreadHelper;
+
+ IDBThreadHelper* helper_;
+ scoped_refptr<IndexedDBDispatcherHost> dispatcher_host_;
+ const url::Origin origin_;
+ scoped_refptr<base::SingleThreadTaskRunner> idb_runner_;
+
+ DISALLOW_COPY_AND_ASSIGN(CursorImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_INDEXED_DB_CURSOR_IMPL_H_
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/indexed_db/cursor_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698