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

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

Issue 2412433004: Recovery: Implement focus recovery across root AutomationNodes (Closed)
Patch Set: Address feedback. Created 4 years, 2 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 ChromeVox commands. 6 * @fileoverview ChromeVox commands.
7 */ 7 */
8 8
9 goog.provide('CommandHandler'); 9 goog.provide('CommandHandler');
10 10
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 case 'contextMenu': 465 case 'contextMenu':
466 if (ChromeVoxState.instance.currentRange_) { 466 if (ChromeVoxState.instance.currentRange_) {
467 var actionNode = ChromeVoxState.instance.currentRange_.start.node; 467 var actionNode = ChromeVoxState.instance.currentRange_.start.node;
468 if (actionNode.role == RoleType.inlineTextBox) 468 if (actionNode.role == RoleType.inlineTextBox)
469 actionNode = actionNode.parent; 469 actionNode = actionNode.parent;
470 actionNode.showContextMenu(); 470 actionNode.showContextMenu();
471 return false; 471 return false;
472 } 472 }
473 break; 473 break;
474 case 'toggleKeyboardHelp': 474 case 'toggleKeyboardHelp':
475 ChromeVoxState.instance.startExcursion();
476 (new PanelCommand(PanelCommandType.OPEN_MENUS)).send(); 475 (new PanelCommand(PanelCommandType.OPEN_MENUS)).send();
477 return false; 476 return false;
478 case 'showHeadingsList': 477 case 'showHeadingsList':
479 ChromeVoxState.instance.startExcursion();
480 (new PanelCommand(PanelCommandType.OPEN_MENUS, 'role_heading')).send(); 478 (new PanelCommand(PanelCommandType.OPEN_MENUS, 'role_heading')).send();
481 return false; 479 return false;
482 case 'showFormsList': 480 case 'showFormsList':
483 ChromeVoxState.instance.startExcursion();
484 (new PanelCommand(PanelCommandType.OPEN_MENUS, 'role_form')).send(); 481 (new PanelCommand(PanelCommandType.OPEN_MENUS, 'role_form')).send();
485 return false; 482 return false;
486 case 'showLandmarksList': 483 case 'showLandmarksList':
487 ChromeVoxState.instance.startExcursion();
488 (new PanelCommand(PanelCommandType.OPEN_MENUS, 'role_landmark')).send(); 484 (new PanelCommand(PanelCommandType.OPEN_MENUS, 'role_landmark')).send();
489 return false; 485 return false;
490 case 'showLinksList': 486 case 'showLinksList':
491 ChromeVoxState.instance.startExcursion();
492 (new PanelCommand(PanelCommandType.OPEN_MENUS, 'role_link')).send(); 487 (new PanelCommand(PanelCommandType.OPEN_MENUS, 'role_link')).send();
493 return false; 488 return false;
494 case 'showTablesList': 489 case 'showTablesList':
495 ChromeVoxState.instance.startExcursion();
496 (new PanelCommand(PanelCommandType.OPEN_MENUS, 'table_strategy')).send(); 490 (new PanelCommand(PanelCommandType.OPEN_MENUS, 'table_strategy')).send();
497 return false; 491 return false;
498 case 'toggleSearchWidget': 492 case 'toggleSearchWidget':
499 (new PanelCommand(PanelCommandType.SEARCH)).send(); 493 (new PanelCommand(PanelCommandType.SEARCH)).send();
500 return false; 494 return false;
501 case 'readCurrentTitle': 495 case 'readCurrentTitle':
502 var target = ChromeVoxState.instance.currentRange_.start.node; 496 var target = ChromeVoxState.instance.currentRange_.start.node;
503 var output = new Output(); 497 var output = new Output();
504 498
505 if (target.root.role == RoleType.rootWebArea) { 499 if (target.root.role == RoleType.rootWebArea) {
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 break; 733 break;
740 } 734 }
741 if (announcement) { 735 if (announcement) {
742 cvox.ChromeVox.tts.speak( 736 cvox.ChromeVox.tts.speak(
743 announcement, cvox.QueueMode.FLUSH, 737 announcement, cvox.QueueMode.FLUSH,
744 cvox.AbstractTts.PERSONALITY_ANNOTATION); 738 cvox.AbstractTts.PERSONALITY_ANNOTATION);
745 } 739 }
746 }; 740 };
747 741
748 }); // goog.scope 742 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698