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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_win.cc

Issue 9939011: Add an accessibility mode for editable text fields only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_widget_host_view_win.h" 5 #include "content/browser/renderer_host/render_widget_host_view_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <peninputpanel_i.c> 8 #include <peninputpanel_i.c>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 2262 matching lines...) Expand 10 before | Expand all | Expand 10 after
2273 render_widget_host_->AccessibilitySetTextSelection( 2273 render_widget_host_->AccessibilitySetTextSelection(
2274 acc_obj_id, start_offset, end_offset); 2274 acc_obj_id, start_offset, end_offset);
2275 } 2275 }
2276 2276
2277 LRESULT RenderWidgetHostViewWin::OnGetObject(UINT message, WPARAM wparam, 2277 LRESULT RenderWidgetHostViewWin::OnGetObject(UINT message, WPARAM wparam,
2278 LPARAM lparam, BOOL& handled) { 2278 LPARAM lparam, BOOL& handled) {
2279 if (kIdCustom == lparam) { 2279 if (kIdCustom == lparam) {
2280 // An MSAA client requestes our custom id. Assume that we have detected an 2280 // An MSAA client requestes our custom id. Assume that we have detected an
2281 // active windows screen reader. 2281 // active windows screen reader.
2282 BrowserAccessibilityState::GetInstance()->OnScreenReaderDetected(); 2282 BrowserAccessibilityState::GetInstance()->OnScreenReaderDetected();
2283 render_widget_host_->EnableRendererAccessibility(); 2283 if (BrowserAccessibilityState::GetInstance()->IsAccessibleBrowser())
2284 render_widget_host_->SetAccessibilityMode(AccessibilityModeComplete);
2284 2285
2285 // Return with failure. 2286 // Return with failure.
2286 return static_cast<LRESULT>(0L); 2287 return static_cast<LRESULT>(0L);
2287 } 2288 }
2288 2289
2289 if (lparam != OBJID_CLIENT) { 2290 if (lparam != OBJID_CLIENT) {
2290 handled = false; 2291 handled = false;
2291 return static_cast<LRESULT>(0L); 2292 return static_cast<LRESULT>(0L);
2292 } 2293 }
2293 2294
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
2674 void RenderWidgetHostViewWin::ResetPointerDownContext() { 2675 void RenderWidgetHostViewWin::ResetPointerDownContext() {
2675 // If the default focus on the page is on an edit field and we did not 2676 // If the default focus on the page is on an edit field and we did not
2676 // receive a focus change in the context of a pointer down message, it means 2677 // receive a focus change in the context of a pointer down message, it means
2677 // that the pointer down message occurred on the edit field and we should 2678 // that the pointer down message occurred on the edit field and we should
2678 // display the on screen keyboard 2679 // display the on screen keyboard
2679 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) 2680 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_)
2680 DisplayOnScreenKeyboardIfNeeded(); 2681 DisplayOnScreenKeyboardIfNeeded();
2681 received_focus_change_after_pointer_down_ = false; 2682 received_focus_change_after_pointer_down_ = false;
2682 pointer_down_context_ = false; 2683 pointer_down_context_ = false;
2683 } 2684 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698