Chromium Code Reviews| Index: content/browser/renderer_host/render_view_host_impl.cc |
| diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc |
| index e31de0f182530c5e9c400978464681233c61a479..0f57ce64032ddb309bd294db4ca61e01b3b47913 100644 |
| --- a/content/browser/renderer_host/render_view_host_impl.cc |
| +++ b/content/browser/renderer_host/render_view_host_impl.cc |
| @@ -33,6 +33,7 @@ |
| #include "content/common/swapped_out_messages.h" |
| #include "content/common/view_messages.h" |
| #include "content/port/browser/render_widget_host_view_port.h" |
| +#include "content/public/browser/browser_accessibility_state.h" |
| #include "content/public/browser/browser_context.h" |
| #include "content/public/browser/browser_message_filter.h" |
| #include "content/public/browser/content_browser_client.h" |
| @@ -204,7 +205,7 @@ bool RenderViewHostImpl::CreateRenderView(const string16& frame_name, |
| // initialized it) or may not (we have our own process or the old process |
| // crashed) have been initialized. Calling Init multiple times will be |
| // ignored, so this is safe. |
| - if (!GetProcess()->Init(renderer_accessible())) |
| + if (!GetProcess()->Init()) |
| return false; |
| DCHECK(GetProcess()->HasConnection()); |
| DCHECK(GetProcess()->GetBrowserContext()); |
| @@ -244,6 +245,19 @@ bool RenderViewHostImpl::CreateRenderView(const string16& frame_name, |
| gfx::NativeViewFromId(GetNativeViewId())); |
| #endif |
| params.guest = guest_; |
| + params.accessibility_mode = |
| + BrowserAccessibilityState::GetInstance()->IsAccessibleBrowser() ? |
| + AccessibilityModeComplete : |
|
David Tseng
2012/04/05 01:01:25
nit: indent looks wrong here.
dmazzoni
2012/04/06 21:47:22
Done.
|
| + AccessibilityModeOff; |
| + |
| +#if defined(OS_WIN) |
| + // On Windows 8, always enable accessibility for editable text controls |
| + // so we can show the virtual keyboard when one is enabled. |
| + if (base::win::GetVersion() >= base::win::VERSION_WIN8 && |
| + params.accessibility_mode == AccessibilityModeOff) { |
| + params.accessibility_mode = AccessibilityModeEditableTextOnly; |
| + } |
| +#endif |
| Send(new ViewMsg_New(params)); |