Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Side by Side Diff: Source/core/dom/SuspendableScriptExecutor.h

Issue 660863002: [DevTools] Added public method for async execution of scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef SuspendableScriptExecutor_h
6 #define SuspendableScriptExecutor_h
7
8 #include "core/dom/ActiveDOMObject.h"
9 #include "wtf/OwnPtr.h"
10 #include "wtf/Vector.h"
11
12 namespace blink {
13
14 class LocalFrame;
15 class ScriptSourceCode;
16 class ScriptExecutionCallback;
17
18 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.
19 public:
20 SuspendableScriptExecutor(LocalFrame*, int worldID, const Vector<ScriptSourc eCode>& sources, int extensionGroup, bool userGesture, PassOwnPtr<ScriptExecutio nCallback>);
21 virtual ~SuspendableScriptExecutor();
22
23 void run();
24
25 virtual void resume() override;
26
27 virtual void contextDestroyed() override;
28
29 private:
30 void executeAndDestroySelf();
31
32 LocalFrame* m_frame;
33 int m_worldID;
34 Vector<ScriptSourceCode> m_sources;
35 int m_extensionGroup;
36 bool m_userGesture;
37 OwnPtr<ScriptExecutionCallback> m_callback;
38 };
39
40 } // namespace blink
41
42 #endif // SuspendableScriptExecutor_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698