Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3454)

Unified Diff: content/child/indexed_db/indexed_db_dispatcher.h

Issue 2320213004: Port IndexedDB open() and database callbacks to Mojo. (Closed)
Patch Set: Make DatabaseClient an associated interface. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 eee70a0f8db71b257c397e99b7a1b0ebb7f237cf..23648542ddef249cedddb95602c321062aca3276 100644
--- a/content/child/indexed_db/indexed_db_dispatcher.h
+++ b/content/child/indexed_db/indexed_db_dispatcher.h
@@ -23,9 +23,9 @@
#include "ipc/ipc_sync_message_filter.h"
#include "third_party/WebKit/public/platform/WebBlobInfo.h"
#include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBCallbacks.h"
-#include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabaseCallbacks.h"
#include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBObserver.h"
#include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h"
+#include "third_party/WebKit/public/platform/modules/indexeddb/indexed_db.mojom.h"
#include "url/origin.h"
struct IndexedDBDatabaseMetadata;
@@ -98,12 +98,13 @@ class CONTENT_EXPORT IndexedDBDispatcher : public WorkerThread::Observer {
void RequestIDBFactoryGetDatabaseNames(blink::WebIDBCallbacks* callbacks,
const url::Origin& origin);
- void RequestIDBFactoryOpen(const base::string16& name,
- int64_t version,
- int64_t transaction_id,
- blink::WebIDBCallbacks* callbacks,
- blink::WebIDBDatabaseCallbacks* database_callbacks,
- const url::Origin& origin);
+ void RequestIDBFactoryOpen(
+ const std::string& name,
+ int64_t version,
+ int64_t transaction_id,
+ blink::WebIDBCallbacks* callbacks,
+ mojo::ScopedInterfaceEndpointHandle* client_interface_endpoint,
+ const url::Origin& origin);
void RequestIDBFactoryDeleteDatabase(const base::string16& name,
blink::WebIDBCallbacks* callbacks,
@@ -132,15 +133,13 @@ class CONTENT_EXPORT IndexedDBDispatcher : public WorkerThread::Observer {
int unused_prefetches,
int32_t ipc_cursor_id);
- void RequestIDBDatabaseClose(int32_t ipc_database_id,
- int32_t ipc_database_callbacks_id);
+ void RequestIDBDatabaseClose(int32_t ipc_database_id);
void NotifyIDBDatabaseVersionChangeIgnored(int32_t ipc_database_id);
void RequestIDBDatabaseCreateTransaction(
int32_t ipc_database_id,
int64_t transaction_id,
- blink::WebIDBDatabaseCallbacks* database_callbacks_ptr,
blink::WebVector<long long> object_store_ids,
blink::WebIDBTransactionMode mode);
@@ -224,7 +223,6 @@ class CONTENT_EXPORT IndexedDBDispatcher : public WorkerThread::Observer {
// IDBCallback message handlers.
void OnSuccessIDBDatabase(int32_t ipc_thread_id,
int32_t ipc_callbacks_id,
- int32_t ipc_database_callbacks_id,
int32_t ipc_object_id,
const IndexedDBDatabaseMetadata& idb_metadata);
void OnSuccessIndexedDBKey(int32_t ipc_thread_id,
@@ -254,28 +252,15 @@ class CONTENT_EXPORT IndexedDBDispatcher : public WorkerThread::Observer {
int32_t ipc_callbacks_id,
int64_t existing_version);
void OnUpgradeNeeded(const IndexedDBMsg_CallbacksUpgradeNeeded_Params& p);
- void OnAbort(int32_t ipc_thread_id,
- int32_t ipc_database_id,
- int64_t transaction_id,
- int code,
- const base::string16& message);
- void OnComplete(int32_t ipc_thread_id,
- int32_t ipc_database_id,
- int64_t transaction_id);
void OnDatabaseChanges(int32_t ipc_thread_id,
int32_t ipc_database_id,
const IndexedDBMsg_ObserverChanges&);
- void OnForcedClose(int32_t ipc_thread_id, int32_t ipc_database_id);
- void OnVersionChange(int32_t ipc_thread_id,
- int32_t ipc_database_id,
- int64_t old_version,
- int64_t new_version);
-
// Reset cursor prefetch caches for all cursors except exception_cursor_id.
void ResetCursorPrefetchCaches(int64_t transaction_id,
int32_t ipc_exception_cursor_id);
+ indexed_db::mojom::DatabaseFactoryAssociatedPtr database_factory_;
scoped_refptr<ThreadSafeSender> thread_safe_sender_;
// Maximum size (in bytes) of value/key pair allowed for put requests. Any
@@ -287,8 +272,6 @@ class CONTENT_EXPORT IndexedDBDispatcher : public WorkerThread::Observer {
// 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_;
IDMap<blink::WebIDBObserver, IDMapOwnPointer> observers_;
// Maps the ipc_callback_id from an open cursor request to the request's
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/child/indexed_db/indexed_db_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698