2003-04-02 00:02:51 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* 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/. */
|
2003-04-02 00:02:51 +04:00
|
|
|
|
2012-05-04 10:09:22 +04:00
|
|
|
#ifndef mozilla_a11y_RootAccessibleWrap_h__
|
|
|
|
#define mozilla_a11y_RootAccessibleWrap_h__
|
2003-04-02 00:02:51 +04:00
|
|
|
|
2017-06-20 05:57:35 +03:00
|
|
|
#include "mozilla/mscom/Aggregation.h"
|
2012-05-04 10:09:22 +04:00
|
|
|
#include "RootAccessible.h"
|
2003-04-02 00:02:51 +04:00
|
|
|
|
2012-05-04 10:09:22 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace a11y {
|
|
|
|
|
|
|
|
class RootAccessibleWrap : public RootAccessible
|
2011-03-02 17:41:42 +03:00
|
|
|
{
|
|
|
|
public:
|
2016-03-02 17:39:06 +03:00
|
|
|
RootAccessibleWrap(nsIDocument* aDocument, nsIPresShell* aPresShell);
|
2012-05-04 10:09:22 +04:00
|
|
|
virtual ~RootAccessibleWrap();
|
2011-03-02 17:41:42 +03:00
|
|
|
|
2012-05-04 10:09:22 +04:00
|
|
|
// RootAccessible
|
2012-05-27 13:01:40 +04:00
|
|
|
virtual void DocumentActivated(DocAccessible* aDocument);
|
2017-06-20 05:57:35 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This method enables a RootAccessibleWrap to be wrapped by a
|
|
|
|
* LazyInstantiator.
|
|
|
|
*
|
|
|
|
* @param aOuter The IUnknown of the object that is wrapping this
|
|
|
|
* RootAccessibleWrap, or nullptr to unwrap the aOuter from
|
|
|
|
* a previous call.
|
|
|
|
* @return This objects own IUnknown (as opposed to aOuter's IUnknown).
|
|
|
|
*/
|
|
|
|
already_AddRefed<IUnknown> Aggregate(IUnknown* aOuter);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return This object's own IUnknown, as opposed to its wrapper's IUnknown
|
|
|
|
* which is what would be returned by QueryInterface(IID_IUnknown).
|
|
|
|
*/
|
|
|
|
already_AddRefed<IUnknown> GetInternalUnknown();
|
|
|
|
|
|
|
|
private:
|
|
|
|
// DECLARE_AGGREGATABLE declares the internal IUnknown methods as well as
|
|
|
|
// mInternalUnknown.
|
|
|
|
DECLARE_AGGREGATABLE(RootAccessibleWrap);
|
|
|
|
IUnknown* mOuter;
|
2011-03-02 17:41:42 +03:00
|
|
|
};
|
2003-04-02 00:02:51 +04:00
|
|
|
|
2012-05-04 10:09:22 +04:00
|
|
|
} // namespace a11y
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2003-04-02 00:02:51 +04:00
|
|
|
#endif
|