Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / dom / base / PlacesEventCounts.h
blob69abeac7b3a7d43470c3ba41d738eb22f42f8cce
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 {
19 public:
20 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
21 NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(PlacesEventCounts)
23 public:
24 PlacesEventCounts();
26 nsresult Increment(PlacesEventType aEventType);
28 nsISupports* GetParentObject() const { return nullptr; };
30 JSObject* WrapObject(JSContext* aCx,
31 JS::Handle<JSObject*> aGivenProto) override;
33 private:
34 ~PlacesEventCounts() = default;
37 } // namespace mozilla::dom
39 #endif // DOM_PLACESEVENTCOUNTS_H_