| OLD | NEW |
| 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 }, | 220 }, |
| 221 | 221 |
| 222 /** | 222 /** |
| 223 * Provides all feedback once a checked state changed event fires. | 223 * Provides all feedback once a checked state changed event fires. |
| 224 * @param {!AutomationEvent} evt | 224 * @param {!AutomationEvent} evt |
| 225 */ | 225 */ |
| 226 onCheckedStateChanged: function(evt) { | 226 onCheckedStateChanged: function(evt) { |
| 227 if (!AutomationPredicate.checkable(evt.target)) | 227 if (!AutomationPredicate.checkable(evt.target)) |
| 228 return; | 228 return; |
| 229 | 229 |
| 230 Output.forceModeForNextSpeechUtterance(cvox.QueueMode.CATEGORY_FLUSH); |
| 230 this.onEventIfInRange( | 231 this.onEventIfInRange( |
| 231 new chrome.automation.AutomationEvent( | 232 new chrome.automation.AutomationEvent( |
| 232 EventType.checkedStateChanged, evt.target, evt.eventFrom)); | 233 EventType.checkedStateChanged, evt.target, evt.eventFrom)); |
| 233 }, | 234 }, |
| 234 | 235 |
| 235 /** | 236 /** |
| 236 * Provides all feedback once a focus event fires. | 237 * Provides all feedback once a focus event fires. |
| 237 * @param {!AutomationEvent} evt | 238 * @param {!AutomationEvent} evt |
| 238 */ | 239 */ |
| 239 onFocus: function(evt) { | 240 onFocus: function(evt) { |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 DesktopAutomationHandler.init_ = function() { | 514 DesktopAutomationHandler.init_ = function() { |
| 514 chrome.automation.getDesktop(function(desktop) { | 515 chrome.automation.getDesktop(function(desktop) { |
| 515 ChromeVoxState.desktopAutomationHandler = | 516 ChromeVoxState.desktopAutomationHandler = |
| 516 new DesktopAutomationHandler(desktop); | 517 new DesktopAutomationHandler(desktop); |
| 517 }); | 518 }); |
| 518 }; | 519 }; |
| 519 | 520 |
| 520 DesktopAutomationHandler.init_(); | 521 DesktopAutomationHandler.init_(); |
| 521 | 522 |
| 522 }); // goog.scope | 523 }); // goog.scope |
| OLD | NEW |