Bug 1852740: add tests for the `fetchpriority` attribute in Link headers. r=necko...
[gecko.git] / dom / streams / BaseQueuingStrategy.h
blobeef7147c08115d15350dc49df08cd0ecdcea37cd
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
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_BaseQueuingStrategy_h
8 #define mozilla_dom_BaseQueuingStrategy_h
10 #include "nsCycleCollectionParticipant.h"
11 #include "nsIGlobalObject.h"
13 namespace mozilla::dom {
15 class BaseQueuingStrategy : public nsISupports {
16 public:
17 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
18 NS_DECL_CYCLE_COLLECTION_CLASS(BaseQueuingStrategy)
20 BaseQueuingStrategy(nsISupports* aGlobal, double aHighWaterMark)
21 : mGlobal(do_QueryInterface(aGlobal)), mHighWaterMark(aHighWaterMark) {}
23 nsIGlobalObject* GetParentObject() const;
25 double HighWaterMark() const { return mHighWaterMark; }
27 protected:
28 virtual ~BaseQueuingStrategy() = default;
30 protected:
31 nsCOMPtr<nsIGlobalObject> mGlobal;
32 double mHighWaterMark = 0.0;
35 } // namespace mozilla::dom
37 #endif