| Index: content/child/indexed_db/indexed_db_dispatcher.h
|
| diff --git a/content/child/indexed_db/indexed_db_dispatcher.h b/content/child/indexed_db/indexed_db_dispatcher.h
|
| index 9e5068db7b6f12e14a3ef48bc722d0bcdf3e2093..bd040342e6863949dcb649dc8340126355d1f508 100644
|
| --- a/content/child/indexed_db/indexed_db_dispatcher.h
|
| +++ b/content/child/indexed_db/indexed_db_dispatcher.h
|
| @@ -36,6 +36,7 @@ struct IndexedDBMsg_CallbacksSuccessValue_Params;
|
| struct IndexedDBMsg_CallbacksUpgradeNeeded_Params;
|
|
|
| namespace blink {
|
| +class IDBObserver;
|
| class WebData;
|
| }
|
|
|
| @@ -74,6 +75,12 @@ class CONTENT_EXPORT IndexedDBDispatcher : public WorkerThread::Observer {
|
| // This method is virtual so it can be overridden in unit tests.
|
| virtual bool Send(IPC::Message* msg);
|
|
|
| + int32_t AddIDBObserver(int32_t ipc_database_id,
|
| + int64_t transaction_id,
|
| + blink::IDBObserver* observer);
|
| + std::vector<int32_t> RemoveIDBObserver(int32_t ipc_database_id,
|
| + blink::IDBObserver* observer);
|
| +
|
| void RequestIDBFactoryGetDatabaseNames(blink::WebIDBCallbacks* callbacks,
|
| const url::Origin& origin);
|
|
|
| @@ -258,12 +265,13 @@ class CONTENT_EXPORT IndexedDBDispatcher : public WorkerThread::Observer {
|
| // Used by unit tests to exercise behavior without allocating huge chunks
|
| // of memory.
|
| size_t max_put_value_size_ = kMaxIDBMessageSizeInBytes;
|
| -
|
| // Careful! WebIDBCallbacks wraps non-threadsafe data types. It must be
|
| // destroyed and used on the same thread it was created on.
|
| IDMap<blink::WebIDBCallbacks, IDMapOwnPointer> pending_callbacks_;
|
| IDMap<blink::WebIDBDatabaseCallbacks, IDMapOwnPointer>
|
| pending_database_callbacks_;
|
| + // TODO(palakj): observers_ should be IDMap<RefPtr<blink::IDBObserver>,
|
| + // IDMapOwnPointer> observers_.
|
|
|
| // Maps the ipc_callback_id from an open cursor request to the request's
|
| // transaction_id. Used to assign the transaction_id to the WebIDBCursorImpl
|
| @@ -272,8 +280,8 @@ class CONTENT_EXPORT IndexedDBDispatcher : public WorkerThread::Observer {
|
|
|
| // Map from cursor id to WebIDBCursorImpl.
|
| std::map<int32_t, WebIDBCursorImpl*> cursors_;
|
| -
|
| std::map<int32_t, WebIDBDatabaseImpl*> databases_;
|
| + std::map<int32_t, blink::IDBObserver*> observers_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher);
|
| };
|
|
|