/work/obj-fuzz/dist/include/mozilla/dom/IntlUtils.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 | | #ifndef mozilla_dom_IntlUtils_h |
7 | | #define mozilla_dom_IntlUtils_h |
8 | | |
9 | | #include "mozilla/dom/IntlUtilsBinding.h" |
10 | | #include "nsWrapperCache.h" |
11 | | #include "xpcprivate.h" |
12 | | |
13 | | class nsPIDOMWindowInner; |
14 | | |
15 | | namespace mozilla { |
16 | | namespace dom { |
17 | | |
18 | | #ifdef XP_WIN |
19 | | #undef GetLocaleInfo |
20 | | #endif |
21 | | |
22 | | class IntlUtils final : public nsISupports |
23 | | , public nsWrapperCache |
24 | | { |
25 | | public: |
26 | | explicit IntlUtils(nsPIDOMWindowInner* aWindow); |
27 | | |
28 | | NS_DECL_CYCLE_COLLECTING_ISUPPORTS |
29 | | NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(IntlUtils) |
30 | | |
31 | | nsPIDOMWindowInner* GetParentObject() const |
32 | 0 | { |
33 | 0 | return mWindow; |
34 | 0 | } |
35 | | |
36 | | JSObject* |
37 | | WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override; |
38 | | |
39 | | void |
40 | | GetDisplayNames(const Sequence<nsString>& aLocales, |
41 | | const mozilla::dom::DisplayNameOptions& aOptions, |
42 | | mozilla::dom::DisplayNameResult& aResult, |
43 | | mozilla::ErrorResult& aError); |
44 | | |
45 | | void |
46 | | GetLocaleInfo(const Sequence<nsString>& aLocales, |
47 | | mozilla::dom::LocaleInfo& aResult, |
48 | | mozilla::ErrorResult& aError); |
49 | | |
50 | | private: |
51 | | ~IntlUtils(); |
52 | | |
53 | | nsCOMPtr<nsPIDOMWindowInner> mWindow; |
54 | | }; |
55 | | |
56 | | } // namespace dom |
57 | | } // namespace mozilla |
58 | | #endif |