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.

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

mercurial