Bug 1890277: part 2) Add `require-trusted-types-for` directive to CSP parser, guarded...
[gecko.git] / accessible / xpcom / xpcAccessibleApplication.h
blob432d0a07bb864be80aa118aeac1c3f6ccb6790a3
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 #ifndef mozilla_a11y_xpcAccessibleApplication_h_
8 #define mozilla_a11y_xpcAccessibleApplication_h_
10 #include "nsIAccessibleApplication.h"
11 #include "ApplicationAccessible.h"
12 #include "xpcAccessibleGeneric.h"
14 namespace mozilla {
15 namespace a11y {
17 /**
18 * XPCOM wrapper around ApplicationAccessible class.
20 class xpcAccessibleApplication : public xpcAccessibleGeneric,
21 public nsIAccessibleApplication {
22 public:
23 explicit xpcAccessibleApplication(Accessible* aIntl)
24 : xpcAccessibleGeneric(aIntl) {}
26 NS_DECL_ISUPPORTS_INHERITED
28 // nsIAccessibleApplication
29 NS_IMETHOD GetAppName(nsAString& aName) final;
30 NS_IMETHOD GetAppVersion(nsAString& aVersion) final;
31 NS_IMETHOD GetPlatformName(nsAString& aName) final;
32 NS_IMETHOD GetPlatformVersion(nsAString& aVersion) final;
34 protected:
35 virtual ~xpcAccessibleApplication() { Shutdown(); }
37 private:
38 ApplicationAccessible* Intl() { return mIntl->AsLocal()->AsApplication(); }
40 xpcAccessibleApplication(const xpcAccessibleApplication&) = delete;
41 xpcAccessibleApplication& operator=(const xpcAccessibleApplication&) = delete;
44 } // namespace a11y
45 } // namespace mozilla
47 #endif