Chromium Code Reviews| Index: Source/core/dom/SuspendableScriptExecutor.h | 
| diff --git a/Source/core/dom/SuspendableScriptExecutor.h b/Source/core/dom/SuspendableScriptExecutor.h | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..39024c979824290b5a0ac50f2e248884eee116d5 | 
| --- /dev/null | 
| +++ b/Source/core/dom/SuspendableScriptExecutor.h | 
| @@ -0,0 +1,42 @@ | 
| +// Copyright 2014 The Chromium Authors. All rights reserved. | 
| +// Use of this source code is governed by a BSD-style license that can be | 
| +// found in the LICENSE file. | 
| + | 
| +#ifndef SuspendableScriptExecutor_h | 
| +#define SuspendableScriptExecutor_h | 
| + | 
| +#include "core/dom/ActiveDOMObject.h" | 
| +#include "wtf/OwnPtr.h" | 
| +#include "wtf/Vector.h" | 
| + | 
| +namespace blink { | 
| + | 
| +class LocalFrame; | 
| +class ScriptSourceCode; | 
| +class ScriptExecutionCallback; | 
| + | 
| +class SuspendableScriptExecutor final : public ActiveDOMObject { | 
| 
 
pfeldman
2014/10/22 15:38:17
Lets move this into web in order to remove one lev
 
kozyatinskiy1
2014/10/22 16:46:57
Done.
 
 | 
| +public: | 
| + SuspendableScriptExecutor(LocalFrame*, int worldID, const Vector<ScriptSourceCode>& sources, int extensionGroup, bool userGesture, PassOwnPtr<ScriptExecutionCallback>); | 
| + virtual ~SuspendableScriptExecutor(); | 
| + | 
| + void run(); | 
| + | 
| + virtual void resume() override; | 
| + | 
| + virtual void contextDestroyed() override; | 
| + | 
| +private: | 
| + void executeAndDestroySelf(); | 
| + | 
| + LocalFrame* m_frame; | 
| + int m_worldID; | 
| + Vector<ScriptSourceCode> m_sources; | 
| + int m_extensionGroup; | 
| + bool m_userGesture; | 
| + OwnPtr<ScriptExecutionCallback> m_callback; | 
| +}; | 
| + | 
| +} // namespace blink | 
| + | 
| +#endif // SuspendableScriptExecutor_h |