OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_ | 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_ |
6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_ | 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <atlbase.h> | 9 #include <atlbase.h> |
10 #include <atlcom.h> | 10 #include <atlcom.h> |
11 #include <oleacc.h> | 11 #include <oleacc.h> |
12 | 12 |
13 #include <UIAutomationCore.h> | |
dmazzoni
2012/04/04 06:02:00
Nit: Group this with the other Windows includes, a
ananta
2012/04/04 19:23:00
Done.
| |
13 #include <vector> | 14 #include <vector> |
14 | 15 |
15 #include "content/browser/accessibility/browser_accessibility.h" | 16 #include "content/browser/accessibility/browser_accessibility.h" |
16 #include "content/common/content_export.h" | 17 #include "content/common/content_export.h" |
17 #include "third_party/iaccessible2/ia2_api_all.h" | 18 #include "third_party/iaccessible2/ia2_api_all.h" |
18 #include "third_party/isimpledom/ISimpleDOMDocument.h" | 19 #include "third_party/isimpledom/ISimpleDOMDocument.h" |
19 #include "third_party/isimpledom/ISimpleDOMNode.h" | 20 #include "third_party/isimpledom/ISimpleDOMNode.h" |
20 #include "third_party/isimpledom/ISimpleDOMText.h" | 21 #include "third_party/isimpledom/ISimpleDOMText.h" |
21 #include "webkit/glue/webaccessibility.h" | 22 #include "webkit/glue/webaccessibility.h" |
22 | 23 |
(...skipping 24 matching lines...) Expand all Loading... | |
47 public IAccessibleHyperlink, | 48 public IAccessibleHyperlink, |
48 public IAccessibleHypertext, | 49 public IAccessibleHypertext, |
49 public IAccessibleImage, | 50 public IAccessibleImage, |
50 public IAccessibleTable, | 51 public IAccessibleTable, |
51 public IAccessibleTable2, | 52 public IAccessibleTable2, |
52 public IAccessibleTableCell, | 53 public IAccessibleTableCell, |
53 public IAccessibleValue, | 54 public IAccessibleValue, |
54 public IServiceProvider, | 55 public IServiceProvider, |
55 public ISimpleDOMDocument, | 56 public ISimpleDOMDocument, |
56 public ISimpleDOMNode, | 57 public ISimpleDOMNode, |
57 public ISimpleDOMText { | 58 public ISimpleDOMText, |
59 public IAccessibleEx, | |
60 public IRawElementProviderSimple { | |
58 public: | 61 public: |
59 BEGIN_COM_MAP(BrowserAccessibilityWin) | 62 BEGIN_COM_MAP(BrowserAccessibilityWin) |
60 COM_INTERFACE_ENTRY2(IDispatch, IAccessible2) | 63 COM_INTERFACE_ENTRY2(IDispatch, IAccessible2) |
61 COM_INTERFACE_ENTRY2(IAccessible, IAccessible2) | 64 COM_INTERFACE_ENTRY2(IAccessible, IAccessible2) |
62 COM_INTERFACE_ENTRY2(IAccessibleText, IAccessibleHypertext) | 65 COM_INTERFACE_ENTRY2(IAccessibleText, IAccessibleHypertext) |
63 COM_INTERFACE_ENTRY(IAccessible2) | 66 COM_INTERFACE_ENTRY(IAccessible2) |
64 COM_INTERFACE_ENTRY(IAccessibleHyperlink) | 67 COM_INTERFACE_ENTRY(IAccessibleHyperlink) |
65 COM_INTERFACE_ENTRY(IAccessibleHypertext) | 68 COM_INTERFACE_ENTRY(IAccessibleHypertext) |
66 COM_INTERFACE_ENTRY(IAccessibleImage) | 69 COM_INTERFACE_ENTRY(IAccessibleImage) |
67 COM_INTERFACE_ENTRY(IAccessibleTable) | 70 COM_INTERFACE_ENTRY(IAccessibleTable) |
68 COM_INTERFACE_ENTRY(IAccessibleTable2) | 71 COM_INTERFACE_ENTRY(IAccessibleTable2) |
69 COM_INTERFACE_ENTRY(IAccessibleTableCell) | 72 COM_INTERFACE_ENTRY(IAccessibleTableCell) |
70 COM_INTERFACE_ENTRY(IAccessibleValue) | 73 COM_INTERFACE_ENTRY(IAccessibleValue) |
71 COM_INTERFACE_ENTRY(IServiceProvider) | 74 COM_INTERFACE_ENTRY(IServiceProvider) |
72 COM_INTERFACE_ENTRY(ISimpleDOMDocument) | 75 COM_INTERFACE_ENTRY(ISimpleDOMDocument) |
73 COM_INTERFACE_ENTRY(ISimpleDOMNode) | 76 COM_INTERFACE_ENTRY(ISimpleDOMNode) |
74 COM_INTERFACE_ENTRY(ISimpleDOMText) | 77 COM_INTERFACE_ENTRY(ISimpleDOMText) |
78 COM_INTERFACE_ENTRY(IAccessibleEx) | |
79 COM_INTERFACE_ENTRY(IRawElementProviderSimple) | |
75 END_COM_MAP() | 80 END_COM_MAP() |
76 | 81 |
77 // Represents a non-static text node in IAccessibleHypertext. This character | 82 // Represents a non-static text node in IAccessibleHypertext. This character |
78 // is embedded in the response to IAccessibleText::get_text, indicating the | 83 // is embedded in the response to IAccessibleText::get_text, indicating the |
79 // position where a non-static text child object appears. | 84 // position where a non-static text child object appears. |
80 CONTENT_EXPORT static const char16 kEmbeddedCharacter[]; | 85 CONTENT_EXPORT static const char16 kEmbeddedCharacter[]; |
81 | 86 |
82 // Mappings from roles and states to human readable strings. Initialize | 87 // Mappings from roles and states to human readable strings. Initialize |
83 // with |InitializeStringMaps|. | 88 // with |InitializeStringMaps|. |
84 static std::map<int32, string16> role_string_map; | 89 static std::map<int32, string16> role_string_map; |
85 static std::map<int32, string16> state_string_map; | 90 static std::map<int32, string16> state_string_map; |
86 | 91 |
87 CONTENT_EXPORT BrowserAccessibilityWin(); | 92 CONTENT_EXPORT BrowserAccessibilityWin(); |
88 | 93 |
89 CONTENT_EXPORT virtual ~BrowserAccessibilityWin(); | 94 CONTENT_EXPORT virtual ~BrowserAccessibilityWin(); |
90 | 95 |
91 // | 96 // |
92 // BrowserAccessibility methods. | 97 // BrowserAccessibility methods. |
93 // | 98 // |
94 CONTENT_EXPORT virtual void PreInitialize(); | 99 CONTENT_EXPORT virtual void PreInitialize(); |
95 CONTENT_EXPORT virtual void PostInitialize(); | 100 CONTENT_EXPORT virtual void PostInitialize(); |
96 CONTENT_EXPORT virtual void NativeAddReference(); | 101 CONTENT_EXPORT virtual void NativeAddReference(); |
97 CONTENT_EXPORT virtual void NativeReleaseReference(); | 102 CONTENT_EXPORT virtual void NativeReleaseReference(); |
98 | 103 |
99 // | 104 // |
100 // IAccessible methods. | 105 // IAccessible methods. |
101 // | 106 // |
102 | 107 |
103 // Performs the default action on a given object. | 108 // Performs the default action on a given object. |
104 CONTENT_EXPORT STDMETHODIMP accDoDefaultAction(VARIANT var_id); | 109 CONTENT_EXPORT STDMETHODIMP accDoDefaultAction(VARIANT var_id); |
105 | 110 |
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
685 return E_NOTIMPL; | 690 return E_NOTIMPL; |
686 } | 691 } |
687 | 692 |
688 // | 693 // |
689 // IServiceProvider methods. | 694 // IServiceProvider methods. |
690 // | 695 // |
691 | 696 |
692 CONTENT_EXPORT STDMETHODIMP QueryService(REFGUID guidService, REFIID riid, | 697 CONTENT_EXPORT STDMETHODIMP QueryService(REFGUID guidService, REFIID riid, |
693 void** object); | 698 void** object); |
694 | 699 |
700 // IAccessibleEx methods not implemented. | |
dmazzoni
2012/04/04 06:02:00
Nit: Use a large comment block to be consistent:
ananta
2012/04/04 19:23:00
Done.
| |
701 CONTENT_EXPORT STDMETHODIMP GetObjectForChild(long child_id, | |
702 IAccessibleEx** ret) { | |
703 return E_NOTIMPL; | |
704 } | |
705 | |
706 CONTENT_EXPORT STDMETHODIMP GetIAccessiblePair(IAccessible** acc, | |
707 long* child_id) { | |
708 return E_NOTIMPL; | |
709 } | |
710 | |
711 CONTENT_EXPORT STDMETHODIMP GetRuntimeId(SAFEARRAY** runtime_id) { | |
712 return E_NOTIMPL; | |
713 } | |
714 | |
715 CONTENT_EXPORT STDMETHODIMP ConvertReturnedElement( | |
716 IRawElementProviderSimple* element, | |
717 IAccessibleEx** acc) { | |
718 return E_NOTIMPL; | |
719 } | |
720 | |
721 // IRawElementProviderSimple methods. | |
dmazzoni
2012/04/04 06:02:00
Same
ananta
2012/04/04 19:23:00
Done.
| |
722 // The GetPatternProvider/GetPropertyValue methods need to be implemented for | |
723 // the on screen keyboard to show up in Windows 8 metro. | |
dmazzoni
2012/04/04 06:02:00
Nit: on screen -> on-screen.
ananta
2012/04/04 19:23:00
Done.
| |
724 CONTENT_EXPORT STDMETHOD(GetPatternProvider)(PATTERNID id, | |
725 IUnknown** provider); | |
726 CONTENT_EXPORT STDMETHOD(GetPropertyValue)(PROPERTYID id, VARIANT* ret); | |
dmazzoni
2012/04/04 06:02:00
Does it work if you use STDMETHODIMP GetPropertyVa
ananta
2012/04/04 19:23:00
Done.
| |
727 | |
728 // IRawElementProviderSimple methods not implemented. | |
729 CONTENT_EXPORT STDMETHOD(get_ProviderOptions)(enum ProviderOptions* ret) { | |
730 return E_NOTIMPL; | |
731 } | |
732 | |
733 CONTENT_EXPORT STDMETHOD(get_HostRawElementProvider)( | |
734 IRawElementProviderSimple** provider) { | |
735 return E_NOTIMPL; | |
736 } | |
737 | |
695 // | 738 // |
696 // CComObjectRootEx methods. | 739 // CComObjectRootEx methods. |
697 // | 740 // |
698 | 741 |
699 CONTENT_EXPORT HRESULT WINAPI InternalQueryInterface(void* this_ptr, | 742 CONTENT_EXPORT HRESULT WINAPI InternalQueryInterface(void* this_ptr, |
700 const _ATL_INTMAP_ENTRY* entries, | 743 const _ATL_INTMAP_ENTRY* entries, |
701 REFIID iid, | 744 REFIID iid, |
702 void** object); | 745 void** object); |
703 | 746 |
704 // Accessors to IA2 role and state. | 747 // Accessors to IA2 role and state. |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
810 std::vector<int32> hyperlinks_; | 853 std::vector<int32> hyperlinks_; |
811 | 854 |
812 // Give BrowserAccessibility::Create access to our constructor. | 855 // Give BrowserAccessibility::Create access to our constructor. |
813 friend class BrowserAccessibility; | 856 friend class BrowserAccessibility; |
814 friend class BrowserAccessibilityRelation; | 857 friend class BrowserAccessibilityRelation; |
815 | 858 |
816 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityWin); | 859 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityWin); |
817 }; | 860 }; |
818 | 861 |
819 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_ | 862 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_ |
OLD | NEW |