Bug 1819335 Part 2 - Add tests for page name change and break-after/break-before...
[gecko.git] / layout / style / PaintWorkletImpl.h
blob2562a66336d5501d6687f35495d19b8fd36a5f1a
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"
12 namespace mozilla {
14 class PaintWorkletImpl final : public WorkletImpl {
15 public:
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;
25 protected:
26 // Execution thread only.
27 already_AddRefed<dom::WorkletGlobalScope> ConstructGlobalScope() override;
29 private:
30 PaintWorkletImpl(nsPIDOMWindowInner* aWindow, nsIPrincipal* aPrincipal);
31 ~PaintWorkletImpl();
34 } // namespace mozilla
36 #endif // PaintWorkletImpl_h