tor-browser

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

xpcAccessibleApplication.h (1504B)


      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() { return mIntl->AsLocal()->AsApplication(); }
     39 
     40  xpcAccessibleApplication(const xpcAccessibleApplication&) = delete;
     41  xpcAccessibleApplication& operator=(const xpcAccessibleApplication&) = delete;
     42 };
     43 
     44 }  // namespace a11y
     45 }  // namespace mozilla
     46 
     47 #endif