Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 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 V8IntersectionObserverCallback_h | |
| 6 #define V8IntersectionObserverCallback_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 "core/CoreExport.h" | |
| 12 #include "core/dom/IntersectionObserverCallback.h" | |
| 13 | |
| 14 namespace blink { | |
| 15 | |
| 16 class V8IntersectionObserverCallback final : public IntersectionObserverCallback , public ActiveDOMCallback { | |
| 17 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(V8IntersectionObserverCallback); | |
| 18 public: | |
| 19 CORE_EXPORT V8IntersectionObserverCallback(v8::Local<v8::Function>, v8::Loca l<v8::Object>, ScriptState*); | |
| 20 ~V8IntersectionObserverCallback() override; | |
| 21 | |
| 22 DECLARE_VIRTUAL_TRACE(); | |
| 23 | |
| 24 void handleEvent(HeapVector<Member<IntersectionObserverEntry>>&, Intersectio nObserver&) override; | |
|
haraken
2015/12/22 01:13:29
const HeapVector<>&
szager1
2015/12/22 07:53:40
Done.
| |
| 25 ExecutionContext* executionContext() const override { return ContextLifecycl eObserver::executionContext(); } | |
| 26 private: | |
| 27 | |
| 28 static void setWeakCallback(const v8::WeakCallbackInfo<V8IntersectionObserve rCallback>&); | |
| 29 | |
| 30 ScopedPersistent<v8::Function> m_callback; | |
| 31 RefPtr<ScriptState> m_scriptState; | |
| 32 }; | |
| 33 | |
| 34 } | |
| 35 #endif // V8IntersectionObserverCallback_h | |
| OLD | NEW |