|
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
|
2 /* vim:set expandtab ts=4 sw=4 sts=4 cin: */ |
|
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 AppProtocolHandler_ |
|
8 #define AppProtocolHandler_ |
|
9 |
|
10 #include "nsIProtocolHandler.h" |
|
11 #include "nsClassHashtable.h" |
|
12 #include "mozilla/dom/AppInfoBinding.h" |
|
13 |
|
14 class AppProtocolHandler : public nsIProtocolHandler |
|
15 { |
|
16 public: |
|
17 NS_DECL_ISUPPORTS |
|
18 |
|
19 // nsIProtocolHandler methods: |
|
20 NS_DECL_NSIPROTOCOLHANDLER |
|
21 |
|
22 // AppProtocolHandler methods: |
|
23 AppProtocolHandler(); |
|
24 virtual ~AppProtocolHandler(); |
|
25 |
|
26 // Define a Create method to be used with a factory: |
|
27 static nsresult Create(nsISupports* aOuter, |
|
28 const nsIID& aIID, |
|
29 void* *aResult); |
|
30 |
|
31 private: |
|
32 nsClassHashtable<nsCStringHashKey, mozilla::dom::AppInfo> mAppInfoCache; |
|
33 }; |
|
34 |
|
35 #endif /* AppProtocolHandler_ */ |