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

Unified Diff: content/browser/accessibility/browser_accessibility_win.cc

Issue 23531055: Use IAccessible2 to detect screen reader in Win Aura (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 3 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: content/browser/accessibility/browser_accessibility_win.cc
diff --git a/content/browser/accessibility/browser_accessibility_win.cc b/content/browser/accessibility/browser_accessibility_win.cc
index b5c8fd3c90dc8afb51505f9e7751b25afded305f..df3263e845ddfb2cc82fe58cb5ce1b117d08bcda 100644
--- a/content/browser/accessibility/browser_accessibility_win.cc
+++ b/content/browser/accessibility/browser_accessibility_win.cc
@@ -15,6 +15,7 @@
#include "base/win/scoped_comptr.h"
#include "base/win/windows_version.h"
#include "content/browser/accessibility/browser_accessibility_manager_win.h"
+#include "content/browser/accessibility/browser_accessibility_state_impl.h"
#include "content/common/accessibility_messages.h"
#include "content/public/common/content_client.h"
#include "ui/base/accessibility/accessible_text_utils.h"
@@ -2651,6 +2652,12 @@ STDMETHODIMP BrowserAccessibilityWin::QueryService(REFGUID guidService,
if (!instance_active_)
return E_FAIL;
+ // The system uses IAccessible APIs for many purposes, but only
+ // assistive technology like screen readers uses IAccessible2.
+ // Enable full accessibility support when IAccessible2 APIs are queried.
+ if (riid == IID_IAccessible2)
+ BrowserAccessibilityStateImpl::GetInstance()->EnableAccessibility();
+
if (guidService == GUID_IAccessibleContentDocument) {
// Special Mozilla extension: return the accessible for the root document.
// Screen readers use this to distinguish between a document loaded event
« 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