Bug 1885602 - Part 5: Implement navigating to the SUMO help topic from the menu heade...
[gecko.git] / dom / reporting / TestingDeprecatedInterface.h
blob7056a91ed7af16234a89c8483597f1146b40f451
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_TestingDeprecatedInterface_h
8 #define mozilla_dom_TestingDeprecatedInterface_h
10 #include "js/TypeDecls.h"
11 #include "mozilla/AlreadyAddRefed.h"
12 #include "mozilla/Assertions.h"
13 #include "nsCOMPtr.h"
14 #include "nsCycleCollectionParticipant.h"
15 #include "nsISupports.h"
16 #include "nsWrapperCache.h"
18 class nsIGlobalObject;
20 namespace mozilla::dom {
21 class GlobalObject;
23 class TestingDeprecatedInterface final : public nsISupports,
24 public nsWrapperCache {
25 public:
26 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
27 NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(TestingDeprecatedInterface)
29 static already_AddRefed<TestingDeprecatedInterface> Constructor(
30 const GlobalObject& aGlobal);
32 JSObject* WrapObject(JSContext* aCx,
33 JS::Handle<JSObject*> aGivenProto) override;
35 nsIGlobalObject* GetParentObject() const { return mGlobal; }
37 void DeprecatedMethod() const;
39 bool DeprecatedAttribute() const;
41 private:
42 explicit TestingDeprecatedInterface(nsIGlobalObject* aGlobal);
43 ~TestingDeprecatedInterface();
45 nsCOMPtr<nsIGlobalObject> mGlobal;
48 } // namespace mozilla::dom
50 #endif // mozilla_dom_TestingDeprecatedInterface_h