ReportBody.h (1094B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */ 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 mozilla_dom_ReportBody_h 8 #define mozilla_dom_ReportBody_h 9 10 #include "nsCOMPtr.h" 11 #include "nsCycleCollectionParticipant.h" 12 #include "nsISupports.h" 13 #include "nsWrapperCache.h" 14 15 class nsIGlobalObject; 16 17 namespace mozilla { 18 19 class JSONWriter; 20 21 namespace dom { 22 23 class ReportBody : public nsISupports, public nsWrapperCache { 24 public: 25 NS_DECL_CYCLE_COLLECTING_ISUPPORTS 26 NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(ReportBody) 27 28 explicit ReportBody(nsIGlobalObject* aGlobal); 29 30 nsIGlobalObject* GetParentObject() const { return mGlobal; } 31 32 virtual void ToJSON(JSONWriter& aJSONWriter) const = 0; 33 34 protected: 35 virtual ~ReportBody(); 36 37 nsCOMPtr<nsIGlobalObject> mGlobal; 38 }; 39 40 } // namespace dom 41 } // namespace mozilla 42 43 #endif // mozilla_dom_ReportBody_h