Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Unified Diff: ui/views/accessibility/native_view_accessibility_win.h

Issue 266963002: Expose an accessible relation between the main window and active alert. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ia2_1-3
Patch Set: Address feedback Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/accessibility/native_view_accessibility_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
+
DISALLOW_COPY_AND_ASSIGN(NativeViewAccessibilityWin);
};
« no previous file with comments | « no previous file | ui/views/accessibility/native_view_accessibility_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698