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

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

Issue 2028793002: Fix reading of menus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 new Output().withLocation(currentRange, null, evt.type).go(); 335 new Output().withLocation(currentRange, null, evt.type).go();
336 }, 336 },
337 337
338 /** 338 /**
339 * @param {!AutomationEvent} evt 339 * @param {!AutomationEvent} evt
340 */ 340 */
341 onSelection: function(evt) { 341 onSelection: function(evt) {
342 chrome.automation.getFocus(function(focus) { 342 chrome.automation.getFocus(function(focus) {
343 // Some cases (e.g. in overview mode), require overriding the assumption 343 // Some cases (e.g. in overview mode), require overriding the assumption
344 // that focus is an ancestor of a selection target. 344 // that focus is an ancestor of a selection target.
345 var override = 345 var override = evt.target.role == RoleType.menuItem ||
346 evt.target.root == focus.root && focus.root.role == RoleType.desktop; 346 (evt.target.root == focus.root &&
347 focus.root.role == RoleType.desktop);
348 Output.flushNextSpeechUtterance();
347 if (override || AutomationUtil.isDescendantOf(evt.target, focus)) 349 if (override || AutomationUtil.isDescendantOf(evt.target, focus))
348 this.onEventDefault(evt); 350 this.onEventDefault(evt);
349 }.bind(this)); 351 }.bind(this));
350 }, 352 },
351 353
352 /** 354 /**
353 * Provides all feedback once a menu start event fires. 355 * Provides all feedback once a menu start event fires.
354 * @param {!AutomationEvent} evt 356 * @param {!AutomationEvent} evt
355 */ 357 */
356 onMenuStart: function(evt) { 358 onMenuStart: function(evt) {
(...skipping 30 matching lines...) Expand all
387 if (cvox.ChromeVox.isMac) 389 if (cvox.ChromeVox.isMac)
388 return; 390 return;
389 chrome.automation.getDesktop(function(desktop) { 391 chrome.automation.getDesktop(function(desktop) {
390 global.desktopAutomationHandler = new DesktopAutomationHandler(desktop); 392 global.desktopAutomationHandler = new DesktopAutomationHandler(desktop);
391 }); 393 });
392 }; 394 };
393 395
394 DesktopAutomationHandler.init_(); 396 DesktopAutomationHandler.init_();
395 397
396 }); // goog.scope 398 }); // 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