OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 Script that runs on the background page. | 6 * @fileoverview Script that runs on the background page. |
7 */ | 7 */ |
8 | 8 |
9 goog.provide('cvox.ChromeVoxBackground'); | 9 goog.provide('cvox.ChromeVoxBackground'); |
10 | 10 |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 | 153 |
154 this.tabsApiHandler_ = new cvox.TabsApiHandler(); | 154 this.tabsApiHandler_ = new cvox.TabsApiHandler(); |
155 | 155 |
156 // Export globals on cvox.ChromeVox. | 156 // Export globals on cvox.ChromeVox. |
157 cvox.ChromeVox.tts = this.tts; | 157 cvox.ChromeVox.tts = this.tts; |
158 cvox.ChromeVox.braille = this.backgroundBraille_; | 158 cvox.ChromeVox.braille = this.backgroundBraille_; |
159 | 159 |
160 if (!cvox.ChromeVox.earcons) | 160 if (!cvox.ChromeVox.earcons) |
161 cvox.ChromeVox.earcons = new cvox.ClassicEarcons(); | 161 cvox.ChromeVox.earcons = new cvox.ClassicEarcons(); |
162 | 162 |
163 if (cvox.ChromeVox.isChromeOS && | 163 if (cvox.ChromeVox.isChromeOS) { |
164 chrome.accessibilityPrivate.onIntroduceChromeVox) { | |
165 chrome.accessibilityPrivate.onIntroduceChromeVox.addListener( | 164 chrome.accessibilityPrivate.onIntroduceChromeVox.addListener( |
166 this.onIntroduceChromeVox); | 165 this.onIntroduceChromeVox); |
167 } | 166 } |
168 | 167 |
169 // Set up a message passing system for goog.provide() calls from | 168 // Set up a message passing system for goog.provide() calls from |
170 // within the content scripts. | 169 // within the content scripts. |
171 chrome.extension.onMessage.addListener( | 170 chrome.extension.onMessage.addListener( |
172 function(request, sender, callback) { | 171 function(request, sender, callback) { |
173 if (request['srcFile']) { | 172 if (request['srcFile']) { |
174 var srcFile = request['srcFile']; | 173 var srcFile = request['srcFile']; |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 window['braille_translator_manager'] = | 491 window['braille_translator_manager'] = |
493 background.backgroundBraille_.getTranslatorManager(); | 492 background.backgroundBraille_.getTranslatorManager(); |
494 | 493 |
495 window['getCurrentVoice'] = | 494 window['getCurrentVoice'] = |
496 background.getCurrentVoice.bind(background); | 495 background.getCurrentVoice.bind(background); |
497 | 496 |
498 // Export injection for ChromeVox Next. | 497 // Export injection for ChromeVox Next. |
499 cvox.ChromeVox.injectChromeVoxIntoTabs = | 498 cvox.ChromeVox.injectChromeVoxIntoTabs = |
500 background.injectChromeVoxIntoTabs.bind(background); | 499 background.injectChromeVoxIntoTabs.bind(background); |
501 })(); | 500 })(); |
OLD | NEW |