| Index: content/browser/indexed_db/indexed_db_factory.h
|
| diff --git a/content/browser/indexed_db/indexed_db_factory.h b/content/browser/indexed_db/indexed_db_factory.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..cf0ddbbdad4db693c03bd8157f20acad3147d8dd
|
| --- /dev/null
|
| +++ b/content/browser/indexed_db/indexed_db_factory.h
|
| @@ -0,0 +1,56 @@
|
| +// Copyright (c) 2013 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_INDEXED_DB_FACTORY_H_
|
| +#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_H_
|
| +
|
| +#include "base/memory/ref_counted.h"
|
| +#include "base/string16.h"
|
| +
|
| +namespace content {
|
| +
|
| +class IndexedDBCallbacksWrapper;
|
| +class IndexedDBDatabase;
|
| +class IndexedDBDatabaseCallbacksWrapper;
|
| +class ScriptExecutionContext;
|
| +
|
| +typedef int ExceptionCode;
|
| +
|
| +// This class is shared by IndexedDBFactory (async) and IndexedDBFactorySync
|
| +// (sync).
|
| +// This is implemented by IndexedDBFactoryImpl and optionally others (in order
|
| +// to proxy
|
| +// calls across process barriers). All calls to these classes should be
|
| +// non-blocking and
|
| +// trigger work on a background thread if necessary.
|
| +class IndexedDBFactory : public base::RefCounted<IndexedDBFactory> {
|
| + public:
|
| + static scoped_refptr<IndexedDBFactory> Create();
|
| +
|
| + virtual void GetDatabaseNames(scoped_refptr<IndexedDBCallbacksWrapper>,
|
| + const string16& database_identifier,
|
| + ScriptExecutionContext*,
|
| + const string16& data_dir) = 0;
|
| + virtual void Open(const string16& name,
|
| + int64_t version,
|
| + int64_t transaction_id,
|
| + scoped_refptr<IndexedDBCallbacksWrapper>,
|
| + scoped_refptr<IndexedDBDatabaseCallbacksWrapper>,
|
| + const string16& database_identifier,
|
| + ScriptExecutionContext*,
|
| + const string16& data_dir) = 0;
|
| + virtual void DeleteDatabase(const string16& name,
|
| + scoped_refptr<IndexedDBCallbacksWrapper>,
|
| + const string16& database_identifier,
|
| + ScriptExecutionContext*,
|
| + const string16& data_dir) = 0;
|
| +
|
| + protected:
|
| + virtual ~IndexedDBFactory() {}
|
| + friend class base::RefCounted<IndexedDBFactory>;
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_H_
|
|
|