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

Unified Diff: third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.h

Issue 1818223002: Introduce PaintWorkletGlobalScope, rename renderWorklet attribute to paintWorklet. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix interface listing order. 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/modules/csspaint/PaintWorkletGlobalScope.h
diff --git a/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.h b/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.h
new file mode 100644
index 0000000000000000000000000000000000000000..fb48bccdbec20fe9ba20f239a7f58c7503807aa5
--- /dev/null
+++ b/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.h
@@ -0,0 +1,31 @@
+// 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 PaintWorkletGlobalScope_h
+#define PaintWorkletGlobalScope_h
+
+#include "bindings/core/v8/ScriptValue.h"
+#include "core/dom/ExecutionContext.h"
+#include "modules/worklet/WorkletGlobalScope.h"
+
+namespace blink {
+
+class PaintWorkletGlobalScope : public WorkletGlobalScope {
+ DEFINE_WRAPPERTYPEINFO();
+public:
+ static PassRefPtrWillBeRawPtr<PaintWorkletGlobalScope> create(LocalFrame*, const KURL&, const String& userAgent, PassRefPtr<SecurityOrigin>, v8::Isolate*);
+ ~PaintWorkletGlobalScope() override;
+
+ bool isPaintWorkletGlobalScope() const final { return true; }
+ void registerPaint(const String&, ScriptValue) { }
+
+private:
+ PaintWorkletGlobalScope(LocalFrame*, const KURL&, const String& userAgent, PassRefPtr<SecurityOrigin>, v8::Isolate*);
+};
+
+DEFINE_TYPE_CASTS(PaintWorkletGlobalScope, ExecutionContext, context, context->isPaintWorkletGlobalScope(), context.isPaintWorkletGlobalScope());
+
+} // namespace blink
+
+#endif // PaintWorkletGlobalScope_h

Powered by Google App Engine
This is Rietveld 408576698