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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/workers/MainThreadWorkletGlobalScope.h
diff --git a/third_party/WebKit/Source/core/workers/MainThreadWorkletGlobalScope.h b/third_party/WebKit/Source/core/workers/MainThreadWorkletGlobalScope.h
index 494a19c056d5c6bdaed9cabb0891f636e804a32f..14d4478f89943f38648e6c171749a6a6df24b718 100644
--- a/third_party/WebKit/Source/core/workers/MainThreadWorkletGlobalScope.h
+++ b/third_party/WebKit/Source/core/workers/MainThreadWorkletGlobalScope.h
@@ -5,28 +5,40 @@
#ifndef MainThreadWorkletGlobalScope_h
#define MainThreadWorkletGlobalScope_h
+#include "core/CoreExport.h"
#include "core/dom/ExecutionContext.h"
#include "core/frame/LocalFrameLifecycleObserver.h"
-#include "core/workers/WorkerOrWorkletGlobalScope.h"
+#include "core/workers/WorkletGlobalScope.h"
+#include "core/workers/WorkletGlobalScopeProxy.h"
namespace blink {
+class ConsoleMessage;
class LocalFrame;
-class CORE_EXPORT MainThreadWorkletGlobalScope : public WorkerOrWorkletGlobalScope, public LocalFrameLifecycleObserver {
+class CORE_EXPORT MainThreadWorkletGlobalScope : public WorkletGlobalScope, public WorkletGlobalScopeProxy, public LocalFrameLifecycleObserver {
public:
+ ~MainThreadWorkletGlobalScope() override;
+ bool isMainThreadWorkletGlobalScope() const final { return true; }
+
+ // WorkletGlobalScopeProxy
+ void evaluateScript(const String& source, const KURL& scriptURL) final;
+ void terminateWorkletGlobalScope() final;
+
+ using LocalFrameLifecycleObserver::frame;
+ void addConsoleMessage(ConsoleMessage*) final;
+
DEFINE_INLINE_VIRTUAL_TRACE()
{
- WorkerOrWorkletGlobalScope::trace(visitor);
+ WorkletGlobalScope::trace(visitor);
LocalFrameLifecycleObserver::trace(visitor);
}
protected:
- explicit MainThreadWorkletGlobalScope(LocalFrame* frame)
- : LocalFrameLifecycleObserver(frame) { }
+ MainThreadWorkletGlobalScope(LocalFrame*, const KURL&, const String& userAgent, PassRefPtr<SecurityOrigin>, v8::Isolate*);
};
-DEFINE_TYPE_CASTS(MainThreadWorkletGlobalScope, ExecutionContext, context, context->isWorkletGlobalScope(), context.isWorkletGlobalScope());
+DEFINE_TYPE_CASTS(MainThreadWorkletGlobalScope, ExecutionContext, context, context->isMainThreadWorkletGlobalScope(), context.isMainThreadWorkletGlobalScope());
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698