| Index: content/browser/indexed_db/indexed_db_pending_connection.h
|
| diff --git a/content/browser/indexed_db/indexed_db_pending_connection.h b/content/browser/indexed_db/indexed_db_pending_connection.h
|
| index 6458a7e7535ea75975cdf4e887995fdb82f852c8..d37605873e8634262730317c8594829ebb4d909d 100644
|
| --- a/content/browser/indexed_db/indexed_db_pending_connection.h
|
| +++ b/content/browser/indexed_db/indexed_db_pending_connection.h
|
| @@ -7,32 +7,69 @@
|
|
|
| #include <stdint.h>
|
|
|
| +#include <memory>
|
| +
|
| +#include "base/callback.h"
|
| +#include "base/macros.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "content/browser/indexed_db/indexed_db_callbacks.h"
|
| +#include "content/browser/indexed_db/indexed_db_change_handler.h"
|
| #include "content/browser/indexed_db/indexed_db_data_loss_info.h"
|
| -#include "content/browser/indexed_db/indexed_db_database_callbacks.h"
|
| #include "content/common/content_export.h"
|
| +#include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h"
|
| +#include "url/origin.h"
|
|
|
| namespace content {
|
|
|
| -class IndexedDBCallbacks;
|
| -class IndexedDBDatabaseCallbacks;
|
| +class IndexedDBChangeHandler;
|
| +class IndexedDBConnection;
|
| +struct IndexedDBDatabaseMetadata;
|
| +class IndexedDBOpenRequestObserver;
|
|
|
| -struct CONTENT_EXPORT IndexedDBPendingConnection {
|
| +class CONTENT_EXPORT IndexedDBPendingConnection {
|
| + public:
|
| IndexedDBPendingConnection(
|
| - scoped_refptr<IndexedDBCallbacks> callbacks_in,
|
| - scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks_in,
|
| - int child_process_id_in,
|
| - int64_t transaction_id_in,
|
| - int64_t version_in);
|
| - IndexedDBPendingConnection(const IndexedDBPendingConnection& other);
|
| + const OpenResultCallback& open_callback,
|
| + scoped_refptr<IndexedDBChangeHandler> change_handler,
|
| + scoped_refptr<IndexedDBOpenRequestObserver> open_observer,
|
| + int child_process_id,
|
| + int64_t transaction_id,
|
| + int64_t version,
|
| + const url::Origin& origin);
|
| ~IndexedDBPendingConnection();
|
| - scoped_refptr<IndexedDBCallbacks> callbacks;
|
| - scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks;
|
| - int child_process_id;
|
| - int64_t transaction_id;
|
| - int64_t version;
|
| - IndexedDBDataLossInfo data_loss_info;
|
| + void SetDataLossInfo(const IndexedDBDataLossInfo& data_loss_info);
|
| + const IndexedDBDataLossInfo& data_loss_info() const {
|
| + return data_loss_info_;
|
| + }
|
| + void OnError(const IndexedDBDatabaseError& error) const;
|
| + void OnSuccess(std::unique_ptr<IndexedDBConnection> connection,
|
| + const IndexedDBDatabaseMetadata& metadata) const;
|
| + void OnBlocked(int64_t old_version) const;
|
| + void OnUpgradeNeeded(int64_t old_version,
|
| + IndexedDBConnection* connection,
|
| + const IndexedDBDatabaseMetadata& metadata) const;
|
| + int child_process_id() const { return child_process_id_; }
|
| + int64_t transaction_id() const { return transaction_id_; }
|
| + void set_version(int64_t version) { version_ = version; }
|
| + int64_t version() const { return version_; }
|
| + const scoped_refptr<IndexedDBChangeHandler>& change_handler() const {
|
| + return change_handler_;
|
| + }
|
| + const scoped_refptr<IndexedDBOpenRequestObserver>& open_observer() const {
|
| + return open_observer_;
|
| + }
|
| +
|
| + private:
|
| + OpenResultCallback open_callback_;
|
| + scoped_refptr<IndexedDBChangeHandler> change_handler_;
|
| + scoped_refptr<IndexedDBOpenRequestObserver> open_observer_;
|
| + int child_process_id_;
|
| + int64_t transaction_id_;
|
| + int64_t version_;
|
| + const url::Origin origin_;
|
| + IndexedDBDataLossInfo data_loss_info_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(IndexedDBPendingConnection);
|
| };
|
|
|
| } // namespace content
|
|
|