OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "web/SuspendableScriptExecutor.h" | 5 #include "web/SuspendableScriptExecutor.h" |
6 | 6 |
| 7 #include <memory> |
7 #include "bindings/core/v8/ScriptController.h" | 8 #include "bindings/core/v8/ScriptController.h" |
8 #include "bindings/core/v8/ScriptSourceCode.h" | 9 #include "bindings/core/v8/ScriptSourceCode.h" |
| 10 #include "bindings/core/v8/V8Binding.h" |
9 #include "bindings/core/v8/V8PersistentValueVector.h" | 11 #include "bindings/core/v8/V8PersistentValueVector.h" |
10 #include "bindings/core/v8/WindowProxy.h" | 12 #include "bindings/core/v8/WindowProxy.h" |
11 #include "core/dom/Document.h" | 13 #include "core/dom/Document.h" |
12 #include "core/dom/DocumentUserGestureToken.h" | 14 #include "core/dom/DocumentUserGestureToken.h" |
13 #include "core/dom/TaskRunnerHelper.h" | 15 #include "core/dom/TaskRunnerHelper.h" |
14 #include "core/frame/LocalFrame.h" | 16 #include "core/frame/LocalFrame.h" |
15 #include "platform/UserGestureIndicator.h" | 17 #include "platform/UserGestureIndicator.h" |
16 #include "public/platform/WebVector.h" | 18 #include "public/platform/WebVector.h" |
17 #include "public/web/WebScriptExecutionCallback.h" | 19 #include "public/web/WebScriptExecutionCallback.h" |
18 #include "wtf/PtrUtil.h" | 20 #include "wtf/PtrUtil.h" |
19 #include "wtf/Vector.h" | 21 #include "wtf/Vector.h" |
20 #include <memory> | |
21 | 22 |
22 namespace blink { | 23 namespace blink { |
23 | 24 |
24 namespace { | 25 namespace { |
25 | 26 |
26 class WebScriptExecutor : public SuspendableScriptExecutor::Executor { | 27 class WebScriptExecutor : public SuspendableScriptExecutor::Executor { |
27 public: | 28 public: |
28 WebScriptExecutor(const HeapVector<ScriptSourceCode>& sources, | 29 WebScriptExecutor(const HeapVector<ScriptSourceCode>& sources, |
29 int worldID, | 30 int worldID, |
30 bool userGesture); | 31 bool userGesture); |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 m_keepAlive.clear(); | 228 m_keepAlive.clear(); |
228 stop(); | 229 stop(); |
229 } | 230 } |
230 | 231 |
231 DEFINE_TRACE(SuspendableScriptExecutor) { | 232 DEFINE_TRACE(SuspendableScriptExecutor) { |
232 visitor->trace(m_executor); | 233 visitor->trace(m_executor); |
233 SuspendableTimer::trace(visitor); | 234 SuspendableTimer::trace(visitor); |
234 } | 235 } |
235 | 236 |
236 } // namespace blink | 237 } // namespace blink |
OLD | NEW |