diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /accessible/windows/msaa/HTMLWin32ObjectAccessible.h | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'accessible/windows/msaa/HTMLWin32ObjectAccessible.h')
-rw-r--r-- | accessible/windows/msaa/HTMLWin32ObjectAccessible.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/accessible/windows/msaa/HTMLWin32ObjectAccessible.h b/accessible/windows/msaa/HTMLWin32ObjectAccessible.h new file mode 100644 index 000000000..786d52191 --- /dev/null +++ b/accessible/windows/msaa/HTMLWin32ObjectAccessible.h @@ -0,0 +1,70 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* 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_HTMLWin32ObjectAccessible_h_ +#define mozilla_a11y_HTMLWin32ObjectAccessible_h_ + +#include "BaseAccessibles.h" + +#if defined(MOZ_CONTENT_SANDBOX) +#include "mozilla/mscom/Ptr.h" +#endif + +struct IAccessible; + +namespace mozilla { +namespace a11y { + +class HTMLWin32ObjectOwnerAccessible : public AccessibleWrap +{ +public: + // This will own the HTMLWin32ObjectAccessible. We create this where the + // <object> or <embed> exists in the tree, so that get_accNextSibling() etc. + // will still point to Gecko accessible sibling content. This is necessary + // because the native plugin accessible doesn't know where it exists in the + // Mozilla tree, and returns null for previous and next sibling. This would + // have the effect of cutting off all content after the plugin. + HTMLWin32ObjectOwnerAccessible(nsIContent* aContent, + DocAccessible* aDoc, void* aHwnd); + virtual ~HTMLWin32ObjectOwnerAccessible() {} + + // Accessible + virtual void Shutdown(); + virtual mozilla::a11y::role NativeRole(); + virtual bool NativelyUnavailable() const; + +protected: + void* mHwnd; + RefPtr<Accessible> mNativeAccessible; +}; + +/** + * This class is used only internally, we never! send out an IAccessible linked + * back to this object. This class is used to represent a plugin object when + * referenced as a child or sibling of another Accessible node. We need only + * a limited portion of the Accessible interface implemented here. The + * in depth accessible information will be returned by the actual IAccessible + * object returned by us in Accessible::NewAccessible() that gets the IAccessible + * from the windows system from the window handle. + */ +class HTMLWin32ObjectAccessible : public DummyAccessible +{ +public: + HTMLWin32ObjectAccessible(void* aHwnd, DocAccessible* aDoc); + virtual ~HTMLWin32ObjectAccessible() {} + + virtual void GetNativeInterface(void** aNativeAccessible) override; + +protected: + void* mHwnd; +#if defined(MOZ_CONTENT_SANDBOX) + mscom::ProxyUniquePtr<IAccessible> mCOMProxy; +#endif +}; + +} // namespace a11y +} // namespace mozilla + +#endif |