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

Unified Diff: third_party/WebKit/Source/core/workers/MainThreadWorkletGlobalScope.h

Issue 1745253002: [Worklets] Add basic debugging to main thread worklets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix non-oilpan build. Created 4 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 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
new file mode 100644
index 0000000000000000000000000000000000000000..494a19c056d5c6bdaed9cabb0891f636e804a32f
--- /dev/null
+++ b/third_party/WebKit/Source/core/workers/MainThreadWorkletGlobalScope.h
@@ -0,0 +1,33 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MainThreadWorkletGlobalScope_h
+#define MainThreadWorkletGlobalScope_h
+
+#include "core/dom/ExecutionContext.h"
+#include "core/frame/LocalFrameLifecycleObserver.h"
+#include "core/workers/WorkerOrWorkletGlobalScope.h"
+
+namespace blink {
+
+class LocalFrame;
+
+class CORE_EXPORT MainThreadWorkletGlobalScope : public WorkerOrWorkletGlobalScope, public LocalFrameLifecycleObserver {
+public:
+ DEFINE_INLINE_VIRTUAL_TRACE()
+ {
+ WorkerOrWorkletGlobalScope::trace(visitor);
+ LocalFrameLifecycleObserver::trace(visitor);
+ }
+
+protected:
+ explicit MainThreadWorkletGlobalScope(LocalFrame* frame)
+ : LocalFrameLifecycleObserver(frame) { }
+};
+
+DEFINE_TYPE_CASTS(MainThreadWorkletGlobalScope, ExecutionContext, context, context->isWorkletGlobalScope(), context.isWorkletGlobalScope());
+
+} // namespace blink
+
+#endif // MainThreadWorkletGlobalScope_h

Powered by Google App Engine
This is Rietveld 408576698