xpcAccessibleApplication.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #ifndef mozilla_a11y_xpcAccessibleApplication_h_
  6. #define mozilla_a11y_xpcAccessibleApplication_h_
  7. #include "nsIAccessibleApplication.h"
  8. #include "ApplicationAccessible.h"
  9. #include "xpcAccessibleGeneric.h"
  10. namespace mozilla {
  11. namespace a11y {
  12. /**
  13. * XPCOM wrapper around ApplicationAccessible class.
  14. */
  15. class xpcAccessibleApplication : public xpcAccessibleGeneric,
  16. public nsIAccessibleApplication
  17. {
  18. public:
  19. explicit xpcAccessibleApplication(Accessible* aIntl) :
  20. xpcAccessibleGeneric(aIntl) { }
  21. NS_DECL_ISUPPORTS_INHERITED
  22. // nsIAccessibleApplication
  23. NS_IMETHOD GetAppName(nsAString& aName) final override;
  24. NS_IMETHOD GetAppVersion(nsAString& aVersion) final override;
  25. NS_IMETHOD GetPlatformName(nsAString& aName) final override;
  26. NS_IMETHOD GetPlatformVersion(nsAString& aVersion) final override;
  27. protected:
  28. virtual ~xpcAccessibleApplication() {}
  29. private:
  30. ApplicationAccessible* Intl() { return mIntl.AsAccessible()->AsApplication(); }
  31. xpcAccessibleApplication(const xpcAccessibleApplication&) = delete;
  32. xpcAccessibleApplication& operator =(const xpcAccessibleApplication&) = delete;
  33. };
  34. } // namespace a11y
  35. } // namespace mozilla
  36. #endif