accessible/windows/msaa/GeckoCustom.h
author Sebastian Hengst <archaeopteryx@coole-files.de>
Fri, 27 Oct 2017 12:45:34 +0300
changeset 441908 ecef003d836730c07ecfcfa25df8e71a88aec99f
parent 389794 f106e5720eb2ad98b9421f46cbd5a282a2c8d0f0
child 471726 d7dd8b0d2473d38abcc425e583c377eac734d14c
permissions -rw-r--r--
merge mozilla-inbound to mozilla-central. r=merge a=merge

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* 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/. */

#ifndef mozilla_a11y_GeckoCustom_h_
#define mozilla_a11y_GeckoCustom_h_

#include "AccessibleWrap.h"
#include "IUnknownImpl.h"
#include "IGeckoCustom.h"

namespace mozilla {
namespace a11y {

/**
 * a dumpster to put things exposed by the xpcom API but not a windows platform
 * API for the purposes of testing.
 */
class GeckoCustom final : public IGeckoCustom
{
public:
  explicit GeckoCustom(AccessibleWrap* aAcc) : mAcc(aAcc) {}

  // IUnknown
  DECL_IUNKNOWN

  virtual STDMETHODIMP get_anchorCount(long* aCount);
  virtual STDMETHODIMP get_DOMNodeID(BSTR* aID);
  virtual STDMETHODIMP get_ID(uint64_t* aID);
  virtual STDMETHODIMP get_minimumIncrement(double* aIncrement);
  virtual STDMETHODIMP get_mozState(uint64_t* aState);

private:
  GeckoCustom() = delete;
  GeckoCustom& operator =(const GeckoCustom&) = delete;
  GeckoCustom(const GeckoCustom&) = delete;
  GeckoCustom(GeckoCustom&&) = delete;
  GeckoCustom& operator=(GeckoCustom&&) = delete;

  ~GeckoCustom() { }

protected:
  RefPtr<AccessibleWrap> mAcc;
};

} // a11y namespace
} // mozilla namespace

#endif