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

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

Issue 2029163002: Worklets - Change inheritance heirarchy of WorkletGlobalScope (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase. Created 4 years, 6 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 MainThreadWorkletGlobalScope_h 5 #ifndef MainThreadWorkletGlobalScope_h
6 #define MainThreadWorkletGlobalScope_h 6 #define MainThreadWorkletGlobalScope_h
7 7
8 #include "core/CoreExport.h"
8 #include "core/dom/ExecutionContext.h" 9 #include "core/dom/ExecutionContext.h"
9 #include "core/frame/LocalFrameLifecycleObserver.h" 10 #include "core/frame/LocalFrameLifecycleObserver.h"
10 #include "core/workers/WorkerOrWorkletGlobalScope.h" 11 #include "core/workers/WorkletGlobalScope.h"
12 #include "core/workers/WorkletGlobalScopeProxy.h"
11 13
12 namespace blink { 14 namespace blink {
13 15
16 class ConsoleMessage;
14 class LocalFrame; 17 class LocalFrame;
15 18
16 class CORE_EXPORT MainThreadWorkletGlobalScope : public WorkerOrWorkletGlobalSco pe, public LocalFrameLifecycleObserver { 19 class CORE_EXPORT MainThreadWorkletGlobalScope : public WorkletGlobalScope, publ ic WorkletGlobalScopeProxy, public LocalFrameLifecycleObserver {
17 public: 20 public:
21 ~MainThreadWorkletGlobalScope() override;
22 bool isMainThreadWorkletGlobalScope() const final { return true; }
23
24 // WorkletGlobalScopeProxy
25 void evaluateScript(const String& source, const KURL& scriptURL) final;
26 void terminateWorkletGlobalScope() final;
27
28 using LocalFrameLifecycleObserver::frame;
29 void addConsoleMessage(ConsoleMessage*) final;
30
18 DEFINE_INLINE_VIRTUAL_TRACE() 31 DEFINE_INLINE_VIRTUAL_TRACE()
19 { 32 {
20 WorkerOrWorkletGlobalScope::trace(visitor); 33 WorkletGlobalScope::trace(visitor);
21 LocalFrameLifecycleObserver::trace(visitor); 34 LocalFrameLifecycleObserver::trace(visitor);
22 } 35 }
23 36
24 protected: 37 protected:
25 explicit MainThreadWorkletGlobalScope(LocalFrame* frame) 38 MainThreadWorkletGlobalScope(LocalFrame*, const KURL&, const String& userAge nt, PassRefPtr<SecurityOrigin>, v8::Isolate*);
26 : LocalFrameLifecycleObserver(frame) { }
27 }; 39 };
28 40
29 DEFINE_TYPE_CASTS(MainThreadWorkletGlobalScope, ExecutionContext, context, conte xt->isWorkletGlobalScope(), context.isWorkletGlobalScope()); 41 DEFINE_TYPE_CASTS(MainThreadWorkletGlobalScope, ExecutionContext, context, conte xt->isMainThreadWorkletGlobalScope(), context.isMainThreadWorkletGlobalScope());
30 42
31 } // namespace blink 43 } // namespace blink
32 44
33 #endif // MainThreadWorkletGlobalScope_h 45 #endif // MainThreadWorkletGlobalScope_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698