tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

xpcAccessibleApplication.cpp (1527B)


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