Line data Source code
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/. */
6 :
7 : #ifndef mozilla_a11y_xpcAccessibleApplication_h_
8 : #define mozilla_a11y_xpcAccessibleApplication_h_
9 :
10 : #include "nsIAccessibleApplication.h"
11 : #include "ApplicationAccessible.h"
12 : #include "xpcAccessibleGeneric.h"
13 :
14 : namespace mozilla {
15 : namespace a11y {
16 :
17 : /**
18 : * XPCOM wrapper around ApplicationAccessible class.
19 : */
20 : class xpcAccessibleApplication : public xpcAccessibleGeneric,
21 : public nsIAccessibleApplication
22 : {
23 : public:
24 0 : explicit xpcAccessibleApplication(Accessible* aIntl) :
25 0 : xpcAccessibleGeneric(aIntl) { }
26 :
27 : NS_DECL_ISUPPORTS_INHERITED
28 :
29 : // nsIAccessibleApplication
30 : NS_IMETHOD GetAppName(nsAString& aName) final override;
31 : NS_IMETHOD GetAppVersion(nsAString& aVersion) final override;
32 : NS_IMETHOD GetPlatformName(nsAString& aName) final override;
33 : NS_IMETHOD GetPlatformVersion(nsAString& aVersion) final override;
34 :
35 : protected:
36 0 : virtual ~xpcAccessibleApplication()
37 0 : {
38 0 : Shutdown();
39 0 : }
40 :
41 : private:
42 0 : ApplicationAccessible* Intl() { return mIntl.AsAccessible()->AsApplication(); }
43 :
44 : xpcAccessibleApplication(const xpcAccessibleApplication&) = delete;
45 : xpcAccessibleApplication& operator =(const xpcAccessibleApplication&) = delete;
46 : };
47 :
48 : } // namespace a11y
49 : } // namespace mozilla
50 :
51 : #endif
|