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

Side by Side Diff: third_party/WebKit/Source/core/workers/ThreadedGlobalScopeProxy.h

Issue 2310673002: [worklets] Split up InProcessWorkerMessagingProxy into a base+worker class. (Closed)
Patch Set: ... Created 4 years, 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 WorkletGlobalScopeProxy_h 5 #ifndef ThreadedGlobalScopeProxy_h
6 #define WorkletGlobalScopeProxy_h 6 #define ThreadedGlobalScopeProxy_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "platform/weborigin/KURL.h" 9 #include "wtf/Allocator.h"
10 #include "wtf/text/WTFString.h"
11 10
12 namespace blink { 11 namespace blink {
13 12
14 class ScriptSourceCode; 13 // The ThreadedGlobalScopeProxy is used to control the lifetime of the worker
14 // or worklet's global scope.
15 class CORE_EXPORT ThreadedGlobalScopeProxy {
ikilpatrick 2016/09/04 00:34:01 I wasn't sure what to do this with interface; we c
nhiroki 2016/09/06 07:07:08 I think this (InProcessWorkerObjectProxy) is not u
ikilpatrick 2016/09/06 18:59:49 Sounds good. I sent out a separate patch for this
16 USING_FAST_MALLOC(ThreadedGlobalScopeProxy);
17 public:
18 virtual ~ThreadedGlobalScopeProxy() { }
15 19
16 // A proxy to talk to the worklet global scope. The global scope may exist in 20 virtual void terminateGlobalScope() = 0;
17 // the main thread or on a different thread.
18 class CORE_EXPORT WorkletGlobalScopeProxy {
19 public:
20 virtual ~WorkletGlobalScopeProxy() { }
21 21
22 virtual void evaluateScript(const ScriptSourceCode&) = 0; 22 virtual bool hasPendingActivity() const = 0;
23 virtual void terminateWorkletGlobalScope() = 0; 23
24 virtual void parentObjectDestroyed() = 0;
24 }; 25 };
25 26
26 } // namespace blink 27 } // namespace blink
27 28
28 #endif // WorkletGlobalScopeProxy_h 29 #endif // ThreadedGlobalScopeProxy_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698