no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / dom / reporting / ReportBody.h
blob9043dba16d1dd681f4cf47b047e3cc7fd7d64a51
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/. */
7 #ifndef mozilla_dom_ReportBody_h
8 #define mozilla_dom_ReportBody_h
10 #include "mozilla/Assertions.h"
11 #include "nsCOMPtr.h"
12 #include "nsCycleCollectionParticipant.h"
13 #include "nsISupports.h"
14 #include "nsWrapperCache.h"
16 class nsIGlobalObject;
18 namespace mozilla {
20 class JSONWriter;
22 namespace dom {
24 class ReportBody : public nsISupports, public nsWrapperCache {
25 public:
26 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
27 NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(ReportBody)
29 explicit ReportBody(nsIGlobalObject* aGlobal);
31 nsIGlobalObject* GetParentObject() const { return mGlobal; }
33 virtual void ToJSON(JSONWriter& aJSONWriter) const = 0;
35 protected:
36 virtual ~ReportBody();
38 nsCOMPtr<nsIGlobalObject> mGlobal;
41 } // namespace dom
42 } // namespace mozilla
44 #endif // mozilla_dom_ReportBody_h