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_DATABASE_FACTORY_IMPL_H_ |
| 6 #define CONTENT_BROWSER_INDEXED_DB_DATABASE_FACTORY_IMPL_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" |
| 10 #include "content/public/browser/browser_associated_interface.h" |
| 11 #include "third_party/WebKit/public/platform/modules/indexeddb/indexed_db.mojom.
h" |
| 12 |
| 13 namespace base { |
| 14 class SequencedTaskRunner; |
| 15 } |
| 16 |
| 17 namespace net { |
| 18 class URLRequestContextGetter; |
| 19 } |
| 20 |
| 21 namespace content { |
| 22 |
| 23 class IndexedDBContextImpl; |
| 24 class IndexedDBDispatcherHost; |
| 25 |
| 26 class DatabaseFactoryImpl |
| 27 : public indexed_db::mojom::DatabaseFactory, |
| 28 public BrowserAssociatedInterface<indexed_db::mojom::DatabaseFactory> { |
| 29 public: |
| 30 DatabaseFactoryImpl(net::URLRequestContextGetter* request_context_getter, |
| 31 IndexedDBContextImpl* indexed_db_context, |
| 32 int ipc_process_id, |
| 33 scoped_refptr<IndexedDBDispatcherHost> dispatcher_host); |
| 34 ~DatabaseFactoryImpl() override; |
| 35 |
| 36 // indexed_db::mojom::DatabaseFactory |
| 37 void Open(const std::string& name, |
| 38 int64_t version, |
| 39 int64_t transaction_id, |
| 40 const url::Origin& origin, |
| 41 indexed_db::mojom::DatabaseClientAssociatedPtrInfo clientInfo, |
| 42 int64_t thread_id, |
| 43 int64_t callbacks_id) override; |
| 44 |
| 45 private: |
| 46 class IDBThreadHelper; |
| 47 |
| 48 scoped_refptr<base::SequencedTaskRunner> idb_task_runner_; |
| 49 IDBThreadHelper* idb_thread_helper_; |
| 50 |
| 51 DISALLOW_COPY_AND_ASSIGN(DatabaseFactoryImpl); |
| 52 }; |
| 53 |
| 54 } // namespace content |
| 55 |
| 56 #endif // CONTENT_BROWSER_INDEXED_DB_DATABASE_FACTORY_IMPL_H_ |
OLD | NEW |