Bug 1472338: part 2) Change `clipboard.readText()` to read from the clipboard asynchr...
[gecko.git] / dom / reporting / TestingDeprecatedInterface.h
blob224063fbf512957c18381c5392288e611ac3ee8b
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 {
21 namespace dom {
22 class GlobalObject;
24 class TestingDeprecatedInterface final : public nsISupports,
25 public nsWrapperCache {
26 public:
27 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
28 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(TestingDeprecatedInterface)
30 static already_AddRefed<TestingDeprecatedInterface> Constructor(
31 const GlobalObject& aGlobal);
33 JSObject* WrapObject(JSContext* aCx,
34 JS::Handle<JSObject*> aGivenProto) override;
36 nsIGlobalObject* GetParentObject() const { return mGlobal; }
38 void DeprecatedMethod() const;
40 bool DeprecatedAttribute() const;
42 private:
43 explicit TestingDeprecatedInterface(nsIGlobalObject* aGlobal);
44 ~TestingDeprecatedInterface();
46 nsCOMPtr<nsIGlobalObject> mGlobal;
49 } // namespace dom
50 } // namespace mozilla
52 #endif // mozilla_dom_TestingDeprecatedInterface_h