diff options
-rw-r--r-- | chrome/browser/render_widget_host_view_win.cc | 6 | ||||
-rw-r--r-- | chrome/browser/render_widget_host_view_win.h | 5 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 4 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 2 |
4 files changed, 17 insertions, 0 deletions
diff --git a/chrome/browser/render_widget_host_view_win.cc b/chrome/browser/render_widget_host_view_win.cc index eef290f..6d60b5d 100644 --- a/chrome/browser/render_widget_host_view_win.cc +++ b/chrome/browser/render_widget_host_view_win.cc @@ -78,6 +78,8 @@ RenderWidgetHostViewWin::RenderWidgetHostViewWin( parent_hwnd_(NULL), is_loading_(false) { render_widget_host_->set_view(this); + renderer_accessible_ = + CommandLine().HasSwitch(switches::kEnableRendererAccessibility); } RenderWidgetHostViewWin::~RenderWidgetHostViewWin() { @@ -800,6 +802,10 @@ LRESULT RenderWidgetHostViewWin::OnMouseActivate(UINT, WPARAM, LPARAM, LRESULT RenderWidgetHostViewWin::OnGetObject(UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled) { LRESULT reference_result = static_cast<LRESULT>(0L); + // TODO(jcampan): http://b/issue?id=1432077 Disabling accessibility in the + // renderer is a temporary work-around until that bug is fixed. + if (!renderer_accessible_) + return reference_result; // Accessibility readers will send an OBJID_CLIENT message. if (OBJID_CLIENT == lparam) { diff --git a/chrome/browser/render_widget_host_view_win.h b/chrome/browser/render_widget_host_view_win.h index 9db04ce..c47ca74 100644 --- a/chrome/browser/render_widget_host_view_win.h +++ b/chrome/browser/render_widget_host_view_win.h @@ -259,6 +259,11 @@ class RenderWidgetHostViewWin : // value returns true for is_null() if we are not recording whiteout times. TimeTicks whiteout_start_time_; + // Whether the renderer is made accessible. + // TODO(jcampan): http://b/issue?id=1432077 This is a temporary work-around + // until that bug is fixed. + bool renderer_accessible_; + DISALLOW_EVIL_CONSTRUCTORS(RenderWidgetHostViewWin); }; diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index b751d3b..cafb6f1 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -341,5 +341,9 @@ const wchar_t kIncognito[] = L"incognito"; // operations. const wchar_t kUseNewSafeBrowsing[] = L"new-safe-browsing"; +// Turns on the accessibility in the renderer. Off by default until +// http://b/issue?id=1432077 is fixed. +const wchar_t kEnableRendererAccessibility[] = L"enable-renderer-accessibility"; + } // namespace switches diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index b252e49..9e99a80 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -133,6 +133,8 @@ extern const wchar_t kEnableGreasemonkey[]; extern const wchar_t kIncognito[]; extern const wchar_t kUseNewSafeBrowsing[]; +extern const wchar_t kEnableRendererAccessibility[]; + } // namespace switches #endif // CHROME_COMMON_CHROME_SWITCHES_H__ |