/work/obj-fuzz/dist/include/mozilla/AddonManagerStartup.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 | | /* This Source Code Form is subject to the terms of the Mozilla Public |
3 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
4 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
5 | | |
6 | | #ifndef AddonManagerStartup_h |
7 | | #define AddonManagerStartup_h |
8 | | |
9 | | #include "amIAddonManagerStartup.h" |
10 | | #include "mozilla/Result.h" |
11 | | #include "nsCOMArray.h" |
12 | | #include "nsCOMPtr.h" |
13 | | #include "nsIFile.h" |
14 | | #include "nsIObserver.h" |
15 | | #include "nsISupports.h" |
16 | | |
17 | | #include "jsapi.h" |
18 | | |
19 | | namespace mozilla { |
20 | | |
21 | | class Addon; |
22 | | |
23 | | class AddonManagerStartup final : public amIAddonManagerStartup |
24 | | , public nsIObserver |
25 | | { |
26 | | public: |
27 | | NS_DECL_ISUPPORTS |
28 | | NS_DECL_AMIADDONMANAGERSTARTUP |
29 | | NS_DECL_NSIOBSERVER |
30 | | |
31 | | AddonManagerStartup(); |
32 | | |
33 | | static AddonManagerStartup& GetSingleton(); |
34 | | |
35 | | static already_AddRefed<AddonManagerStartup> GetInstance() |
36 | 0 | { |
37 | 0 | RefPtr<AddonManagerStartup> inst = &GetSingleton(); |
38 | 0 | return inst.forget(); |
39 | 0 | } |
40 | | |
41 | | private: |
42 | | nsIFile* ProfileDir(); |
43 | | |
44 | | nsCOMPtr<nsIFile> mProfileDir; |
45 | | |
46 | | protected: |
47 | | virtual ~AddonManagerStartup() = default; |
48 | | }; |
49 | | |
50 | | } // namespace mozilla |
51 | | |
52 | | #define NS_ADDONMANAGERSTARTUP_CONTRACTID \ |
53 | | "@mozilla.org/addons/addon-manager-startup;1" |
54 | | |
55 | | // {17a59a6b-92b8-42e5-bce0-ab434c7a7135 |
56 | | #define NS_ADDON_MANAGER_STARTUP_CID \ |
57 | | { 0x17a59a6b, 0x92b8, 0x42e5, \ |
58 | | { 0xbc, 0xe0, 0xab, 0x43, 0x4c, 0x7a, 0x71, 0x35 } } |
59 | | |
60 | | #endif // AddonManagerStartup_h |