Chromium Code Reviews| Index: ui/views/accessibility/native_view_accessibility_win.h |
| diff --git a/ui/views/accessibility/native_view_accessibility_win.h b/ui/views/accessibility/native_view_accessibility_win.h |
| index 2c8c1fee76e267df65ce16d571ea0ea04248515c..7e566c63d807ad0fdc49ddd566bf1d8731d13c54 100644 |
| --- a/ui/views/accessibility/native_view_accessibility_win.h |
| +++ b/ui/views/accessibility/native_view_accessibility_win.h |
| @@ -12,6 +12,7 @@ |
| #include <UIAutomationCore.h> |
| #include <set> |
| +#include <vector> |
| #include "third_party/iaccessible2/ia2_api_all.h" |
| #include "ui/accessibility/ax_view_state.h" |
| @@ -38,7 +39,7 @@ namespace views { |
| class __declspec(uuid("26f5641a-246d-457b-a96d-07f3fae6acf2")) |
| NativeViewAccessibilityWin |
| : public CComObjectRootEx<CComMultiThreadModel>, |
| - public IDispatchImpl<IAccessible2, &IID_IAccessible2, |
| + public IDispatchImpl<IAccessible2_2, &IID_IAccessible2_2, |
| &LIBID_IAccessible2Lib>, |
| public IAccessibleText, |
| public IServiceProvider, |
| @@ -47,9 +48,9 @@ NativeViewAccessibilityWin |
| public NativeViewAccessibility { |
| public: |
| BEGIN_COM_MAP(NativeViewAccessibilityWin) |
| - COM_INTERFACE_ENTRY2(IDispatch, IAccessible2) |
| - COM_INTERFACE_ENTRY2(IAccessible, IAccessible2) |
| - COM_INTERFACE_ENTRY(IAccessible2) |
| + COM_INTERFACE_ENTRY2(IDispatch, IAccessible2_2) |
| + COM_INTERFACE_ENTRY2(IAccessible, IAccessible2_2) |
| + COM_INTERFACE_ENTRY(IAccessible2_2) |
| COM_INTERFACE_ENTRY(IAccessibleText) |
| COM_INTERFACE_ENTRY(IServiceProvider) |
| COM_INTERFACE_ENTRY(IAccessibleEx) |
| @@ -145,6 +146,11 @@ NativeViewAccessibilityWin |
| STDMETHODIMP get_windowHandle(HWND* window_handle); |
| + STDMETHODIMP get_relationTargetsOfType(BSTR type, |
| + long max_targets, |
| + IUnknown ***targets, |
| + long *n_targets); |
| + |
| // |
| // IAccessible2 methods not implemented. |
| // |
| @@ -152,6 +158,9 @@ NativeViewAccessibilityWin |
| STDMETHODIMP get_attributes(BSTR* attributes) { |
| return E_NOTIMPL; |
| } |
| + STDMETHODIMP get_attribute(BSTR name, VARIANT* attribute) { |
| + return E_NOTIMPL; |
| + } |
| STDMETHODIMP get_indexInParent(LONG* index_in_parent) { |
| return E_NOTIMPL; |
| } |
| @@ -205,6 +214,10 @@ NativeViewAccessibilityWin |
| STDMETHODIMP get_locale(IA2Locale* locale) { |
| return E_NOTIMPL; |
| } |
| + STDMETHODIMP get_accessibleWithCaret(IUnknown** accessible, |
| + long* caret_offset) { |
| + return E_NOTIMPL; |
| + } |
| // |
| // IAccessibleText methods. |
| @@ -396,6 +409,12 @@ NativeViewAccessibilityWin |
| // NativeViewHost. |
| void PopulateChildWidgetVector(std::vector<Widget*>* child_widgets); |
| + // Adds this view to alert_target_view_storage_ids_. |
| + void AddAlertTarget(); |
| + |
| + // Removes this view from alert_target_view_storage_ids_. |
| + void RemoveAlertTarget(); |
| + |
| // Give CComObject access to the class constructor. |
| template <class Base> friend class CComObject; |
| @@ -418,6 +437,11 @@ NativeViewAccessibilityWin |
| // Next index into |view_storage_ids_| to use. |
| static int next_view_storage_id_index_; |
| + // A vector of view storage ids of views that have been the target of |
| + // an alert event, in order to provide an api to quickly identify all |
| + // open alerts. |
| + static std::vector<int> alert_target_view_storage_ids_; |
| + |
|
David Tseng
2014/05/08 17:23:55
Why is this static? Shouldn't the lifetime of this
dmazzoni
2014/05/08 19:16:13
Every view has its own instance of this class.
Th
|
| DISALLOW_COPY_AND_ASSIGN(NativeViewAccessibilityWin); |
| }; |