1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:set ts=2 sw=2 sts=2 et cindent: */
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 file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_XRPermissionRequest_h_
8 #define mozilla_dom_XRPermissionRequest_h_
10 #include "mozilla/dom/Promise.h"
11 #include "nsContentPermissionHelper.h"
12 #include "nsISupports.h"
14 namespace mozilla::dom
{
17 * Handles permission dialog management when requesting XR device access.
19 class XRPermissionRequest final
: public ContentPermissionRequestBase
{
21 XRPermissionRequest(nsPIDOMWindowInner
* aWindow
, uint64_t aWindowId
);
23 NS_DECL_ISUPPORTS_INHERITED
24 NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(XRPermissionRequest
,
25 ContentPermissionRequestBase
)
26 // nsIContentPermissionRequest
27 NS_IMETHOD
Cancel(void) override
;
28 NS_IMETHOD
Allow(JS::Handle
<JS::Value
> choices
) override
;
32 ~XRPermissionRequest() = default;
37 } // namespace mozilla::dom
39 #endif // mozilla_dom_XR_h_