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

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

Issue 2104663003: Prepare ChromeVox for webstore release. (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
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 if (!node) 94 if (!node)
95 return; 95 return;
96 96
97 var prevRange = ChromeVoxState.instance.currentRange; 97 var prevRange = ChromeVoxState.instance.currentRange;
98 98
99 ChromeVoxState.instance.setCurrentRange(cursors.Range.fromNode(node)); 99 ChromeVoxState.instance.setCurrentRange(cursors.Range.fromNode(node));
100 100
101 // Don't process nodes inside of web content if ChromeVox Next is inactive. 101 // Don't process nodes inside of web content if ChromeVox Next is inactive.
102 if (node.root.role != RoleType.desktop && 102 if (node.root.role != RoleType.desktop &&
103 ChromeVoxState.instance.mode === ChromeVoxMode.CLASSIC) { 103 ChromeVoxState.instance.mode === ChromeVoxMode.CLASSIC) {
104 if (cvox.ChromeVox.isChromeOS) 104 chrome.accessibilityPrivate.setFocusRing([]);
105 chrome.accessibilityPrivate.setFocusRing([]);
106 return; 105 return;
107 } 106 }
108 107
109 // Don't output if focused node hasn't changed. 108 // Don't output if focused node hasn't changed.
110 if (prevRange && 109 if (prevRange &&
111 evt.type == 'focus' && 110 evt.type == 'focus' &&
112 ChromeVoxState.instance.currentRange.equals(prevRange)) 111 ChromeVoxState.instance.currentRange.equals(prevRange))
113 return; 112 return;
114 113
115 var output = new Output(); 114 var output = new Output();
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 this.textEditHandler_ = editing.TextEditHandler.createForNode(node); 392 this.textEditHandler_ = editing.TextEditHandler.createForNode(node);
394 } 393 }
395 } 394 }
396 }; 395 };
397 396
398 /** 397 /**
399 * Initializes global state for DesktopAutomationHandler. 398 * Initializes global state for DesktopAutomationHandler.
400 * @private 399 * @private
401 */ 400 */
402 DesktopAutomationHandler.init_ = function() { 401 DesktopAutomationHandler.init_ = function() {
403 if (cvox.ChromeVox.isMac)
404 return;
405 chrome.automation.getDesktop(function(desktop) { 402 chrome.automation.getDesktop(function(desktop) {
406 ChromeVoxState.desktopAutomationHandler = 403 ChromeVoxState.desktopAutomationHandler =
407 new DesktopAutomationHandler(desktop); 404 new DesktopAutomationHandler(desktop);
408 }); 405 });
409 }; 406 };
410 407
411 DesktopAutomationHandler.init_(); 408 DesktopAutomationHandler.init_();
412 409
413 }); // goog.scope 410 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698