| 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 10e1b05df5515257a55d1eff4704e4ca0fddd3c1..7c1bebc87aebcd033b75ddf914c666b2f4577aaa 100644
|
| --- a/content/browser/indexed_db/indexed_db_pending_connection.h
|
| +++ b/content/browser/indexed_db/indexed_db_pending_connection.h
|
| @@ -8,29 +8,59 @@
|
| #include <stdint.h>
|
|
|
| #include "base/memory/ref_counted.h"
|
| -#include "content/browser/indexed_db/indexed_db_callbacks.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"
|
|
|
| namespace content {
|
|
|
| class IndexedDBCallbacks;
|
| +class IndexedDBConnection;
|
| class IndexedDBDatabaseCallbacks;
|
| +struct IndexedDBDatabaseMetadata;
|
| +class IndexedDBOpenRequestObserver;
|
|
|
| -struct CONTENT_EXPORT IndexedDBPendingConnection {
|
| +typedef base::Callback<void(std::unique_ptr<IndexedDBConnection> connection,
|
| + const content::IndexedDBDatabaseMetadata& metadata,
|
| + const content::IndexedDBDatabaseError&)>
|
| + OpenResultCallback;
|
| +
|
| +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);
|
| + const OpenResultCallback& open_callback,
|
| + scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks,
|
| + scoped_refptr<IndexedDBOpenRequestObserver> open_observer,
|
| + int child_process_id,
|
| + int64_t transaction_id,
|
| + int64_t version);
|
| IndexedDBPendingConnection(const IndexedDBPendingConnection& other);
|
| ~IndexedDBPendingConnection();
|
| - scoped_refptr<IndexedDBCallbacks> callbacks;
|
| - scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks;
|
| - int child_process_id;
|
| - int64_t transaction_id;
|
| - int64_t version;
|
| + void OnError(const IndexedDBDatabaseError& error) const;
|
| + void OnDataLoss(blink::WebIDBDataLoss data_loss,
|
| + std::string data_loss_message) const;
|
| + void OnSuccess(std::unique_ptr<IndexedDBConnection> connection,
|
| + const IndexedDBDatabaseMetadata& metadata) const;
|
| + void OnBlocked(int64_t old_version);
|
| + blink::WebIDBDataLoss data_loss() const;
|
| + int child_process_id() const { return child_process_id_; }
|
| + int64_t transaction_id() const { return transaction_id_; }
|
| + int64_t version() const { return version_; }
|
| + void SetVersion(int64_t version) { version_ = version; }
|
| + const scoped_refptr<IndexedDBDatabaseCallbacks>& database_callbacks() const {
|
| + return database_callbacks_;
|
| + }
|
| + const scoped_refptr<IndexedDBOpenRequestObserver>& open_observer() const {
|
| + return open_observer_;
|
| + }
|
| +
|
| + private:
|
| + OpenResultCallback open_callback_;
|
| + scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks_;
|
| + scoped_refptr<IndexedDBOpenRequestObserver> open_observer_;
|
| + int child_process_id_;
|
| + int64_t transaction_id_;
|
| + int64_t version_;
|
| };
|
|
|
| } // namespace content
|
|
|