| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 this.onEventDefault( | 152 this.onEventDefault( |
| 153 /** @type {!AutomationEvent} */ | 153 /** @type {!AutomationEvent} */ |
| 154 ({target: node, type: chrome.automation.EventType.focus})); | 154 ({target: node, type: chrome.automation.EventType.focus})); |
| 155 }, | 155 }, |
| 156 | 156 |
| 157 /** | 157 /** |
| 158 * Provides all feedback once a load complete event fires. | 158 * Provides all feedback once a load complete event fires. |
| 159 * @param {Object} evt | 159 * @param {Object} evt |
| 160 */ | 160 */ |
| 161 onLoadComplete: function(evt) { | 161 onLoadComplete: function(evt) { |
| 162 if (evt.target.docUrl.indexOf( | |
| 163 'chrome-extension://mndnfokpggljbaajbnioimlmbfngpief/' + | |
| 164 'cvox2/background/panel.html') == 0) | |
| 165 return; | |
| 166 ChromeVoxState.instance.refreshMode(evt.target.docUrl); | 162 ChromeVoxState.instance.refreshMode(evt.target.docUrl); |
| 167 | 163 |
| 168 // Don't process nodes inside of web content if ChromeVox Next is inactive. | 164 // Don't process nodes inside of web content if ChromeVox Next is inactive. |
| 169 if (evt.target.root.role != RoleType.desktop && | 165 if (evt.target.root.role != RoleType.desktop && |
| 170 ChromeVoxState.instance.mode === ChromeVoxMode.CLASSIC) | 166 ChromeVoxState.instance.mode === ChromeVoxMode.CLASSIC) |
| 171 return; | 167 return; |
| 172 | 168 |
| 173 // If initial focus was already placed on this page (e.g. if a user starts | 169 // If initial focus was already placed on this page (e.g. if a user starts |
| 174 // tabbing before load complete), then don't move ChromeVox's position on | 170 // tabbing before load complete), then don't move ChromeVox's position on |
| 175 // the page. | 171 // the page. |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 if (cvox.ChromeVox.isMac) | 290 if (cvox.ChromeVox.isMac) |
| 295 return; | 291 return; |
| 296 chrome.automation.getDesktop(function(desktop) { | 292 chrome.automation.getDesktop(function(desktop) { |
| 297 global.desktopAutomationHandler = new DesktopAutomationHandler(desktop); | 293 global.desktopAutomationHandler = new DesktopAutomationHandler(desktop); |
| 298 }); | 294 }); |
| 299 }; | 295 }; |
| 300 | 296 |
| 301 DesktopAutomationHandler.init_(); | 297 DesktopAutomationHandler.init_(); |
| 302 | 298 |
| 303 }); // goog.scope | 299 }); // goog.scope |
| OLD | NEW |