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

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

Issue 1523953004: Fix volume slider to emit value changed events and do not focus system tray item for transient views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 /** 230 /**
231 * Provides all feedback once a value changed event fires. 231 * Provides all feedback once a value changed event fires.
232 * @param {Object} evt 232 * @param {Object} evt
233 */ 233 */
234 onValueChanged: function(evt) { 234 onValueChanged: function(evt) {
235 // Don't process nodes inside of web content if ChromeVox Next is inactive. 235 // Don't process nodes inside of web content if ChromeVox Next is inactive.
236 if (evt.target.root.role != RoleType.desktop && 236 if (evt.target.root.role != RoleType.desktop &&
237 ChromeVoxState.instance.mode === ChromeVoxMode.CLASSIC) 237 ChromeVoxState.instance.mode === ChromeVoxMode.CLASSIC)
238 return; 238 return;
239 239
240 if (!evt.target.state.focused)
241 return;
242
243 // Value change events fire on web editables when typing. Suppress them. 240 // Value change events fire on web editables when typing. Suppress them.
244 if (!ChromeVoxState.instance.currentRange || 241 if (!ChromeVoxState.instance.currentRange ||
245 !this.isEditable_(evt.target)) { 242 !this.isEditable_(evt.target)) {
246 this.onEventDefault(evt); 243 var range = cursors.Range.fromNode(evt.target);
247 ChromeVoxState.instance.setCurrentRange( 244 new Output().withSpeechAndBraille(range, range, evt.type)
248 cursors.Range.fromNode(evt.target)); 245 .go();
249 } 246 }
250 }, 247 },
251 248
252 /** 249 /**
253 * Handle updating the active indicator when the document scrolls. 250 * Handle updating the active indicator when the document scrolls.
254 * @override 251 * @override
255 */ 252 */
256 onScrollPositionChanged: function(evt) { 253 onScrollPositionChanged: function(evt) {
257 var currentRange = ChromeVoxState.instance.currentRange; 254 var currentRange = ChromeVoxState.instance.currentRange;
258 if (currentRange) 255 if (currentRange)
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 if (cvox.ChromeVox.isMac) 302 if (cvox.ChromeVox.isMac)
306 return; 303 return;
307 chrome.automation.getDesktop(function(desktop) { 304 chrome.automation.getDesktop(function(desktop) {
308 global.desktopAutomationHandler = new DesktopAutomationHandler(desktop); 305 global.desktopAutomationHandler = new DesktopAutomationHandler(desktop);
309 }); 306 });
310 }; 307 };
311 308
312 DesktopAutomationHandler.init_(); 309 DesktopAutomationHandler.init_();
313 310
314 }); // goog.scope 311 }); // goog.scope
OLDNEW
« ash/system/tray/system_tray.cc ('K') | « ash/system/tray/system_tray.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698