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

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

Issue 2151763003: In ChromeVox Next, create a text edit handler on "LoadComplete" if there is already a focused text … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | 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 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 onLoadComplete: function(evt) { 240 onLoadComplete: function(evt) {
241 // Don't process nodes inside of web content if ChromeVox Next is inactive. 241 // Don't process nodes inside of web content if ChromeVox Next is inactive.
242 if (evt.target.root.role != RoleType.desktop && 242 if (evt.target.root.role != RoleType.desktop &&
243 ChromeVoxState.instance.mode === ChromeVoxMode.CLASSIC) 243 ChromeVoxState.instance.mode === ChromeVoxMode.CLASSIC)
244 return; 244 return;
245 245
246 chrome.automation.getFocus(function(focus) { 246 chrome.automation.getFocus(function(focus) {
247 if (!focus || !AutomationUtil.isDescendantOf(focus, evt.target)) 247 if (!focus || !AutomationUtil.isDescendantOf(focus, evt.target))
248 return; 248 return;
249 249
250 // Create text edit handler, if needed, now in order not to miss initial
251 // value change if text field has already been focused when initializing
252 // ChromeVox.
253 this.createTextEditHandlerIfNeeded_(focus);
254
250 // If initial focus was already placed on this page (e.g. if a user starts 255 // If initial focus was already placed on this page (e.g. if a user starts
251 // tabbing before load complete), then don't move ChromeVox's position on 256 // tabbing before load complete), then don't move ChromeVox's position on
252 // the page. 257 // the page.
253 if (ChromeVoxState.instance.currentRange && 258 if (ChromeVoxState.instance.currentRange &&
254 ChromeVoxState.instance.currentRange.start.node.root == focus.root) 259 ChromeVoxState.instance.currentRange.start.node.root == focus.root)
255 return; 260 return;
256 261
257 var o = new Output(); 262 var o = new Output();
258 if (focus.role == RoleType.rootWebArea) { 263 if (focus.role == RoleType.rootWebArea) {
259 // Restore to previous position. 264 // Restore to previous position.
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 DesktopAutomationHandler.init_ = function() { 420 DesktopAutomationHandler.init_ = function() {
416 chrome.automation.getDesktop(function(desktop) { 421 chrome.automation.getDesktop(function(desktop) {
417 ChromeVoxState.desktopAutomationHandler = 422 ChromeVoxState.desktopAutomationHandler =
418 new DesktopAutomationHandler(desktop); 423 new DesktopAutomationHandler(desktop);
419 }); 424 });
420 }; 425 };
421 426
422 DesktopAutomationHandler.init_(); 427 DesktopAutomationHandler.init_();
423 428
424 }); // goog.scope 429 }); // goog.scope
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698