| 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 The entry point for all ChromeVox2 related code for the | 6 * @fileoverview The entry point for all ChromeVox2 related code for the |
| 7 * background page. | 7 * background page. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 goog.provide('cvox2.Background'); | 10 goog.provide('cvox2.Background'); |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 for (var eventType in this.listeners_) { | 279 for (var eventType in this.listeners_) { |
| 280 this.current_.root.removeEventListener( | 280 this.current_.root.removeEventListener( |
| 281 eventType, this.listeners_[eventType], true); | 281 eventType, this.listeners_[eventType], true); |
| 282 } | 282 } |
| 283 } | 283 } |
| 284 this.active_ = false; | 284 this.active_ = false; |
| 285 } | 285 } |
| 286 | 286 |
| 287 chrome.tabs.query({active: true}, function(tabs) { | 287 chrome.tabs.query({active: true}, function(tabs) { |
| 288 if (opt_options.classic) { | 288 if (opt_options.classic) { |
| 289 cvox.ChromeVox.injectChromeVoxIntoTabs(tabs, true); | 289 cvox.ChromeVox.injectChromeVoxIntoTabs(tabs); |
| 290 } else { | 290 } else { |
| 291 tabs.forEach(function(tab) { | 291 tabs.forEach(function(tab) { |
| 292 this.disableClassicChromeVox_(tab.id); | 292 this.disableClassicChromeVox_(tab.id); |
| 293 }.bind(this)); | 293 }.bind(this)); |
| 294 } | 294 } |
| 295 }.bind(this)); | 295 }.bind(this)); |
| 296 } | 296 } |
| 297 }; | 297 }; |
| 298 | 298 |
| 299 /** @type {cvox2.Background} */ | 299 /** @type {cvox2.Background} */ |
| 300 cvox2.global.backgroundObj = new cvox2.Background(); | 300 cvox2.global.backgroundObj = new cvox2.Background(); |
| 301 | 301 |
| 302 }); // goog.scope | 302 }); // goog.scope |
| OLD | NEW |