| 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 IDBObserverChanges_h | 5 #ifndef IDBObserverChanges_h |
| 6 #define IDBObserverChanges_h | 6 #define IDBObserverChanges_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptValue.h" | 8 #include "bindings/core/v8/ScriptValue.h" |
| 9 #include "bindings/core/v8/ScriptWrappable.h" | 9 #include "bindings/core/v8/ScriptWrappable.h" |
| 10 #include "modules/indexeddb/IDBDatabase.h" | 10 #include "modules/indexeddb/IDBDatabase.h" |
| 11 #include "modules/indexeddb/IDBTransaction.h" | 11 #include "modules/indexeddb/IDBTransaction.h" |
| 12 #include "platform/heap/Handle.h" | 12 #include "platform/heap/Handle.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 class ScriptState; | 16 class ScriptState; |
| 17 class IDBDatabase; | |
| 18 class IDBTransaction; | |
| 19 class IDBObserverChangesRecord; | 17 class IDBObserverChangesRecord; |
| 20 | 18 |
| 21 class IDBObserverChanges final : public GarbageCollectedFinalized<IDBObserverCha
nges>, public ScriptWrappable { | 19 class IDBObserverChanges final : public GarbageCollectedFinalized<IDBObserverCha
nges>, public ScriptWrappable { |
| 22 DEFINE_WRAPPERTYPEINFO(); | 20 DEFINE_WRAPPERTYPEINFO(); |
| 23 | 21 |
| 24 public: | 22 public: |
| 25 static IDBObserverChanges* create(IDBDatabase*, IDBTransaction*, IDBAny*); | 23 static IDBObserverChanges* create(IDBDatabase*, IDBTransaction*, IDBAny*); |
| 26 virtual ~IDBObserverChanges(); | 24 virtual ~IDBObserverChanges(); |
| 27 | 25 |
| 28 DECLARE_TRACE(); | 26 DECLARE_TRACE(); |
| 29 | 27 |
| 30 // Implement IDL | 28 // Implement IDL |
| 31 IDBTransaction* transaction() const { return m_transaction.get(); } | 29 IDBTransaction* transaction() const { return m_transaction.get(); } |
| 32 IDBDatabase* database() const { return m_database.get(); } | 30 IDBDatabase* database() const { return m_database.get(); } |
| 33 ScriptValue records(ScriptState*); | 31 ScriptValue records(ScriptState*); |
| 34 | 32 |
| 35 private: | 33 private: |
| 36 IDBObserverChanges(IDBDatabase*, IDBTransaction*, IDBAny*); | 34 IDBObserverChanges(IDBDatabase*, IDBTransaction*, IDBAny*); |
| 37 | 35 |
| 38 Member<IDBDatabase> m_database; | 36 Member<IDBDatabase> m_database; |
| 39 Member<IDBTransaction> m_transaction; | 37 Member<IDBTransaction> m_transaction; |
| 40 // TODO(palakj) : change to appropriate type Map<String, sequence<IDBObserve
rChangesRecord>>. | 38 // TODO(palakj) : change to appropriate type Map<String, sequence<IDBObserve
rChangesRecord>>. |
| 41 Member<IDBAny> m_records; | 39 Member<IDBAny> m_records; |
| 42 }; | 40 }; |
| 43 | 41 |
| 44 } // namespace blink | 42 } // namespace blink |
| 45 | 43 |
| 46 #endif // IDBObserverChanges_h | 44 #endif // IDBObserverChanges_h |
| OLD | NEW |