1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
7 #ifndef PaintWorkletImpl_h
8 #define PaintWorkletImpl_h
10 #include "mozilla/dom/WorkletImpl.h"
14 class PaintWorkletImpl final
: public WorkletImpl
{
16 // Methods for parent thread only:
18 static already_AddRefed
<dom::Worklet
> CreateWorklet(
19 nsPIDOMWindowInner
* aWindow
, nsIPrincipal
* aPrincipal
);
21 nsContentPolicyType
ContentPolicyType() const override
{
22 return nsIContentPolicy::TYPE_INTERNAL_PAINTWORKLET
;
26 // Execution thread only.
27 already_AddRefed
<dom::WorkletGlobalScope
> ConstructGlobalScope() override
;
30 PaintWorkletImpl(nsPIDOMWindowInner
* aWindow
, nsIPrincipal
* aPrincipal
);
34 } // namespace mozilla
36 #endif // PaintWorkletImpl_h