/work/obj-fuzz/dist/include/mozilla/dom/Credential.h
Line | Count | Source (jump to first uncovered line) |
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_Credential_h |
8 | | #define mozilla_dom_Credential_h |
9 | | |
10 | | #include "mozilla/dom/CredentialManagementBinding.h" |
11 | | #include "nsCycleCollectionParticipant.h" |
12 | | #include "nsPIDOMWindow.h" |
13 | | #include "nsWrapperCache.h" |
14 | | |
15 | | namespace mozilla { |
16 | | namespace dom { |
17 | | |
18 | | class Credential : public nsISupports |
19 | | , public nsWrapperCache |
20 | | { |
21 | | public: |
22 | | NS_DECL_CYCLE_COLLECTING_ISUPPORTS |
23 | | NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Credential) |
24 | | |
25 | | public: |
26 | | explicit Credential(nsPIDOMWindowInner* aParent); |
27 | | |
28 | | protected: |
29 | | virtual ~Credential(); |
30 | | |
31 | | public: |
32 | | nsISupports* |
33 | | GetParentObject() const |
34 | 0 | { |
35 | 0 | return mParent; |
36 | 0 | } |
37 | | |
38 | | JSObject* |
39 | | WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override; |
40 | | |
41 | | void |
42 | | GetId(nsAString& aId) const; |
43 | | |
44 | | void |
45 | | GetType(nsAString& aType) const; |
46 | | |
47 | | void |
48 | | SetId(const nsAString& aId); |
49 | | |
50 | | void |
51 | | SetType(const nsAString& aType); |
52 | | |
53 | | private: |
54 | | nsCOMPtr<nsPIDOMWindowInner> mParent; |
55 | | nsAutoString mId; |
56 | | nsAutoString mType; |
57 | | }; |
58 | | |
59 | | } // namespace dom |
60 | | } // namespace mozilla |
61 | | |
62 | | #endif // mozilla_dom_Credential_h |