| 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 IDBObservation_h | 5 #ifndef IDBObservation_h |
| 6 #define IDBObservation_h | 6 #define IDBObservation_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 "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| 11 #include "public/platform/modules/indexeddb/WebIDBTypes.h" | 11 #include "public/platform/modules/indexeddb/WebIDBTypes.h" |
| 12 #include "wtf/PassRefPtr.h" | 12 #include "wtf/PassRefPtr.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 class IDBKey; | 16 class IDBKeyRange; |
| 17 class IDBValue; | 17 class IDBValue; |
| 18 class ScriptState; | 18 class ScriptState; |
| 19 struct WebIDBObservation; |
| 19 | 20 |
| 20 class IDBObservation final : public GarbageCollectedFinalized<IDBObservation>, p
ublic ScriptWrappable { | 21 class IDBObservation final : public GarbageCollectedFinalized<IDBObservation>, p
ublic ScriptWrappable { |
| 21 DEFINE_WRAPPERTYPEINFO(); | 22 DEFINE_WRAPPERTYPEINFO(); |
| 22 | 23 |
| 23 public: | 24 public: |
| 24 static WebIDBOperationType stringToOperationType(const String&); | 25 static WebIDBOperationType stringToOperationType(const String&); |
| 25 static IDBObservation* create(IDBKey*, PassRefPtr<IDBValue>, WebIDBOperation
Type); | 26 static IDBObservation* create(const WebIDBObservation&); |
| 26 ~IDBObservation(); | 27 ~IDBObservation(); |
| 27 | 28 |
| 28 DECLARE_TRACE(); | 29 DECLARE_TRACE(); |
| 29 | 30 |
| 30 // Implement the IDL | 31 // Implement the IDL |
| 31 ScriptValue key(ScriptState*); | 32 ScriptValue key(ScriptState*); |
| 32 ScriptValue value(ScriptState*); | 33 ScriptValue value(ScriptState*); |
| 33 const String& type() const; | 34 const String& type() const; |
| 34 | 35 |
| 35 private: | 36 private: |
| 36 IDBObservation(IDBKey*, PassRefPtr<IDBValue>, WebIDBOperationType); | 37 IDBObservation(const WebIDBObservation&); |
| 37 Member<IDBKey> m_key; | 38 Member<IDBKeyRange> m_keyRange; |
| 38 RefPtr<IDBValue> m_value; | 39 RefPtr<IDBValue> m_value; |
| 39 const WebIDBOperationType m_operationType; | 40 const WebIDBOperationType m_operationType; |
| 40 }; | 41 }; |
| 41 | 42 |
| 42 } // namespace blink | 43 } // namespace blink |
| 43 | 44 |
| 44 #endif // IDBObservation_h | 45 #endif // IDBObservation_h |
| OLD | NEW |