PlacesEventCounts.h (1162B)
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/. */ 6 7 #ifndef DOM_PLACESEVENTCOUNTS_H_ 8 #define DOM_PLACESEVENTCOUNTS_H_ 9 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" 15 16 namespace mozilla::dom { 17 18 class PlacesEventCounts final : public nsISupports, public nsWrapperCache { 19 public: 20 NS_DECL_CYCLE_COLLECTING_ISUPPORTS 21 NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(PlacesEventCounts) 22 23 public: 24 PlacesEventCounts(); 25 26 nsresult Increment(PlacesEventType aEventType); 27 28 nsISupports* GetParentObject() const { return nullptr; }; 29 30 JSObject* WrapObject(JSContext* aCx, 31 JS::Handle<JSObject*> aGivenProto) override; 32 33 private: 34 ~PlacesEventCounts() = default; 35 }; 36 37 } // namespace mozilla::dom 38 39 #endif // DOM_PLACESEVENTCOUNTS_H_