| 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 #ifndef SuspendableScriptExecutor_h | 5 #ifndef SuspendableScriptExecutor_h |
| 6 #define SuspendableScriptExecutor_h | 6 #define SuspendableScriptExecutor_h |
| 7 | 7 |
| 8 #include "core/frame/SuspendableTimer.h" | 8 #include "core/frame/SuspendableTimer.h" |
| 9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
| 10 #include "platform/heap/SelfKeepAlive.h" | 10 #include "platform/heap/SelfKeepAlive.h" |
| 11 #include "wtf/Vector.h" | 11 #include "wtf/Vector.h" |
| 12 #include <v8.h> | 12 #include <v8.h> |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 class LocalFrame; | 16 class LocalFrame; |
| 17 class ScriptSourceCode; | 17 class ScriptSourceCode; |
| 18 class ScriptState; | 18 class ScriptState; |
| 19 class WebScriptExecutionCallback; | 19 class WebScriptExecutionCallback; |
| 20 | 20 |
| 21 class SuspendableScriptExecutor final | 21 class SuspendableScriptExecutor final |
| 22 : public GarbageCollectedFinalized<SuspendableScriptExecutor>, | 22 : public GarbageCollectedFinalized<SuspendableScriptExecutor>, |
| 23 public SuspendableTimer { | 23 public SuspendableTimer { |
| 24 USING_GARBAGE_COLLECTED_MIXIN(SuspendableScriptExecutor); | 24 USING_GARBAGE_COLLECTED_MIXIN(SuspendableScriptExecutor); |
| 25 | 25 |
| 26 public: | 26 public: |
| 27 static void createAndRun(LocalFrame*, | 27 static void createAndRun(LocalFrame*, |
| 28 int worldID, | 28 int worldID, |
| 29 const HeapVector<ScriptSourceCode>& sources, | 29 const HeapVector<ScriptSourceCode>& sources, |
| 30 int extensionGroup, | |
| 31 bool userGesture, | 30 bool userGesture, |
| 32 WebScriptExecutionCallback*); | 31 WebScriptExecutionCallback*); |
| 33 static void createAndRun(LocalFrame*, | 32 static void createAndRun(LocalFrame*, |
| 34 v8::Isolate*, | 33 v8::Isolate*, |
| 35 v8::Local<v8::Context>, | 34 v8::Local<v8::Context>, |
| 36 v8::Local<v8::Function>, | 35 v8::Local<v8::Function>, |
| 37 v8::Local<v8::Value> receiver, | 36 v8::Local<v8::Value> receiver, |
| 38 int argc, | 37 int argc, |
| 39 v8::Local<v8::Value> argv[], | 38 v8::Local<v8::Value> argv[], |
| 40 WebScriptExecutionCallback*); | 39 WebScriptExecutionCallback*); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 69 WebScriptExecutionCallback* m_callback; | 68 WebScriptExecutionCallback* m_callback; |
| 70 | 69 |
| 71 SelfKeepAlive<SuspendableScriptExecutor> m_keepAlive; | 70 SelfKeepAlive<SuspendableScriptExecutor> m_keepAlive; |
| 72 | 71 |
| 73 Member<Executor> m_executor; | 72 Member<Executor> m_executor; |
| 74 }; | 73 }; |
| 75 | 74 |
| 76 } // namespace blink | 75 } // namespace blink |
| 77 | 76 |
| 78 #endif // SuspendableScriptExecutor_h | 77 #endif // SuspendableScriptExecutor_h |
| OLD | NEW |