Index: third_party/WebKit/Source/modules/indexeddb/WebIDBObserverImpl.h |
diff --git a/third_party/WebKit/Source/modules/indexeddb/WebIDBObserverImpl.h b/third_party/WebKit/Source/modules/indexeddb/WebIDBObserverImpl.h |
index fd6625b176ae42575894f92c8b027eade66d8c24..4115e2d6a342cb05b21b7135e9529f01eabb35a8 100644 |
--- a/third_party/WebKit/Source/modules/indexeddb/WebIDBObserverImpl.h |
+++ b/third_party/WebKit/Source/modules/indexeddb/WebIDBObserverImpl.h |
@@ -5,9 +5,12 @@ |
#ifndef WebIDBObserverImpl_h |
#define WebIDBObserverImpl_h |
+#include <bitset> |
+ |
#include "modules/indexeddb/IDBObserver.h" |
#include "platform/heap/Persistent.h" |
#include "public/platform/modules/indexeddb/WebIDBObserver.h" |
+#include "public/platform/modules/indexeddb/WebIDBTypes.h" |
namespace blink { |
@@ -18,27 +21,42 @@ class WebIDBObserverImpl final : public WebIDBObserver { |
USING_FAST_MALLOC(WebIDBObserverImpl); |
public: |
- static std::unique_ptr<WebIDBObserverImpl> create(IDBObserver*); |
+ static std::unique_ptr<WebIDBObserverImpl> create( |
+ IDBObserver*, |
+ bool transaction, |
+ bool values, |
+ bool noRecords, |
+ const std::bitset<WebIDBOperationTypeCount>& operationTypes); |
esprehn
2016/11/07 22:58:53
WebIDBOperationTypeCount is so low, you can also p
dmurph
2016/11/08 22:40:18
Done.
|
~WebIDBObserverImpl() override; |
void setId(int32_t); |
- bool transaction() const { return m_observer->transaction(); } |
- bool noRecords() const { return m_observer->noRecords(); } |
- bool values() const { return m_observer->values(); } |
+ bool transaction() const { return m_transaction; } |
+ bool noRecords() const { return m_noRecords; } |
+ bool values() const { return m_values; } |
const std::bitset<WebIDBOperationTypeCount>& operationTypes() const { |
- return m_observer->operationTypes(); |
+ return m_operationTypes; |
} |
+ |
void onChange(const WebVector<WebIDBObservation>&, |
const WebVector<int32_t>& observationIndex); |
private: |
enum { kInvalidObserverId = -1 }; |
- explicit WebIDBObserverImpl(IDBObserver*); |
+ WebIDBObserverImpl(IDBObserver*, |
+ bool transaction, |
+ bool values, |
+ bool noRecords, |
+ std::bitset<WebIDBOperationTypeCount>& operationTypes); |
int32_t m_id; |
+ bool m_transaction; |
+ bool m_values; |
+ bool m_noRecords; |
+ // Operation type bits are set corresponding to WebIDBOperationType. |
+ std::bitset<WebIDBOperationTypeCount> m_operationTypes; |
Persistent<IDBObserver> m_observer; |
}; |