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

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

Issue 2062203004: IDBObserver: Lifetime Management: Adding Observer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Final architechture Created 4 years, 5 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
« no previous file with comments | « content/child/indexed_db/indexed_db_dispatcher.cc ('k') | content/child/indexed_db/webidbdatabase_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/indexed_db/webidbdatabase_impl.h
diff --git a/content/child/indexed_db/webidbdatabase_impl.h b/content/child/indexed_db/webidbdatabase_impl.h
index 7d214bbd6c51f50ea8c7e7aeab5b3c6f8c7f530b..2be351f1989d81b34555a0ec71ade20b12da53e9 100644
--- a/content/child/indexed_db/webidbdatabase_impl.h
+++ b/content/child/indexed_db/webidbdatabase_impl.h
@@ -16,6 +16,7 @@ namespace blink {
class WebBlobInfo;
class WebIDBCallbacks;
class WebIDBDatabaseCallbacks;
+class WebIDBObserver;
class WebString;
}
@@ -45,6 +46,12 @@ class WebIDBDatabaseImpl : public blink::WebIDBDatabase {
void close() override;
void versionChangeIgnored() override;
+ int32_t addObserver(std::unique_ptr<blink::WebIDBObserver>,
+ long long transactionId) override;
+ bool containsObserverId(int32_t id) const override;
+ void removeObservers(
+ const std::vector<int32_t>& observer_ids_to_remove) override;
+
void get(long long transactionId,
long long objectStoreId,
long long indexId,
@@ -113,6 +120,7 @@ class WebIDBDatabaseImpl : public blink::WebIDBDatabase {
private:
int32_t ipc_database_id_;
int32_t ipc_database_callbacks_id_;
+ std::set<int32_t> observer_ids_;
scoped_refptr<ThreadSafeSender> thread_safe_sender_;
};
« no previous file with comments | « content/child/indexed_db/indexed_db_dispatcher.cc ('k') | content/child/indexed_db/webidbdatabase_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698