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

Unified Diff: content/child/indexed_db/indexed_db_database_callbacks_impl.h

Issue 2370643004: Port messages sent by WebIDBFactoryImpl to Mojo. (Closed)
Patch Set: Address last nits and fix leaks in unit tests. Created 4 years, 2 months 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
Index: content/child/indexed_db/indexed_db_database_callbacks_impl.h
diff --git a/content/child/indexed_db/indexed_db_database_callbacks_impl.h b/content/child/indexed_db/indexed_db_database_callbacks_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..67a239858c20c108df0f50fa218cdadd5d2ebd35
--- /dev/null
+++ b/content/child/indexed_db/indexed_db_database_callbacks_impl.h
@@ -0,0 +1,44 @@
+// 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_CHILD_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_IMPL_H_
+#define CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_IMPL_H_
+
+#include "content/common/indexed_db/indexed_db.mojom.h"
+
+namespace blink {
+class WebIDBDatabaseCallbacks;
+}
+
+namespace content {
+
+class ThreadSafeSender;
+
+class IndexedDBDatabaseCallbacksImpl
+ : public indexed_db::mojom::DatabaseCallbacks {
+ public:
+ explicit IndexedDBDatabaseCallbacksImpl(
+ std::unique_ptr<blink::WebIDBDatabaseCallbacks> callbacks,
+ scoped_refptr<ThreadSafeSender> thread_safe_sender);
+ ~IndexedDBDatabaseCallbacksImpl() override;
+
+ // indexed_db::mojom::DatabaseCallbacks implementation
+ void ForcedClose() override;
+ void VersionChange(int64_t old_version, int64_t new_version) override;
+ void Abort(int64_t transaction_id,
+ int32_t code,
+ const base::string16& message) override;
+ void Complete(int64_t transaction_id) override;
+
+ private:
+ scoped_refptr<base::SingleThreadTaskRunner> callback_runner_;
+ scoped_refptr<ThreadSafeSender> thread_safe_sender_;
+ blink::WebIDBDatabaseCallbacks* callbacks_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabaseCallbacksImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_IMPL_H_
« no previous file with comments | « content/child/indexed_db/indexed_db_callbacks_impl.cc ('k') | content/child/indexed_db/indexed_db_database_callbacks_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698