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

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

Issue 2116113002: [worklets] Make WorkerThread handle both Worker and Worklet global scopes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests. Created 4 years, 5 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 WorkerOrWorkletGlobalScope_h 5 #ifndef WorkerOrWorkletGlobalScope_h
6 #define WorkerOrWorkletGlobalScope_h 6 #define WorkerOrWorkletGlobalScope_h
7 7
8 #include "core/dom/ExecutionContext.h" 8 #include "core/dom/ExecutionContext.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 class ScriptWrappable; 12 class ScriptWrappable;
13 class WorkerOrWorkletScriptController; 13 class WorkerOrWorkletScriptController;
14 14
15 class CORE_EXPORT WorkerOrWorkletGlobalScope : public ExecutionContext { 15 class CORE_EXPORT WorkerOrWorkletGlobalScope : public ExecutionContext {
16 public: 16 public:
17 virtual ScriptWrappable* getScriptWrappable() const = 0; 17 virtual ScriptWrappable* getScriptWrappable() const = 0;
18 virtual WorkerOrWorkletScriptController* scriptController() = 0; 18 virtual WorkerOrWorkletScriptController* scriptController() = 0;
19 virtual bool isClosing() const = 0;
yhirano 2016/07/22 06:23:40 Could you add comments for these new functions?
ikilpatrick 2016/07/22 18:21:59 Done.
20 virtual void dispose() = 0;
kinuko 2016/07/22 05:44:34 comments?
ikilpatrick 2016/07/22 18:21:59 Done.
19 }; 21 };
20 22
21 DEFINE_TYPE_CASTS(WorkerOrWorkletGlobalScope, ExecutionContext, context, (contex t->isWorkerGlobalScope() || context->isWorkletGlobalScope()), (context.isWorkerG lobalScope() || context.isWorkletGlobalScope())); 23 DEFINE_TYPE_CASTS(WorkerOrWorkletGlobalScope, ExecutionContext, context, (contex t->isWorkerGlobalScope() || context->isWorkletGlobalScope()), (context.isWorkerG lobalScope() || context.isWorkletGlobalScope()));
22 24
23 } // namespace blink 25 } // namespace blink
24 26
25 #endif // WorkerOrWorkletGlobalScope_h 27 #endif // WorkerOrWorkletGlobalScope_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698