2014-03-07 13:35:19 -08:00
|
|
|
/* -*- 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_DocAccessibleChild_h
|
|
|
|
#define mozilla_a11y_DocAccessibleChild_h
|
|
|
|
|
|
|
|
#include "mozilla/a11y/DocAccessible.h"
|
|
|
|
#include "mozilla/a11y/PDocAccessibleChild.h"
|
|
|
|
#include "nsISupportsImpl.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace a11y {
|
|
|
|
class AccShowEvent;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* These objects handle content side communication for an accessible document,
|
|
|
|
* and their lifetime is the same as the document they represent.
|
|
|
|
*/
|
|
|
|
class DocAccessibleChild : public PDocAccessibleChild
|
|
|
|
{
|
|
|
|
public:
|
2014-10-10 14:28:35 -07:00
|
|
|
explicit DocAccessibleChild(DocAccessible* aDoc) :
|
2014-03-07 13:35:19 -08:00
|
|
|
mDoc(aDoc)
|
|
|
|
{ MOZ_COUNT_CTOR(DocAccessibleChild); }
|
|
|
|
~DocAccessibleChild()
|
|
|
|
{
|
|
|
|
mDoc->SetIPCDoc(nullptr);
|
|
|
|
MOZ_COUNT_DTOR(DocAccessibleChild);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ShowEvent(AccShowEvent* aShowEvent);
|
|
|
|
|
2014-09-23 01:35:33 -07:00
|
|
|
/*
|
|
|
|
* Return the state for the accessible with given ID.
|
|
|
|
*/
|
|
|
|
virtual bool RecvState(const uint64_t& aID, uint64_t* aState) MOZ_OVERRIDE;
|
|
|
|
|
2014-09-23 02:53:03 -07:00
|
|
|
/*
|
|
|
|
* Get the name for the accessible with given id.
|
|
|
|
*/
|
|
|
|
virtual bool RecvName(const uint64_t& aID, nsString* aName) MOZ_OVERRIDE;
|
|
|
|
|
2014-03-07 13:35:19 -08:00
|
|
|
private:
|
|
|
|
DocAccessible* mDoc;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|