|
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/. */ |
|
5 |
|
6 #ifndef mozilla_a11y_HTMLWin32ObjectAccessible_h_ |
|
7 #define mozilla_a11y_HTMLWin32ObjectAccessible_h_ |
|
8 |
|
9 #include "BaseAccessibles.h" |
|
10 |
|
11 struct IAccessible; |
|
12 |
|
13 namespace mozilla { |
|
14 namespace a11y { |
|
15 |
|
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() {} |
|
28 |
|
29 // Accessible |
|
30 virtual void Shutdown(); |
|
31 virtual mozilla::a11y::role NativeRole(); |
|
32 virtual bool NativelyUnavailable() const; |
|
33 |
|
34 protected: |
|
35 |
|
36 // Accessible |
|
37 virtual void CacheChildren(); |
|
38 |
|
39 void* mHwnd; |
|
40 nsRefPtr<Accessible> mNativeAccessible; |
|
41 }; |
|
42 |
|
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() {} |
|
57 |
|
58 NS_IMETHOD GetNativeInterface(void** aNativeAccessible) MOZ_OVERRIDE; |
|
59 |
|
60 protected: |
|
61 void* mHwnd; |
|
62 }; |
|
63 |
|
64 } // namespace a11y |
|
65 } // namespace mozilla |
|
66 |
|
67 #endif |