Bug 1839315: part 4) Link from `SheetLoadData::mWasAlternate` to spec. r=emilio DONTBUILD
[gecko.git] / gfx / vr / FxRWindowManager.h
blob214ee1ecbfb7d471490b2b2f241944a257846c49
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #pragma once
7 #include <cstdint>
9 class nsPIDOMWindowOuter;
10 class nsWindow;
12 // FxRWindowManager is a singleton that is responsible for tracking all of
13 // the top-level windows created for Firefox Reality on Desktop. Only a
14 // single window is initially supported.
15 class FxRWindowManager final {
16 public:
17 static FxRWindowManager* GetInstance();
19 void AddWindow(nsPIDOMWindowOuter* aWindow);
20 bool IsFxRWindow(uint64_t aOuterWindowID);
21 bool IsFxRWindow(const nsWindow* aWindow) const;
22 uint64_t GetWindowID() const;
24 private:
25 FxRWindowManager();
27 // Only a single window is supported for tracking. Support for multiple
28 // windows will require a data structure to collect windows as they are
29 // created.
30 nsPIDOMWindowOuter* mWindow;