| 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..d031acaea8f11d136fffaf2cad1451b97872e252
|
| --- /dev/null
|
| +++ b/content/browser/indexed_db/database_factory_impl.h
|
| @@ -0,0 +1,84 @@
|
| +// 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 "base/memory/weak_ptr.h"
|
| +#include "base/process/process_handle.h"
|
| +#include "content/browser/bad_message.h"
|
| +#include "content/public/browser/browser_context.h"
|
| +#include "mojo/public/cpp/bindings/strong_binding.h"
|
| +#include "third_party/WebKit/public/platform/modules/indexeddb/indexed_db.mojom.h"
|
| +
|
| +namespace content {
|
| +class IndexedDBConnection;
|
| +class IndexedDBContextImpl;
|
| +class IndexedDBDatabaseError;
|
| +struct IndexedDBDatabaseMetadata;
|
| +}
|
| +
|
| +namespace net {
|
| +class URLRequestContext;
|
| +class URLRequestContextGetter;
|
| +}
|
| +
|
| +namespace indexed_db {
|
| +
|
| +class DatabaseFactoryImpl : public mojom::DatabaseFactory,
|
| + public base::SupportsWeakPtr<DatabaseFactoryImpl> {
|
| + public:
|
| + static void Create(content::BrowserContext* context,
|
| + net::URLRequestContextGetter* request_context_getter,
|
| + mojom::DatabaseFactoryRequest request);
|
| +
|
| + private:
|
| + DatabaseFactoryImpl(content::BrowserContext* context,
|
| + content::IndexedDBContextImpl* indexed_db_context,
|
| + net::URLRequestContext* request_context,
|
| + mojom::DatabaseFactoryRequest request);
|
| + ~DatabaseFactoryImpl() override;
|
| +
|
| + int64_t HostTransactionId(int64_t transaction_id);
|
| + int64_t RendererTransactionId(int64_t host_transaction_id);
|
| +
|
| + void CrashRendererAndClosePipe(content::bad_message::BadMessageReason reason);
|
| +
|
| + content::RenderProcessHost* GetRenderProcessHost();
|
| +
|
| + void OnOpenResult(const base::TimeTicks& begin_time,
|
| + const OpenCallback& mojo_callback,
|
| + std::unique_ptr<content::IndexedDBConnection> connection,
|
| + const content::IndexedDBDatabaseMetadata& metadata,
|
| + const content::IndexedDBDatabaseError& error);
|
| +
|
| + base::ProcessId peer_pid() const;
|
| +
|
| + // mojom::DatabaseFactory:
|
| + void GetDatabaseNames(const url::Origin& origin) override;
|
| +
|
| + void Open(const mojo::String& name,
|
| + int64_t version,
|
| + int64_t transaction_id,
|
| + const url::Origin& origin,
|
| + mojom::OpenRequestObserverPtr open_observer,
|
| + mojom::DatabaseObserverPtr database_handler,
|
| + const OpenCallback& callback) override;
|
| +
|
| + void DeleteDatabase(const mojo::String& name,
|
| + const url::Origin& origin) override;
|
| +
|
| + content::BrowserContext* context_;
|
| + scoped_refptr<content::IndexedDBContextImpl> indexed_db_context_;
|
| + net::URLRequestContext* request_context_;
|
| + mojo::StrongBinding<mojom::DatabaseFactory> binding_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(DatabaseFactoryImpl);
|
| +};
|
| +
|
| +} // namespace indexed_db
|
| +
|
| +#endif // CONTENT_BROWSER_INDEXED_DB_DATABASE_FACTORY_IMPL_H_
|
|
|