1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:expandtab:shiftwidth=2:tabstop=2:
4 /* This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 #ifndef mozilla_dom_WebTaskController_h
9 #define mozilla_dom_WebTaskController_h
11 #include "nsWrapperCache.h"
13 #include "mozilla/dom/WebTaskSchedulingBinding.h"
14 #include "mozilla/dom/AbortController.h"
16 namespace mozilla::dom
{
17 class WebTaskController
: public AbortController
{
19 explicit WebTaskController(nsIGlobalObject
* aGlobal
, TaskPriority aPriority
);
21 static already_AddRefed
<WebTaskController
> Constructor(
22 const GlobalObject
& aGlobal
, const TaskControllerInit
& aInit
,
25 virtual JSObject
* WrapObject(JSContext
* aCx
,
26 JS::Handle
<JSObject
*> aGivenProto
) override
;
28 void SetPriority(TaskPriority aPriority
, ErrorResult
& aRv
);
31 ~WebTaskController() = default;
33 } // namespace mozilla::dom