| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8IntersectionObserverCallback_h | 5 #ifndef V8IntersectionObserverCallback_h |
| 6 #define V8IntersectionObserverCallback_h | 6 #define V8IntersectionObserverCallback_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ActiveDOMCallback.h" | 8 #include "bindings/core/v8/ActiveDOMCallback.h" |
| 9 #include "bindings/core/v8/DOMWrapperWorld.h" | 9 #include "bindings/core/v8/DOMWrapperWorld.h" |
| 10 #include "bindings/core/v8/ScopedPersistent.h" | 10 #include "bindings/core/v8/ScopedPersistent.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 public: | 21 public: |
| 22 CORE_EXPORT V8IntersectionObserverCallback(v8::Local<v8::Function>, | 22 CORE_EXPORT V8IntersectionObserverCallback(v8::Local<v8::Function>, |
| 23 v8::Local<v8::Object>, | 23 v8::Local<v8::Object>, |
| 24 ScriptState*); | 24 ScriptState*); |
| 25 ~V8IntersectionObserverCallback() override; | 25 ~V8IntersectionObserverCallback() override; |
| 26 | 26 |
| 27 DECLARE_VIRTUAL_TRACE(); | 27 DECLARE_VIRTUAL_TRACE(); |
| 28 | 28 |
| 29 void handleEvent(const HeapVector<Member<IntersectionObserverEntry>>&, | 29 void handleEvent(const HeapVector<Member<IntersectionObserverEntry>>&, |
| 30 IntersectionObserver&) override; | 30 IntersectionObserver&) override; |
| 31 |
| 31 ExecutionContext* getExecutionContext() const override { | 32 ExecutionContext* getExecutionContext() const override { |
| 32 return ContextLifecycleObserver::getExecutionContext(); | 33 return m_scriptState->getExecutionContext(); |
| 33 } | 34 } |
| 34 | 35 |
| 35 private: | 36 private: |
| 36 ScopedPersistent<v8::Function> m_callback; | 37 ScopedPersistent<v8::Function> m_callback; |
| 37 RefPtr<ScriptState> m_scriptState; | 38 RefPtr<ScriptState> m_scriptState; |
| 38 }; | 39 }; |
| 39 | 40 |
| 40 } // namespace blink | 41 } // namespace blink |
| 41 #endif // V8IntersectionObserverCallback_h | 42 #endif // V8IntersectionObserverCallback_h |
| OLD | NEW |