Bug 1885489 - Part 5: Add SnapshotIterator::readInt32(). r=iain
[gecko.git] / dom / webscheduling / WebTaskController.h
blobade3526531f718aa0db4639539b01cdcfc78e97e
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:expandtab:shiftwidth=2:tabstop=2:
3 */
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 {
18 public:
19 explicit WebTaskController(nsIGlobalObject* aGlobal, TaskPriority aPriority);
21 static already_AddRefed<WebTaskController> Constructor(
22 const GlobalObject& aGlobal, const TaskControllerInit& aInit,
23 ErrorResult& aRv);
25 virtual JSObject* WrapObject(JSContext* aCx,
26 JS::Handle<JSObject*> aGivenProto) override;
28 void SetPriority(TaskPriority aPriority, ErrorResult& aRv);
30 private:
31 ~WebTaskController() = default;
33 } // namespace mozilla::dom
35 #endif