Index: third_party/WebKit/Source/modules/csspaint/PaintWorklet.h |
diff --git a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnectionErrorCallback.h b/third_party/WebKit/Source/modules/csspaint/PaintWorklet.h |
similarity index 31% |
copy from third_party/WebKit/Source/modules/mediastream/RTCPeerConnectionErrorCallback.h |
copy to third_party/WebKit/Source/modules/csspaint/PaintWorklet.h |
index 59299c215cd6ad6a8dd5b7a057f262890ce65dac..1bf6a6962fcebf37c282efbb62dc46efd860365f 100644 |
--- a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnectionErrorCallback.h |
+++ b/third_party/WebKit/Source/modules/csspaint/PaintWorklet.h |
@@ -2,23 +2,30 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef RTCPeerConnectionErrorCallback_h |
-#define RTCPeerConnectionErrorCallback_h |
+#ifndef PaintWorklet_h |
+#define PaintWorklet_h |
+#include "modules/worklet/Worklet.h" |
#include "platform/heap/Handle.h" |
namespace blink { |
-class ExecutionContext; |
-class DOMException; |
- |
-class RTCPeerConnectionErrorCallback : public GarbageCollectedFinalized<RTCPeerConnectionErrorCallback> { |
+class PaintWorklet final : public Worklet { |
+ WTF_MAKE_NONCOPYABLE(PaintWorklet); |
public: |
- virtual ~RTCPeerConnectionErrorCallback() {} |
- virtual void handleEvent(DOMException*) = 0; |
- DEFINE_INLINE_VIRTUAL_TRACE() { } |
+ static PaintWorklet* create(LocalFrame*, ExecutionContext*); |
+ ~PaintWorklet() override; |
+ |
+ WorkletGlobalScope* workletGlobalScope() const final { return m_paintWorkletGlobalScope.get(); } |
+ |
+ DECLARE_VIRTUAL_TRACE(); |
+ |
+private: |
+ PaintWorklet(LocalFrame*, ExecutionContext*); |
+ |
+ RefPtrWillBeMember<WorkletGlobalScope> m_paintWorkletGlobalScope; |
}; |
} // namespace blink |
-#endif // RTCPeerConnectionErrorCallback_h |
+#endif // PaintWorklet_h |