| 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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 var pos = cvox.ChromeVox.position[url]; | 307 var pos = cvox.ChromeVox.position[url]; |
| 308 if (pos) { | 308 if (pos) { |
| 309 focus = AutomationUtil.hitTest(focus.root, pos) || focus; | 309 focus = AutomationUtil.hitTest(focus.root, pos) || focus; |
| 310 if (focus != focus.root) | 310 if (focus != focus.root) |
| 311 o.format('$name', focus.root); | 311 o.format('$name', focus.root); |
| 312 } | 312 } |
| 313 } | 313 } |
| 314 ChromeVoxState.instance.setCurrentRange(cursors.Range.fromNode(focus)); | 314 ChromeVoxState.instance.setCurrentRange(cursors.Range.fromNode(focus)); |
| 315 if (!this.shouldOutput_(evt)) | 315 if (!this.shouldOutput_(evt)) |
| 316 return; | 316 return; |
| 317 |
| 318 Output.forceModeForNextSpeechUtterance(cvox.QueueMode.FLUSH); |
| 317 o.withRichSpeechAndBraille( | 319 o.withRichSpeechAndBraille( |
| 318 ChromeVoxState.instance.currentRange, null, evt.type).go(); | 320 ChromeVoxState.instance.currentRange, null, evt.type).go(); |
| 319 }.bind(this)); | 321 }.bind(this)); |
| 320 }, | 322 }, |
| 321 | 323 |
| 322 /** | 324 /** |
| 323 * Provides all feedback once a text changed event fires. | 325 * Provides all feedback once a text changed event fires. |
| 324 * @param {!AutomationEvent} evt | 326 * @param {!AutomationEvent} evt |
| 325 */ | 327 */ |
| 326 onTextChanged: function(evt) { | 328 onTextChanged: function(evt) { |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 DesktopAutomationHandler.init_ = function() { | 508 DesktopAutomationHandler.init_ = function() { |
| 507 chrome.automation.getDesktop(function(desktop) { | 509 chrome.automation.getDesktop(function(desktop) { |
| 508 ChromeVoxState.desktopAutomationHandler = | 510 ChromeVoxState.desktopAutomationHandler = |
| 509 new DesktopAutomationHandler(desktop); | 511 new DesktopAutomationHandler(desktop); |
| 510 }); | 512 }); |
| 511 }; | 513 }; |
| 512 | 514 |
| 513 DesktopAutomationHandler.init_(); | 515 DesktopAutomationHandler.init_(); |
| 514 | 516 |
| 515 }); // goog.scope | 517 }); // goog.scope |
| OLD | NEW |