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
{
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
; }
28 virtual ~BaseQueuingStrategy() = default;
31 nsCOMPtr
<nsIGlobalObject
> mGlobal
;
32 double mHighWaterMark
= 0.0;
35 } // namespace mozilla::dom