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

Unified Diff: third_party/WebKit/Source/modules/indexeddb/IDBDatabaseCallbacks.h

Issue 2370643004: Port messages sent by WebIDBFactoryImpl to Mojo. (Closed)
Patch Set: Allow cpp_only to be set by the invoker. 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: third_party/WebKit/Source/modules/indexeddb/IDBDatabaseCallbacks.h
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBDatabaseCallbacks.h b/third_party/WebKit/Source/modules/indexeddb/IDBDatabaseCallbacks.h
index 58cfde86e844803eae21e0efd4fffec112430f81..7a6efd1998e7e68fdcd575ae6ffaa4d081b783ea 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBDatabaseCallbacks.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBDatabaseCallbacks.h
@@ -34,6 +34,7 @@ namespace blink {
class DOMException;
class IDBDatabase;
+class WebIDBDatabaseCallbacks;
class MODULES_EXPORT IDBDatabaseCallbacks : public GarbageCollectedFinalized<IDBDatabaseCallbacks> {
public:
@@ -50,6 +51,12 @@ public:
void connect(IDBDatabase*);
+ // Returns a new WebIDBDatabaseCallbacks for this object. Must only be
+ // called once.
+ std::unique_ptr<WebIDBDatabaseCallbacks> createWebCallbacks();
+ void detachWebCallbacks();
+ void webCallbacksDestroyed();
+
protected:
// Exposed to subclasses for unit tests.
IDBDatabaseCallbacks();
@@ -63,6 +70,10 @@ private:
// can survive too. m_database should be a weak reference to avoid that an
// IDBDatabase survives the GC with the IDBDatabaseCallbacks.
WeakMember<IDBDatabase> m_database;
+
+ // Pointer back to the WebIDBDatabaseCallbacks that holds a persistent
+ // reference to this object.
+ WebIDBDatabaseCallbacks* m_webCallbacks = nullptr;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698