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

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

Issue 2320213004: Port IndexedDB open() and database callbacks to Mojo. (Closed)
Patch Set: Make DatabaseClient an associated interface. Created 4 years, 3 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
« no previous file with comments | « content/browser/indexed_db/DEPS ('k') | content/browser/indexed_db/database_factory_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/indexed_db/database_factory_impl.h
diff --git a/content/browser/indexed_db/database_factory_impl.h b/content/browser/indexed_db/database_factory_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..6fed9f81bb29ec4919a6a0a755ad33faf5ecd981
--- /dev/null
+++ b/content/browser/indexed_db/database_factory_impl.h
@@ -0,0 +1,56 @@
+// 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_DATABASE_FACTORY_IMPL_H_
+#define CONTENT_BROWSER_INDEXED_DB_DATABASE_FACTORY_IMPL_H_
+
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "content/public/browser/browser_associated_interface.h"
+#include "third_party/WebKit/public/platform/modules/indexeddb/indexed_db.mojom.h"
+
+namespace base {
+class SequencedTaskRunner;
+}
+
+namespace net {
+class URLRequestContextGetter;
+}
+
+namespace content {
+
+class IndexedDBContextImpl;
+class IndexedDBDispatcherHost;
+
+class DatabaseFactoryImpl
+ : public indexed_db::mojom::DatabaseFactory,
+ public BrowserAssociatedInterface<indexed_db::mojom::DatabaseFactory> {
+ public:
+ DatabaseFactoryImpl(net::URLRequestContextGetter* request_context_getter,
+ IndexedDBContextImpl* indexed_db_context,
+ int ipc_process_id,
+ scoped_refptr<IndexedDBDispatcherHost> dispatcher_host);
+ ~DatabaseFactoryImpl() override;
+
+ // indexed_db::mojom::DatabaseFactory
+ void Open(const std::string& name,
+ int64_t version,
+ int64_t transaction_id,
+ const url::Origin& origin,
+ indexed_db::mojom::DatabaseClientAssociatedPtrInfo clientInfo,
+ int64_t thread_id,
+ int64_t callbacks_id) override;
+
+ private:
+ class IDBThreadHelper;
+
+ scoped_refptr<base::SequencedTaskRunner> idb_task_runner_;
+ IDBThreadHelper* idb_thread_helper_;
+
+ DISALLOW_COPY_AND_ASSIGN(DatabaseFactoryImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_INDEXED_DB_DATABASE_FACTORY_IMPL_H_
« no previous file with comments | « content/browser/indexed_db/DEPS ('k') | content/browser/indexed_db/database_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698