accessible/src/windows/msaa/HTMLWin32ObjectAccessible.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #ifndef mozilla_a11y_HTMLWin32ObjectAccessible_h_
michael@0 7 #define mozilla_a11y_HTMLWin32ObjectAccessible_h_
michael@0 8
michael@0 9 #include "BaseAccessibles.h"
michael@0 10
michael@0 11 struct IAccessible;
michael@0 12
michael@0 13 namespace mozilla {
michael@0 14 namespace a11y {
michael@0 15
michael@0 16 class HTMLWin32ObjectOwnerAccessible : public AccessibleWrap
michael@0 17 {
michael@0 18 public:
michael@0 19 // This will own the HTMLWin32ObjectAccessible. We create this where the
michael@0 20 // <object> or <embed> exists in the tree, so that get_accNextSibling() etc.
michael@0 21 // will still point to Gecko accessible sibling content. This is necessary
michael@0 22 // because the native plugin accessible doesn't know where it exists in the
michael@0 23 // Mozilla tree, and returns null for previous and next sibling. This would
michael@0 24 // have the effect of cutting off all content after the plugin.
michael@0 25 HTMLWin32ObjectOwnerAccessible(nsIContent* aContent,
michael@0 26 DocAccessible* aDoc, void* aHwnd);
michael@0 27 virtual ~HTMLWin32ObjectOwnerAccessible() {}
michael@0 28
michael@0 29 // Accessible
michael@0 30 virtual void Shutdown();
michael@0 31 virtual mozilla::a11y::role NativeRole();
michael@0 32 virtual bool NativelyUnavailable() const;
michael@0 33
michael@0 34 protected:
michael@0 35
michael@0 36 // Accessible
michael@0 37 virtual void CacheChildren();
michael@0 38
michael@0 39 void* mHwnd;
michael@0 40 nsRefPtr<Accessible> mNativeAccessible;
michael@0 41 };
michael@0 42
michael@0 43 /**
michael@0 44 * This class is used only internally, we never! send out an IAccessible linked
michael@0 45 * back to this object. This class is used to represent a plugin object when
michael@0 46 * referenced as a child or sibling of another Accessible node. We need only
michael@0 47 * a limited portion of the nsIAccessible interface implemented here. The
michael@0 48 * in depth accessible information will be returned by the actual IAccessible
michael@0 49 * object returned by us in Accessible::NewAccessible() that gets the IAccessible
michael@0 50 * from the windows system from the window handle.
michael@0 51 */
michael@0 52 class HTMLWin32ObjectAccessible : public DummyAccessible
michael@0 53 {
michael@0 54 public:
michael@0 55 HTMLWin32ObjectAccessible(void* aHwnd);
michael@0 56 virtual ~HTMLWin32ObjectAccessible() {}
michael@0 57
michael@0 58 NS_IMETHOD GetNativeInterface(void** aNativeAccessible) MOZ_OVERRIDE;
michael@0 59
michael@0 60 protected:
michael@0 61 void* mHwnd;
michael@0 62 };
michael@0 63
michael@0 64 } // namespace a11y
michael@0 65 } // namespace mozilla
michael@0 66
michael@0 67 #endif

mercurial