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 DOM_PLACESEVENTCOUNTS_H_
8 #define DOM_PLACESEVENTCOUNTS_H_
10 #include "js/TypeDecls.h"
11 #include "mozilla/dom/BindingDeclarations.h"
12 #include "mozilla/dom/PlacesEventBinding.h"
13 #include "nsCycleCollectionParticipant.h"
14 #include "nsWrapperCache.h"
16 namespace mozilla::dom
{
18 class PlacesEventCounts final
: public nsISupports
, public nsWrapperCache
{
20 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
21 NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(PlacesEventCounts
)
26 nsresult
Increment(PlacesEventType aEventType
);
28 nsISupports
* GetParentObject() const { return nullptr; };
30 JSObject
* WrapObject(JSContext
* aCx
,
31 JS::Handle
<JSObject
*> aGivenProto
) override
;
34 ~PlacesEventCounts() = default;
37 } // namespace mozilla::dom
39 #endif // DOM_PLACESEVENTCOUNTS_H_