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

Side by Side Diff: third_party/WebKit/Source/web/SuspendableScriptExecutor.h

Issue 2753013003: Bindings: Remove DOMWrapperWorld::fromWorldId() for cleanup (Closed)
Patch Set: rebase Created 3 years, 9 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
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 "bindings/core/v8/DOMWrapperWorld.h"
8 #include "core/frame/SuspendableTimer.h" 9 #include "core/frame/SuspendableTimer.h"
9 #include "platform/heap/Handle.h" 10 #include "platform/heap/Handle.h"
10 #include "platform/heap/SelfKeepAlive.h" 11 #include "platform/heap/SelfKeepAlive.h"
11 #include "v8/include/v8.h" 12 #include "v8/include/v8.h"
13 #include "wtf/RefPtr.h"
12 #include "wtf/Vector.h" 14 #include "wtf/Vector.h"
13 15
14 namespace blink { 16 namespace blink {
15 17
16 class LocalFrame; 18 class LocalFrame;
17 class ScriptSourceCode; 19 class ScriptSourceCode;
18 class ScriptState; 20 class ScriptState;
19 class WebScriptExecutionCallback; 21 class WebScriptExecutionCallback;
20 22
21 class SuspendableScriptExecutor final 23 class SuspendableScriptExecutor final
22 : public GarbageCollectedFinalized<SuspendableScriptExecutor>, 24 : public GarbageCollectedFinalized<SuspendableScriptExecutor>,
23 public SuspendableTimer { 25 public SuspendableTimer {
24 USING_GARBAGE_COLLECTED_MIXIN(SuspendableScriptExecutor); 26 USING_GARBAGE_COLLECTED_MIXIN(SuspendableScriptExecutor);
25 27
26 public: 28 public:
27 enum BlockingOption { NonBlocking, OnloadBlocking }; 29 enum BlockingOption { NonBlocking, OnloadBlocking };
28 30
29 static SuspendableScriptExecutor* create( 31 static SuspendableScriptExecutor* create(
30 LocalFrame*, 32 LocalFrame*,
31 int worldID, 33 RefPtr<DOMWrapperWorld>,
32 const HeapVector<ScriptSourceCode>& sources, 34 const HeapVector<ScriptSourceCode>& sources,
33 bool userGesture, 35 bool userGesture,
34 WebScriptExecutionCallback*); 36 WebScriptExecutionCallback*);
35 static void createAndRun(LocalFrame*, 37 static void createAndRun(LocalFrame*,
36 v8::Isolate*, 38 v8::Isolate*,
37 v8::Local<v8::Context>, 39 v8::Local<v8::Context>,
38 v8::Local<v8::Function>, 40 v8::Local<v8::Function>,
39 v8::Local<v8::Value> receiver, 41 v8::Local<v8::Value> receiver,
40 int argc, 42 int argc,
41 v8::Local<v8::Value> argv[], 43 v8::Local<v8::Value> argv[],
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 BlockingOption m_blockingOption; 75 BlockingOption m_blockingOption;
74 76
75 SelfKeepAlive<SuspendableScriptExecutor> m_keepAlive; 77 SelfKeepAlive<SuspendableScriptExecutor> m_keepAlive;
76 78
77 Member<Executor> m_executor; 79 Member<Executor> m_executor;
78 }; 80 };
79 81
80 } // namespace blink 82 } // namespace blink
81 83
82 #endif // SuspendableScriptExecutor_h 84 #endif // SuspendableScriptExecutor_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698