| 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('Background'); | 10 goog.provide('Background'); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 }); | 107 }); |
| 108 | 108 |
| 109 if (cvox.ChromeVox.isChromeOS) { | 109 if (cvox.ChromeVox.isChromeOS) { |
| 110 Object.defineProperty(cvox.ChromeVox, 'modKeyStr', { | 110 Object.defineProperty(cvox.ChromeVox, 'modKeyStr', { |
| 111 get: function() { | 111 get: function() { |
| 112 return (this.mode == ChromeVoxMode.CLASSIC || | 112 return (this.mode == ChromeVoxMode.CLASSIC || |
| 113 this.mode == ChromeVoxMode.COMPAT) ? | 113 this.mode == ChromeVoxMode.COMPAT) ? |
| 114 'Search+Shift' : 'Search'; | 114 'Search+Shift' : 'Search'; |
| 115 }.bind(this) | 115 }.bind(this) |
| 116 }); | 116 }); |
| 117 |
| 118 Object.defineProperty(cvox.ChromeVox, 'typingEcho', { |
| 119 get: function() { |
| 120 return parseInt(localStorage['typingEcho'], 10); |
| 121 }.bind(this), |
| 122 set: function(v) { |
| 123 localStorage['typingEcho'] = v; |
| 124 }.bind(this) |
| 125 }); |
| 117 } | 126 } |
| 118 | 127 |
| 119 Object.defineProperty(cvox.ChromeVox, 'isActive', { | 128 Object.defineProperty(cvox.ChromeVox, 'isActive', { |
| 120 get: function() { | 129 get: function() { |
| 121 return localStorage['active'] !== 'false'; | 130 return localStorage['active'] !== 'false'; |
| 122 }, | 131 }, |
| 123 set: function(value) { | 132 set: function(value) { |
| 124 localStorage['active'] = value; | 133 localStorage['active'] = value; |
| 125 } | 134 } |
| 126 }); | 135 }); |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 return new RegExp('^(' + globs.map(function(glob) { | 762 return new RegExp('^(' + globs.map(function(glob) { |
| 754 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&') | 763 return glob.replace(/[.+^$(){}|[\]\\]/g, '\\$&') |
| 755 .replace(/\*/g, '.*') | 764 .replace(/\*/g, '.*') |
| 756 .replace(/\?/g, '.'); | 765 .replace(/\?/g, '.'); |
| 757 }).join('|') + ')$'); | 766 }).join('|') + ')$'); |
| 758 }; | 767 }; |
| 759 | 768 |
| 760 new Background(); | 769 new Background(); |
| 761 | 770 |
| 762 }); // goog.scope | 771 }); // goog.scope |
| OLD | NEW |