| 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 #ifndef V8IDBObserverCallback_h | |
| 6 #define V8IDBObserverCallback_h | |
| 7 | |
| 8 #include "bindings/core/v8/ActiveDOMCallback.h" | |
| 9 #include "bindings/core/v8/DOMWrapperWorld.h" | |
| 10 #include "bindings/core/v8/ScopedPersistent.h" | |
| 11 #include "modules/indexeddb/IDBObserverCallback.h" | |
| 12 | |
| 13 namespace blink { | |
| 14 | |
| 15 class V8IDBObserverCallback final : public IDBObserverCallback, | |
| 16 public ActiveDOMCallback { | |
| 17 USING_GARBAGE_COLLECTED_MIXIN(V8IDBObserverCallback); | |
| 18 | |
| 19 public: | |
| 20 V8IDBObserverCallback(v8::Local<v8::Function>, | |
| 21 v8::Local<v8::Object>, | |
| 22 ScriptState*); | |
| 23 ~V8IDBObserverCallback() override; | |
| 24 | |
| 25 DECLARE_VIRTUAL_TRACE(); | |
| 26 | |
| 27 void handleChanges(IDBObserverChanges&, IDBObserver&) override; | |
| 28 ExecutionContext* getExecutionContext() const override { | |
| 29 return ContextLifecycleObserver::getExecutionContext(); | |
| 30 } | |
| 31 | |
| 32 private: | |
| 33 ScopedPersistent<v8::Function> m_callback; | |
| 34 RefPtr<ScriptState> m_scriptState; | |
| 35 }; | |
| 36 | |
| 37 } // namespace blink | |
| 38 #endif // V8IDBObserverCallback_h | |
| OLD | NEW |