| Index: content/browser/indexed_db/indexed_db_connection.h
|
| diff --git a/content/browser/indexed_db/indexed_db_connection.h b/content/browser/indexed_db/indexed_db_connection.h
|
| index 4d828e5e6ff5e28a138f19c79959f5a928ab165e..5e588efa89697553e13b114f60cd09e25b1711ee 100644
|
| --- a/content/browser/indexed_db/indexed_db_connection.h
|
| +++ b/content/browser/indexed_db/indexed_db_connection.h
|
| @@ -10,6 +10,7 @@
|
| #include "base/memory/weak_ptr.h"
|
| #include "content/browser/indexed_db/indexed_db_database.h"
|
| #include "content/browser/indexed_db/indexed_db_database_callbacks.h"
|
| +#include "content/browser/indexed_db/indexed_db_observer.h"
|
|
|
| namespace content {
|
| class IndexedDBCallbacks;
|
| @@ -27,9 +28,19 @@ class CONTENT_EXPORT IndexedDBConnection {
|
| virtual bool IsConnected();
|
|
|
| void VersionChangeIgnored();
|
| + void ActivatePendingObservers(
|
| + std::vector<std::unique_ptr<IndexedDBObserver>>* pending_observers);
|
| + void RemoveObservers(const std::vector<int32_t>& remove_observer_ids);
|
|
|
| IndexedDBDatabase* database() const { return database_.get(); }
|
| IndexedDBDatabaseCallbacks* callbacks() const { return callbacks_.get(); }
|
| + const std::vector<std::unique_ptr<IndexedDBObserver>>& activeObservers()
|
| + const {
|
| + return active_observers_;
|
| + }
|
| + base::WeakPtr<IndexedDBConnection> weakPtr() {
|
| + return weak_factory_.GetWeakPtr();
|
| + }
|
|
|
| private:
|
| // NULL in some unit tests, and after the connection is closed.
|
| @@ -38,7 +49,7 @@ class CONTENT_EXPORT IndexedDBConnection {
|
| // The callbacks_ member is cleared when the connection is closed.
|
| // May be NULL in unit tests.
|
| scoped_refptr<IndexedDBDatabaseCallbacks> callbacks_;
|
| -
|
| + std::vector<std::unique_ptr<IndexedDBObserver>> active_observers_;
|
| base::WeakPtrFactory<IndexedDBConnection> weak_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(IndexedDBConnection);
|
|
|