| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef IDBObserver_h | 5 #ifndef IDBObserver_h |
| 6 #define IDBObserver_h | 6 #define IDBObserver_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "modules/indexeddb/IDBDatabase.h" | 9 #include "modules/indexeddb/IDBDatabase.h" |
| 10 #include "modules/indexeddb/IDBTransaction.h" | 10 #include "modules/indexeddb/IDBTransaction.h" |
| 11 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 class IDBObserverCallback; | 15 class IDBObserverCallback; |
| 16 class IDBObserverInit; | 16 class IDBObserverInit; |
| 17 | 17 |
| 18 class IDBObserver final : public GarbageCollectedFinalized<IDBObserver>, public
ScriptWrappable { | 18 class IDBObserver final : public GarbageCollectedFinalized<IDBObserver>, public
ScriptWrappable { |
| 19 DEFINE_WRAPPERTYPEINFO(); | 19 DEFINE_WRAPPERTYPEINFO(); |
| 20 | 20 |
| 21 public: | 21 public: |
| 22 static IDBObserver* create(IDBObserverCallback&, const IDBObserverInit&); | 22 static IDBObserver* create(IDBObserverCallback&, const IDBObserverInit&); |
| 23 // API methods | 23 // API methods |
| 24 void observe(IDBDatabase*, IDBTransaction*, ExceptionState&); | 24 void observe(IDBDatabase*, IDBTransaction*, ExceptionState&); |
| 25 | |
| 26 DECLARE_TRACE(); | 25 DECLARE_TRACE(); |
| 27 | 26 |
| 28 private: | 27 private: |
| 29 explicit IDBObserver(IDBObserverCallback&, const IDBObserverInit&); | 28 explicit IDBObserver(IDBObserverCallback&, const IDBObserverInit&); |
| 30 | 29 |
| 31 Member<IDBObserverCallback> m_callback; | 30 Member<IDBObserverCallback> m_callback; |
| 32 bool m_transaction; | 31 bool m_transaction; |
| 33 bool m_values; | 32 bool m_values; |
| 34 bool m_noRecords; | 33 bool m_noRecords; |
| 35 }; | 34 }; |
| 36 | 35 |
| 37 } // namespace blink | 36 } // namespace blink |
| 38 | 37 |
| 39 #endif // IDBObserver_h | 38 #endif // IDBObserver_h |
| OLD | NEW |