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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js

Issue 1458723002: Finish implementing ChromeVox Next active indicator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@load_key_map
Patch Set: Created 5 years, 1 month 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 /** 5 /**
6 * @fileoverview Handles automation from a desktop automation node. 6 * @fileoverview Handles automation from a desktop automation node.
7 */ 7 */
8 8
9 goog.provide('DesktopAutomationHandler'); 9 goog.provide('DesktopAutomationHandler');
10 10
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 // Value change events fire on web text fields and text areas when pressing 243 // Value change events fire on web text fields and text areas when pressing
244 // enter; suppress them. 244 // enter; suppress them.
245 if (!global.backgroundObj.currentRange || 245 if (!global.backgroundObj.currentRange ||
246 evt.target.role != RoleType.textField) { 246 evt.target.role != RoleType.textField) {
247 this.onEventDefault(evt); 247 this.onEventDefault(evt);
248 global.backgroundObj.currentRange = cursors.Range.fromNode(evt.target); 248 global.backgroundObj.currentRange = cursors.Range.fromNode(evt.target);
249 } 249 }
250 }, 250 },
251 251
252 /** 252 /**
253 * Handle updating the active indicator when the document scrolls.
254 * @param {Object} evt
255 */
Peter Lundblad 2015/11/20 11:15:03 @override
dmazzoni 2015/11/20 23:35:14 Done.
256 onScrollPositionChanged: function(evt) {
257 new Output().withLocation(
258 global.backgroundObj.currentRange, null, evt.type)
Peter Lundblad 2015/11/20 11:15:03 currentRange can be null, but this parameter is no
dmazzoni 2015/11/20 23:35:14 Huh. Added a null check.
259 .go();
260 },
261
262 /**
253 * Create an editable text handler for the given node if needed. 263 * Create an editable text handler for the given node if needed.
254 * @param {Object} node 264 * @param {Object} node
255 */ 265 */
256 createEditableTextHandlerIfNeeded_: function(node) { 266 createEditableTextHandlerIfNeeded_: function(node) {
257 if (!this.editableTextHandler_ || 267 if (!this.editableTextHandler_ ||
258 node != global.backgroundObj.currentRange.start.node) { 268 node != global.backgroundObj.currentRange.start.node) {
259 var start = node.textSelStart; 269 var start = node.textSelStart;
260 var end = node.textSelEnd; 270 var end = node.textSelEnd;
261 if (start > end) { 271 if (start > end) {
262 var tempOffset = end; 272 var tempOffset = end;
(...skipping 20 matching lines...) Expand all
283 if (cvox.ChromeVox.isMac) 293 if (cvox.ChromeVox.isMac)
284 return; 294 return;
285 chrome.automation.getDesktop(function(desktop) { 295 chrome.automation.getDesktop(function(desktop) {
286 global.desktopAutomationHandler = new DesktopAutomationHandler(desktop); 296 global.desktopAutomationHandler = new DesktopAutomationHandler(desktop);
287 }); 297 });
288 }; 298 };
289 299
290 DesktopAutomationHandler.init_(); 300 DesktopAutomationHandler.init_();
291 301
292 }); // goog.scope 302 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698