xpcAccessibleApplication.cpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. #include "xpcAccessibleApplication.h"
  6. #include "ApplicationAccessible.h"
  7. using namespace mozilla::a11y;
  8. ////////////////////////////////////////////////////////////////////////////////
  9. // nsISupports
  10. NS_IMPL_ISUPPORTS_INHERITED(xpcAccessibleApplication,
  11. xpcAccessibleGeneric,
  12. nsIAccessibleApplication)
  13. ////////////////////////////////////////////////////////////////////////////////
  14. // nsIAccessibleApplication
  15. NS_IMETHODIMP
  16. xpcAccessibleApplication::GetAppName(nsAString& aName)
  17. {
  18. aName.Truncate();
  19. if (!Intl())
  20. return NS_ERROR_FAILURE;
  21. Intl()->AppName(aName);
  22. return NS_OK;
  23. }
  24. NS_IMETHODIMP
  25. xpcAccessibleApplication::GetAppVersion(nsAString& aVersion)
  26. {
  27. aVersion.Truncate();
  28. if (!Intl())
  29. return NS_ERROR_FAILURE;
  30. Intl()->AppVersion(aVersion);
  31. return NS_OK;
  32. }
  33. NS_IMETHODIMP
  34. xpcAccessibleApplication::GetPlatformName(nsAString& aName)
  35. {
  36. aName.Truncate();
  37. if (!Intl())
  38. return NS_ERROR_FAILURE;
  39. Intl()->PlatformName(aName);
  40. return NS_OK;
  41. }
  42. NS_IMETHODIMP
  43. xpcAccessibleApplication::GetPlatformVersion(nsAString& aVersion)
  44. {
  45. aVersion.Truncate();
  46. if (!Intl())
  47. return NS_ERROR_FAILURE;
  48. Intl()->PlatformVersion(aVersion);
  49. return NS_OK;
  50. }