| Index: content/browser/renderer_host/legacy_render_widget_host_win.cc
|
| diff --git a/content/browser/renderer_host/legacy_render_widget_host_win.cc b/content/browser/renderer_host/legacy_render_widget_host_win.cc
|
| index 663ea76667b6be6ba0413745f3f4e3204a18beaf..8d3f11cba47bc494887ce2c022954c729fd6ed05 100644
|
| --- a/content/browser/renderer_host/legacy_render_widget_host_win.cc
|
| +++ b/content/browser/renderer_host/legacy_render_widget_host_win.cc
|
| @@ -10,10 +10,10 @@
|
| #include "base/win/win_util.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/browser/accessibility/browser_accessibility_win.h"
|
| #include "content/browser/renderer_host/render_widget_host_impl.h"
|
| #include "content/browser/renderer_host/render_widget_host_view_aura.h"
|
| -#include "content/public/browser/browser_accessibility_state.h"
|
| #include "content/public/common/content_switches.h"
|
| #include "ui/base/view_prop.h"
|
| #include "ui/base/win/internal_constants.h"
|
| @@ -119,7 +119,9 @@ bool LegacyRenderWidgetHostHWND::Init() {
|
| reinterpret_cast<void **>(window_accessible_.Receive()));
|
| DCHECK(SUCCEEDED(hr));
|
|
|
| - if (!BrowserAccessibilityState::GetInstance()->IsAccessibleBrowser()) {
|
| + AccessibilityMode mode =
|
| + BrowserAccessibilityStateImpl::GetInstance()->accessibility_mode();
|
| + if (!(mode & ACCESSIBILITY_MODE_FLAG_NATIVE_APIS)) {
|
| // Attempt to detect screen readers or other clients who want full
|
| // accessibility support, by seeing if they respond to this event.
|
| NotifyWinEvent(EVENT_SYSTEM_ALERT, hwnd(), kIdScreenReaderHoneyPot,
|
| @@ -161,8 +163,11 @@ LRESULT LegacyRenderWidgetHostHWND::OnGetObject(UINT message,
|
|
|
| if (kIdScreenReaderHoneyPot == obj_id) {
|
| // When an MSAA client has responded to our fake event on this id,
|
| - // enable screen reader support.
|
| - BrowserAccessibilityState::GetInstance()->OnScreenReaderDetected();
|
| + // enable basic accessibility support. (Full screen reader support is
|
| + // detected later when specific more advanced APIs are accessed.)
|
| + BrowserAccessibilityStateImpl::GetInstance()->AddAccessibilityModeFlags(
|
| + ACCESSIBILITY_MODE_FLAG_NATIVE_APIS |
|
| + ACCESSIBILITY_MODE_FLAG_WEB_CONTENTS);
|
| return static_cast<LRESULT>(0L);
|
| }
|
|
|
|
|