michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_a11y_HTMLWin32ObjectAccessible_h_ michael@0: #define mozilla_a11y_HTMLWin32ObjectAccessible_h_ michael@0: michael@0: #include "BaseAccessibles.h" michael@0: michael@0: struct IAccessible; michael@0: michael@0: namespace mozilla { michael@0: namespace a11y { michael@0: michael@0: class HTMLWin32ObjectOwnerAccessible : public AccessibleWrap michael@0: { michael@0: public: michael@0: // This will own the HTMLWin32ObjectAccessible. We create this where the michael@0: // or exists in the tree, so that get_accNextSibling() etc. michael@0: // will still point to Gecko accessible sibling content. This is necessary michael@0: // because the native plugin accessible doesn't know where it exists in the michael@0: // Mozilla tree, and returns null for previous and next sibling. This would michael@0: // have the effect of cutting off all content after the plugin. michael@0: HTMLWin32ObjectOwnerAccessible(nsIContent* aContent, michael@0: DocAccessible* aDoc, void* aHwnd); michael@0: virtual ~HTMLWin32ObjectOwnerAccessible() {} michael@0: michael@0: // Accessible michael@0: virtual void Shutdown(); michael@0: virtual mozilla::a11y::role NativeRole(); michael@0: virtual bool NativelyUnavailable() const; michael@0: michael@0: protected: michael@0: michael@0: // Accessible michael@0: virtual void CacheChildren(); michael@0: michael@0: void* mHwnd; michael@0: nsRefPtr mNativeAccessible; michael@0: }; michael@0: michael@0: /** michael@0: * This class is used only internally, we never! send out an IAccessible linked michael@0: * back to this object. This class is used to represent a plugin object when michael@0: * referenced as a child or sibling of another Accessible node. We need only michael@0: * a limited portion of the nsIAccessible interface implemented here. The michael@0: * in depth accessible information will be returned by the actual IAccessible michael@0: * object returned by us in Accessible::NewAccessible() that gets the IAccessible michael@0: * from the windows system from the window handle. michael@0: */ michael@0: class HTMLWin32ObjectAccessible : public DummyAccessible michael@0: { michael@0: public: michael@0: HTMLWin32ObjectAccessible(void* aHwnd); michael@0: virtual ~HTMLWin32ObjectAccessible() {} michael@0: michael@0: NS_IMETHOD GetNativeInterface(void** aNativeAccessible) MOZ_OVERRIDE; michael@0: michael@0: protected: michael@0: void* mHwnd; michael@0: }; michael@0: michael@0: } // namespace a11y michael@0: } // namespace mozilla michael@0: michael@0: #endif