Chromium Code Reviews| Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js |
| diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js |
| index c1645450668f531338d36505d77edf2ba4e6fb1a..92c4a3d74377aa18a960d9b8f09027c4adee0939 100644 |
| --- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js |
| +++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js |
| @@ -63,7 +63,7 @@ DesktopAutomationHandler.prototype = { |
| var prevRange = global.backgroundObj.currentRange; |
| - global.backgroundObj.currentRange = cursors.Range.fromNode(node); |
| + global.backgroundObj.setCurrentRange(cursors.Range.fromNode(node)); |
|
David Tseng
2015/11/23 23:23:57
Chang this to ChromeVoxState.
dmazzoni
2015/11/23 23:51:02
Should Background pass ChromeVoxState to the Deskt
dmazzoni
2015/11/30 22:00:47
OK, I made ChromeVoxState a singleton for now beca
|
| // Check to see if we've crossed roots. Continue if we've crossed roots or |
| // are not within web content. |
| @@ -182,7 +182,7 @@ DesktopAutomationHandler.prototype = { |
| AutomationPredicate.leaf); |
| if (node) |
| - global.backgroundObj.currentRange = cursors.Range.fromNode(node); |
| + global.backgroundObj.setCurrentRange(cursors.Range.fromNode(node)); |
| if (global.backgroundObj.currentRange) |
| new Output().withSpeechAndBraille( |
| @@ -208,7 +208,7 @@ DesktopAutomationHandler.prototype = { |
| if (!global.backgroundObj.currentRange) { |
| this.onEventDefault(evt); |
| - global.backgroundObj.currentRange = cursors.Range.fromNode(evt.target); |
| + global.backgroundObj.setCurrentRange(cursors.Range.fromNode(evt.target)); |
| } |
| this.createEditableTextHandlerIfNeeded_(evt.target); |
| @@ -242,7 +242,7 @@ DesktopAutomationHandler.prototype = { |
| // Value change events fire on web editables when typing. Suppress them. |
| if (!global.backgroundObj.currentRange || !this.isEditable_(evt.target)) { |
| this.onEventDefault(evt); |
| - global.backgroundObj.currentRange = cursors.Range.fromNode(evt.target); |
| + global.backgroundObj.setCurrentRange(cursors.Range.fromNode(evt.target)); |
| } |
| }, |