From e1b98a164799d90f51336c718724fe8e6db01568 Mon Sep 17 00:00:00 2001
From: Frederik Gladhorn <frederik.gladhorn@digia.com>
Date: Tue, 29 Jul 2014 11:17:41 +0200
Subject: [PATCH] Fix windows build with accessibility

For now the windows build will simply use the same accessibility
implementation as the rest of Qt and we don't bother with using the native
implementation.

Change-Id: Iaad6734834a562f2ee0bd951d299310e95a5c9e1
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
---
 src/core/render_widget_host_view_qt.cpp | 33 -------------------------
 1 file changed, 33 deletions(-)

diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index 6b52e9314..ef07584a6 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -41,13 +41,8 @@
 
 #include "render_widget_host_view_qt.h"
 
-#ifdef OS_WIN
-#include "content/browser/accessibility/browser_accessibility_manager_win.h"
-#include "content/browser/accessibility/browser_accessibility_win.h"
-#else
 #include "browser_accessibility_manager_qt.h"
 #include "browser_accessibility_qt.h"
-#endif
 #include "chromium_overrides.h"
 #include "delegated_frame_node.h"
 #include "render_widget_host_view_qt_delegate.h"
@@ -269,21 +264,7 @@ gfx::NativeViewId RenderWidgetHostViewQt::GetNativeViewId() const
 
 gfx::NativeViewAccessible RenderWidgetHostViewQt::GetNativeViewAccessible()
 {
-#ifdef OS_WIN
-    // keep in sync with render_widget_host_view_win.cpp
-    if (render_widget_host_ &&
-          !BrowserAccessibilityState::GetInstance()->IsAccessibleBrowser()) {
-        // Attempt to detect screen readers by sending an event with our custom id.
-        NotifyWinEvent(EVENT_SYSTEM_ALERT, m_hWnd, kIdCustom, CHILDID_SELF);
-      }
-
-      CreateBrowserAccessibilityManagerIfNeeded();
-
-      return GetBrowserAccessibilityManager()->GetRoot()->
-          ToBrowserAccessibilityWin();
-#else
     return 0;
-#endif
 }
 
 void RenderWidgetHostViewQt::CreateBrowserAccessibilityManagerIfNeeded()
@@ -291,24 +272,10 @@ void RenderWidgetHostViewQt::CreateBrowserAccessibilityManagerIfNeeded()
     if (GetBrowserAccessibilityManager())
         return;
 
-#ifdef OS_WIN
-    HRESULT hr = ::CreateStdAccessibleObject(
-        m_hWnd, OBJID_WINDOW, IID_IAccessible,
-        reinterpret_cast<void **>(&window_iaccessible_));
-    DCHECK(SUCCEEDED(hr));
-
-    SetBrowserAccessibilityManager(
-        new BrowserAccessibilityManagerWin(
-            m_hWnd,
-            window_iaccessible_.get(),
-            BrowserAccessibilityManagerWin::GetEmptyDocument(),
-            this));
-#else
     SetBrowserAccessibilityManager(new content::BrowserAccessibilityManagerQt(
         m_adapterClient->accessibilityParentObject(),
         content::BrowserAccessibilityManagerQt::GetEmptyDocument(),
         this));
-#endif
 }
 
 // Set focus to the associated View component.
-- 
GitLab