| Index: content/child/indexed_db/indexed_db_dispatcher.h
|
| ===================================================================
|
| --- content/child/indexed_db/indexed_db_dispatcher.h (revision 208777)
|
| +++ content/child/indexed_db/indexed_db_dispatcher.h (working copy)
|
| @@ -10,6 +10,7 @@
|
|
|
| #include "base/gtest_prod_util.h"
|
| #include "base/id_map.h"
|
| +#include "base/memory/ref_counted.h"
|
| #include "base/strings/nullable_string16.h"
|
| #include "content/common/content_export.h"
|
| #include "ipc/ipc_sync_message_filter.h"
|
| @@ -35,6 +36,7 @@
|
| class IndexedDBKeyRange;
|
| class RendererWebIDBCursorImpl;
|
| class RendererWebIDBDatabaseImpl;
|
| +class ThreadSafeSender;
|
|
|
| CONTENT_EXPORT extern const size_t kMaxIDBValueSizeInBytes;
|
|
|
| @@ -47,10 +49,14 @@
|
| // failing a NOTREACHED in ThreadSpecificInstance in tests that instantiate
|
| // two copies of RenderThreadImpl on the same thread. Everyone else probably
|
| // wants to use ThreadSpecificInstance().
|
| - IndexedDBDispatcher();
|
| + explicit IndexedDBDispatcher(ThreadSafeSender* thread_safe_sender);
|
| virtual ~IndexedDBDispatcher();
|
| - static IndexedDBDispatcher* ThreadSpecificInstance();
|
|
|
| + // |thread_safe_sender| needs to be passed in because if the call leads to
|
| + // construction it will be needed.
|
| + static IndexedDBDispatcher* ThreadSpecificInstance(
|
| + ThreadSafeSender* thread_safe_sender);
|
| +
|
| // webkit_glue::WorkerTaskRunner::Observer implementation.
|
| virtual void OnWorkerRunLoopStopped() OVERRIDE;
|
|
|
| @@ -58,7 +64,7 @@
|
| const IndexedDBDatabaseMetadata& idb_metadata);
|
|
|
| void OnMessageReceived(const IPC::Message& msg);
|
| - static bool Send(IPC::Message* msg);
|
| + bool Send(IPC::Message* msg);
|
|
|
| void RequestIDBFactoryGetDatabaseNames(
|
| WebKit::WebIDBCallbacks* callbacks,
|
| @@ -223,6 +229,8 @@
|
| // Reset cursor prefetch caches for all cursors except exception_cursor_id.
|
| void ResetCursorPrefetchCaches(int32 ipc_exception_cursor_id = -1);
|
|
|
| + scoped_refptr<ThreadSafeSender> thread_safe_sender_;
|
| +
|
| // Careful! WebIDBCallbacks wraps non-threadsafe data types. It must be
|
| // destroyed and used on the same thread it was created on.
|
| IDMap<WebKit::WebIDBCallbacks, IDMapOwnPointer> pending_callbacks_;
|
|
|