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

Side by Side Diff: content/shell/renderer/test_runner/accessibility_controller.cc

Issue 497273002: Switch to using WebSettings only for accessibilityEnabled and inlineTextBoxAccess (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 3 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
« no previous file with comments | « content/renderer/accessibility/renderer_accessibility_complete.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/shell/renderer/test_runner/accessibility_controller.h" 5 #include "content/shell/renderer/test_runner/accessibility_controller.h"
6 6
7 #include "gin/handle.h" 7 #include "gin/handle.h"
8 #include "gin/object_template_builder.h" 8 #include "gin/object_template_builder.h"
9 #include "gin/wrappable.h" 9 #include "gin/wrappable.h"
10 #include "third_party/WebKit/public/web/WebElement.h" 10 #include "third_party/WebKit/public/web/WebElement.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 void AccessibilityController::Reset() { 141 void AccessibilityController::Reset() {
142 root_element_ = blink::WebAXObject(); 142 root_element_ = blink::WebAXObject();
143 focused_element_ = blink::WebAXObject(); 143 focused_element_ = blink::WebAXObject();
144 elements_.Clear(); 144 elements_.Clear();
145 notification_callback_.Reset(); 145 notification_callback_.Reset();
146 log_accessibility_events_ = false; 146 log_accessibility_events_ = false;
147 } 147 }
148 148
149 void AccessibilityController::Install(blink::WebFrame* frame) { 149 void AccessibilityController::Install(blink::WebFrame* frame) {
150 blink::WebAXObject::enableAccessibility();
151 frame->view()->settings()->setAccessibilityEnabled(true); 150 frame->view()->settings()->setAccessibilityEnabled(true);
152
153 blink::WebAXObject::enableInlineTextBoxAccessibility();
154 frame->view()->settings()->setInlineTextBoxAccessibilityEnabled(true); 151 frame->view()->settings()->setInlineTextBoxAccessibilityEnabled(true);
155 152
156 AccessibilityControllerBindings::Install(weak_factory_.GetWeakPtr(), frame); 153 AccessibilityControllerBindings::Install(weak_factory_.GetWeakPtr(), frame);
157 } 154 }
158 155
159 void AccessibilityController::SetFocusedElement( 156 void AccessibilityController::SetFocusedElement(
160 const blink::WebAXObject& focused_element) { 157 const blink::WebAXObject& focused_element) {
161 focused_element_ = focused_element; 158 focused_element_ = focused_element;
162 } 159 }
163 160
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 v8::Handle<v8::Object> result = 269 v8::Handle<v8::Object> result =
273 FindAccessibleElementByIdRecursive(obj.childAt(i), id); 270 FindAccessibleElementByIdRecursive(obj.childAt(i), id);
274 if (*result) 271 if (*result)
275 return result; 272 return result;
276 } 273 }
277 274
278 return v8::Handle<v8::Object>(); 275 return v8::Handle<v8::Object>();
279 } 276 }
280 277
281 } // namespace content 278 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/accessibility/renderer_accessibility_complete.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698