/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "ApplicationAccessibleWrap.h"

#include "AccAttributes.h"
#include "MsaaAccessible.h"
#include "mozilla/Components.h"
#include "nsIGfxInfo.h"
#include "nsServiceManagerUtils.h"

using namespace mozilla;
using namespace mozilla::a11y;

////////////////////////////////////////////////////////////////////////////////
// nsISupports
NS_IMPL_ISUPPORTS_INHERITED0(ApplicationAccessibleWrap, ApplicationAccessible)

already_AddRefed<AccAttributes> ApplicationAccessibleWrap::NativeAttributes() {
  auto attributes = MakeRefPtr<AccAttributes>();
  return attributes.forget();
}

void ApplicationAccessibleWrap::Shutdown() {
  // ApplicationAccessible::Shutdown doesn't call AccessibleWrap::Shutdown, so
  // we have to call MsaaShutdown here.
  if (mMsaa) {
    mMsaa->MsaaShutdown();
  }
  ApplicationAccessible::Shutdown();
}
