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

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

Issue 2069543004: Adjust output rules related 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
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 }, 86 },
87 87
88 /** 88 /**
89 * Provides all feedback once ChromeVox's focus changes. 89 * Provides all feedback once ChromeVox's focus changes.
90 * @param {!AutomationEvent} evt 90 * @param {!AutomationEvent} evt
91 */ 91 */
92 onEventDefault: function(evt) { 92 onEventDefault: function(evt) {
93 var node = evt.target; 93 var node = evt.target;
94 if (!node) 94 if (!node)
95 return; 95 return;
96 node = node.activeDescendant || node;
96 97
97 var prevRange = ChromeVoxState.instance.currentRange; 98 var prevRange = ChromeVoxState.instance.currentRange;
98 99
99 ChromeVoxState.instance.setCurrentRange(cursors.Range.fromNode(node)); 100 ChromeVoxState.instance.setCurrentRange(cursors.Range.fromNode(node));
100 101
101 // Check to see if we've crossed roots. Continue if we've crossed roots or 102 // Check to see if we've crossed roots. Continue if we've crossed roots or
102 // are not within web content. 103 // are not within web content.
103 if (node.root.role == RoleType.desktop || 104 if (node.root.role == RoleType.desktop ||
104 !prevRange || 105 !prevRange ||
105 prevRange.start.node.root != node.root) 106 prevRange.start.node.root != node.root)
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 if (cvox.ChromeVox.isMac) 413 if (cvox.ChromeVox.isMac)
413 return; 414 return;
414 chrome.automation.getDesktop(function(desktop) { 415 chrome.automation.getDesktop(function(desktop) {
415 global.desktopAutomationHandler = new DesktopAutomationHandler(desktop); 416 global.desktopAutomationHandler = new DesktopAutomationHandler(desktop);
416 }); 417 });
417 }; 418 };
418 419
419 DesktopAutomationHandler.init_(); 420 DesktopAutomationHandler.init_();
420 421
421 }); // goog.scope 422 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698