/work/obj-fuzz/dist/include/mozilla/dom/FontTableURIProtocolHandler.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 FontTableURIProtocolHandler_h |
8 | | #define FontTableURIProtocolHandler_h |
9 | | |
10 | | #include "nsIProtocolHandler.h" |
11 | | #include "nsIURI.h" |
12 | | #include "nsWeakReference.h" |
13 | | |
14 | | #define FONTTABLEURI_SCHEME "moz-fonttable" |
15 | | |
16 | | namespace mozilla { |
17 | | namespace dom { |
18 | | |
19 | | class FontTableURIProtocolHandler final : public nsIProtocolHandler |
20 | | , public nsIProtocolHandlerWithDynamicFlags |
21 | | , public nsSupportsWeakReference |
22 | | { |
23 | | public: |
24 | | NS_DECL_ISUPPORTS |
25 | | NS_DECL_NSIPROTOCOLHANDLER |
26 | | NS_DECL_NSIPROTOCOLHANDLERWITHDYNAMICFLAGS |
27 | | |
28 | | FontTableURIProtocolHandler(); |
29 | | |
30 | | static nsresult GenerateURIString(nsACString &aUri); |
31 | | |
32 | | protected: |
33 | | virtual ~FontTableURIProtocolHandler(); |
34 | | }; |
35 | | |
36 | | inline bool IsFontTableURI(nsIURI* aUri) |
37 | 0 | { |
38 | 0 | bool isFont; |
39 | 0 | return NS_SUCCEEDED(aUri->SchemeIs(FONTTABLEURI_SCHEME, &isFont)) && isFont; |
40 | 0 | } |
41 | | |
42 | | } // namespace dom |
43 | | } // namespace mozilla |
44 | | |
45 | | #endif /* FontTableURIProtocolHandler_h */ |