Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "modules/indexeddb/IDBObserver.h" | |
| 6 | |
| 7 #include "bindings/core/v8/ExceptionState.h" | |
| 8 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | |
| 9 #include "bindings/core/v8/ScriptState.h" | |
| 10 #include "bindings/core/v8/SerializedScriptValueFactory.h" | |
| 11 #include "bindings/modules/v8/ToV8ForModules.h" | |
| 12 #include "bindings/modules/v8/V8BindingForModules.h" | |
| 13 #include "core/dom/DOMStringList.h" | |
| 14 #include "core/dom/ExceptionCode.h" | |
| 15 #include "core/dom/ExecutionContext.h" | |
| 16 #include "modules/indexeddb/IDBObserverCallback.h" | |
| 17 #include "modules/indexeddb/IDBObserverChanges.h" | |
| 18 #include "modules/indexeddb/IDBObserverInit.h" | |
| 19 #include "platform/SharedBuffer.h" | |
| 20 #include <v8.h> | |
| 21 | |
| 22 namespace blink { | |
| 23 | |
| 24 IDBObserver* IDBObserver::create(IDBObserverCallback& callback, const IDBObserve rInit& options) | |
| 25 { | |
| 26 return new IDBObserver(callback, options.transaction(), options.values(), op tions.noRecords()); | |
| 27 } | |
| 28 | |
| 29 IDBObserver::IDBObserver(IDBObserverCallback& callback, bool transaction, bool v alues, bool noRecords) | |
| 30 : m_callback(&callback) | |
| 31 , m_transaction(transaction) | |
| 32 , m_values(values) | |
| 33 , m_noRecords(noRecords) | |
| 34 { | |
| 35 id = 1; | |
| 36 } | |
| 37 | |
| 38 void IDBObserver::clearWeakMembers(Visitor* visitor) | |
| 39 { | |
| 40 } | |
| 41 | |
| 42 void IDBObserver::observe(IDBDatabase* db, IDBTransaction* tx, ExceptionState& e xceptionState) | |
|
Marijn Kruisselbrink
2016/06/02 23:51:24
Blink coding style doesn't like using abbreviation
palakj1
2016/06/03 01:21:53
Done. Thanks for the tip.
| |
| 43 { | |
| 44 } | |
| 45 | |
| 46 DEFINE_TRACE(IDBObserver) | |
| 47 { | |
| 48 visitor->template registerWeakMembers<IDBObserver, &IDBObserver::clearWeakMe mbers>(this); | |
|
dmurph
2016/06/02 23:48:37
I did not even know that this syntax was a thing h
palakj1
2016/06/03 01:21:52
I don't think we'd need this. Removing it.
| |
| 49 visitor->trace(m_callback); | |
| 50 } | |
| 51 | |
| 52 } // namespace blink | |
| OLD | NEW |