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

Unified Diff: third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp

Issue 2125213002: [IndexedDB] Propogating changes to observers : Renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lifetime
Patch Set: Propogating Changes to Renderer 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
Index: third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp
index db4a1ea7763e34fa39c8f7a7bf1e0167f75c5878..72abc2db99fd80b41c8a1a43076e6506c8a1230d 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp
@@ -10,6 +10,7 @@
#include "core/dom/ExceptionCode.h"
#include "modules/indexeddb/IDBDatabase.h"
#include "modules/indexeddb/IDBObserverCallback.h"
+#include "modules/indexeddb/IDBObserverChanges.h"
#include "modules/indexeddb/IDBObserverInit.h"
#include "modules/indexeddb/IDBTransaction.h"
#include "modules/indexeddb/WebIDBObserverImpl.h"
@@ -78,6 +79,11 @@ void IDBObserver::removeObserver(int32_t id)
m_observerIds.erase(id);
}
+void IDBObserver::onChange(const std::vector<WebIDBObservation>& observations, const std::vector<int32_t>& observationIndex)
+{
+ m_callback->handleEvent(*IDBObserverChanges::create(observations, observationIndex), *this);
+}
+
DEFINE_TRACE(IDBObserver)
{
visitor->trace(m_callback);

Powered by Google App Engine
This is Rietveld 408576698