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

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

Issue 2456633002: Narrow next compat whitelist (Closed)
Patch Set: Fix test. Created 4 years, 1 month 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 | « chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs ('k') | 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 /** 142 /**
143 * @param {!AutomationEvent} evt 143 * @param {!AutomationEvent} evt
144 */ 144 */
145 onEventIfInRange: function(evt) { 145 onEventIfInRange: function(evt) {
146 if (!this.shouldOutput_(evt)) 146 if (!this.shouldOutput_(evt))
147 return; 147 return;
148 148
149 var prev = ChromeVoxState.instance.currentRange; 149 var prev = ChromeVoxState.instance.currentRange;
150 if (prev.contentEquals(cursors.Range.fromNode(evt.target)) || 150 if (prev.contentEquals(cursors.Range.fromNode(evt.target)) ||
151 evt.target.state.focused) { 151 evt.target.state.focused) {
152 // Category flush here since previous focus events via navigation can
153 // cause double speak.
154 Output.forceModeForNextSpeechUtterance(cvox.QueueMode.CATEGORY_FLUSH);
155
152 // Intentionally skip setting range. 156 // Intentionally skip setting range.
153 new Output() 157 new Output()
154 .withRichSpeechAndBraille(cursors.Range.fromNode(evt.target), 158 .withRichSpeechAndBraille(cursors.Range.fromNode(evt.target),
155 prev, 159 prev,
156 Output.EventType.NAVIGATE) 160 Output.EventType.NAVIGATE)
157 .go(); 161 .go();
158 } 162 }
159 }, 163 },
160 164
161 /** 165 /**
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 DesktopAutomationHandler.init_ = function() { 518 DesktopAutomationHandler.init_ = function() {
515 chrome.automation.getDesktop(function(desktop) { 519 chrome.automation.getDesktop(function(desktop) {
516 ChromeVoxState.desktopAutomationHandler = 520 ChromeVoxState.desktopAutomationHandler =
517 new DesktopAutomationHandler(desktop); 521 new DesktopAutomationHandler(desktop);
518 }); 522 });
519 }; 523 };
520 524
521 DesktopAutomationHandler.init_(); 525 DesktopAutomationHandler.init_();
522 526
523 }); // goog.scope 527 }); // goog.scope
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698