Bug 1890277: part 2) Add `require-trusted-types-for` directive to CSP parser, guarded...
[gecko.git] / accessible / xpcom / xpcAccessibleApplication.cpp
blob133c25577881cfad247f0405c3d55ca04c282da3
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=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 file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "xpcAccessibleApplication.h"
9 #include "ApplicationAccessible.h"
11 using namespace mozilla::a11y;
13 ////////////////////////////////////////////////////////////////////////////////
14 // nsISupports
16 NS_IMPL_ISUPPORTS_INHERITED(xpcAccessibleApplication, xpcAccessibleGeneric,
17 nsIAccessibleApplication)
19 ////////////////////////////////////////////////////////////////////////////////
20 // nsIAccessibleApplication
22 NS_IMETHODIMP
23 xpcAccessibleApplication::GetAppName(nsAString& aName) {
24 aName.Truncate();
26 if (!Intl()) return NS_ERROR_FAILURE;
28 Intl()->AppName(aName);
29 return NS_OK;
32 NS_IMETHODIMP
33 xpcAccessibleApplication::GetAppVersion(nsAString& aVersion) {
34 aVersion.Truncate();
36 if (!Intl()) return NS_ERROR_FAILURE;
38 Intl()->AppVersion(aVersion);
39 return NS_OK;
42 NS_IMETHODIMP
43 xpcAccessibleApplication::GetPlatformName(nsAString& aName) {
44 aName.Truncate();
46 if (!Intl()) return NS_ERROR_FAILURE;
48 Intl()->PlatformName(aName);
49 return NS_OK;
52 NS_IMETHODIMP
53 xpcAccessibleApplication::GetPlatformVersion(nsAString& aVersion) {
54 aVersion.Truncate();
56 if (!Intl()) return NS_ERROR_FAILURE;
58 Intl()->PlatformVersion(aVersion);
59 return NS_OK;