Source code

Revision control

Other Tools

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
public:
23
explicit xpcAccessibleApplication(Accessible* aIntl)
24
: xpcAccessibleGeneric(aIntl) {}
25
26
NS_DECL_ISUPPORTS_INHERITED
27
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;
33
34
protected:
35
virtual ~xpcAccessibleApplication() { Shutdown(); }
36
37
private:
38
ApplicationAccessible* Intl() {
39
return mIntl.AsAccessible()->AsApplication();
40
}
41
42
xpcAccessibleApplication(const xpcAccessibleApplication&) = delete;
43
xpcAccessibleApplication& operator=(const xpcAccessibleApplication&) = delete;
44
};
45
46
} // namespace a11y
47
} // namespace mozilla
48
49
#endif