Chromium Code Reviews| Index: third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp |
| diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..baf6624315d2df9e70e8fc42573b475fe0bb926b |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp |
| @@ -0,0 +1,47 @@ |
| +// 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. |
| + |
| +#include "modules/indexeddb/IDBObserver.h" |
| + |
| +#include "bindings/core/v8/ExceptionState.h" |
| +#include "bindings/core/v8/ExceptionStatePlaceholder.h" |
| +#include "bindings/core/v8/ScriptState.h" |
| +#include "bindings/core/v8/SerializedScriptValueFactory.h" |
| +#include "bindings/modules/v8/ToV8ForModules.h" |
| +#include "bindings/modules/v8/V8BindingForModules.h" |
| +#include "core/dom/DOMStringList.h" |
| +#include "core/dom/ExceptionCode.h" |
| +#include "core/dom/ExecutionContext.h" |
| +#include "modules/indexeddb/IDBObserverCallback.h" |
| +#include "modules/indexeddb/IDBObserverChanges.h" |
| +#include "modules/indexeddb/IDBObserverInit.h" |
| +#include "platform/SharedBuffer.h" |
| +#include <v8.h> |
| + |
| +namespace blink { |
| + |
| +IDBObserver* IDBObserver::create(IDBObserverCallback& callback, const IDBObserverInit& options) |
| +{ |
| + return new IDBObserver(callback, options); |
| +} |
| + |
| +IDBObserver::IDBObserver(IDBObserverCallback& callback, const IDBObserverInit& options) |
| + : m_callback(&callback) |
| + , m_transaction(options.transaction()) |
| + , m_values(options.values()) |
| + , m_noRecords(options.noRecords()) |
| +{ |
| +} |
| + |
| +void IDBObserver::observe(IDBDatabase* database, IDBTransaction* transaction, ExceptionState& exceptionState) |
| +{ |
| + // TODO(palakj): Finish implementation |
|
dmurph
2016/06/06 22:35:50
nit: period at the end. We try to have all comment
palakj1
2016/06/07 00:11:16
forgot about this again. Thanks.
|
| +} |
| + |
| +DEFINE_TRACE(IDBObserver) |
| +{ |
| + visitor->trace(m_callback); |
| +} |
| + |
| +} // namespace blink |