Chromium Code Reviews| Index: third_party/WebKit/Source/bindings/modules/v8/V8IDBObserverCallback.h |
| diff --git a/third_party/WebKit/Source/bindings/modules/v8/V8IDBObserverCallback.h b/third_party/WebKit/Source/bindings/modules/v8/V8IDBObserverCallback.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..62967b478a40706f1a7eac5465070a07288fc706 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/bindings/modules/v8/V8IDBObserverCallback.h |
| @@ -0,0 +1,34 @@ |
| +// 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 V8IDBObserverCallback_h |
| +#define V8IDBObserverCallback_h |
| + |
| +#include "bindings/core/v8/ActiveDOMCallback.h" |
| +#include "bindings/core/v8/DOMWrapperWorld.h" |
| +#include "bindings/core/v8/ScopedPersistent.h" |
| +#include "core/CoreExport.h" |
| +#include "modules/indexeddb/IDBObserverCallback.h" |
| + |
| +namespace blink { |
| + |
| +class V8IDBObserverCallback final : public IDBObserverCallback, public ActiveDOMCallback { |
| + USING_GARBAGE_COLLECTED_MIXIN(V8IDBObserverCallback); |
| + |
| +public: |
| + CORE_EXPORT V8IDBObserverCallback(v8::Local<v8::Function>, v8::Local<v8::Object>, ScriptState*); |
|
Marijn Kruisselbrink
2016/06/02 23:51:24
Code in modules/ should use MODULES_EXPORT rather
palakj1
2016/06/03 01:21:52
Removed CORE_EXPORT
|
| + ~V8IDBObserverCallback() override; |
| + |
| + DECLARE_VIRTUAL_TRACE(); |
| + |
| + ExecutionContext* getExecutionContext() const override { return ContextLifecycleObserver::getExecutionContext(); } |
| +private: |
| + static void setWeakCallback(const v8::WeakCallbackInfo<V8IDBObserverCallback>&); |
|
dmurph
2016/06/02 23:48:37
Do we need this?
palakj1
2016/06/03 01:21:52
I had copied this peice of code from Intersection
|
| + |
| + ScopedPersistent<v8::Function> m_callback; |
| + RefPtr<ScriptState> m_scriptState; |
| +}; |
| + |
| +} // namespace blink |
| +#endif // V8IDBObserverCallback_h |