Chromium Code Reviews| Index: third_party/WebKit/Source/modules/indexeddb/IDBObserverChanges.h |
| diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBObserverChanges.h b/third_party/WebKit/Source/modules/indexeddb/IDBObserverChanges.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e2309ba2693344f58baa1d64a55ab100f5ce86a1 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/modules/indexeddb/IDBObserverChanges.h |
| @@ -0,0 +1,46 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef IDBObserverChanges_h |
| +#define IDBObserverChanges_h |
| + |
| +#include "bindings/core/v8/ScriptValue.h" |
| +#include "bindings/core/v8/ScriptWrappable.h" |
| +#include "modules/indexeddb/IDBDatabase.h" |
| +#include "modules/indexeddb/IDBTransaction.h" |
| +#include "platform/heap/Handle.h" |
| + |
| +namespace blink { |
| + |
| +class ScriptState; |
| +class IDBDatabase; |
|
Marijn Kruisselbrink
2016/06/15 13:02:44
no need to forward declare Database and Transactio
palakj1
2016/06/15 19:16:30
done
|
| +class IDBTransaction; |
| +class IDBObserverChangesRecord; |
| + |
| +class IDBObserverChanges final : public GarbageCollectedFinalized<IDBObserverChanges>, public ScriptWrappable { |
| + DEFINE_WRAPPERTYPEINFO(); |
| + |
| +public: |
| + static IDBObserverChanges* create(IDBDatabase*, IDBTransaction*, IDBAny*); |
|
Marijn Kruisselbrink
2016/06/15 13:02:44
IDBAny doesn't make it clear what the argument is
palakj1
2016/06/15 19:16:30
done
|
| + virtual ~IDBObserverChanges(); |
| + |
| + DECLARE_TRACE(); |
| + |
| + // Implement IDL |
| + IDBTransaction* transaction() const { return m_transaction.get(); } |
| + IDBDatabase* database() const { return m_database.get(); } |
| + ScriptValue records(ScriptState*); |
| + |
| +private: |
| + IDBObserverChanges(IDBDatabase*, IDBTransaction*, IDBAny*); |
|
Marijn Kruisselbrink
2016/06/15 13:02:44
here also give the IDBAny parameter a name
palakj1
2016/06/15 19:16:30
done
|
| + |
| + Member<IDBDatabase> m_database; |
| + Member<IDBTransaction> m_transaction; |
| + // TODO(palakj) : change to appropriate type Map<String, sequence<IDBObserverChangesRecord>>. |
| + Member<IDBAny> m_records; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // IDBObserverChanges_h |