| 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 Common page for reading and writing preferences from | 6 * @fileoverview Common page for reading and writing preferences from |
| 7 * the background context (background page or options page). | 7 * the background context (background page or options page). |
| 8 * | 8 * |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 'position': '{}', | 72 'position': '{}', |
| 73 'siteSpecificScriptBase': | 73 'siteSpecificScriptBase': |
| 74 'https://ssl.gstatic.com/accessibility/javascript/ext/', | 74 'https://ssl.gstatic.com/accessibility/javascript/ext/', |
| 75 'siteSpecificScriptLoader': | 75 'siteSpecificScriptLoader': |
| 76 'https://ssl.gstatic.com/accessibility/javascript/ext/loader.js', | 76 'https://ssl.gstatic.com/accessibility/javascript/ext/loader.js', |
| 77 'sticky': false, | 77 'sticky': false, |
| 78 'typingEcho': 0, | 78 'typingEcho': 0, |
| 79 'useIBeamCursor': cvox.ChromeVox.isMac, | 79 'useIBeamCursor': cvox.ChromeVox.isMac, |
| 80 'useVerboseMode': true, | 80 'useVerboseMode': true, |
| 81 'siteSpecificEnhancements': true, | 81 'siteSpecificEnhancements': true, |
| 82 'useNext': false | 82 'useNext': true |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 | 85 |
| 86 /** | 86 /** |
| 87 * Merge the default values of all known prefs with what's found in | 87 * Merge the default values of all known prefs with what's found in |
| 88 * localStorage. | 88 * localStorage. |
| 89 * @param {boolean} pullFromLocalStorage or not to pull prefs from local | 89 * @param {boolean} pullFromLocalStorage or not to pull prefs from local |
| 90 * storage. True if we want to respect changes the user has already made | 90 * storage. True if we want to respect changes the user has already made |
| 91 * to prefs, false if we want to overwrite them. Set false if we've made | 91 * to prefs, false if we want to overwrite them. Set false if we've made |
| 92 * changes to keyboard shortcuts and need to make sure they aren't | 92 * changes to keyboard shortcuts and need to make sure they aren't |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 * @return {boolean} True if the key was bound to the command. | 230 * @return {boolean} True if the key was bound to the command. |
| 231 */ | 231 */ |
| 232 cvox.ChromeVoxPrefs.prototype.setKey = function(command, newKey) { | 232 cvox.ChromeVoxPrefs.prototype.setKey = function(command, newKey) { |
| 233 if (this.keyMap_.rebind(command, newKey)) { | 233 if (this.keyMap_.rebind(command, newKey)) { |
| 234 this.keyMap_.toLocalStorage(); | 234 this.keyMap_.toLocalStorage(); |
| 235 this.sendPrefsToAllTabs(false, true); | 235 this.sendPrefsToAllTabs(false, true); |
| 236 return true; | 236 return true; |
| 237 } | 237 } |
| 238 return false; | 238 return false; |
| 239 }; | 239 }; |
| OLD | NEW |