| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 cr.exportPath('options'); | 5 cr.exportPath('options'); |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * @typedef {{actionLinkText: (string|undefined), | 8 * @typedef {{actionLinkText: (string|undefined), |
| 9 * hasError: (boolean|undefined), | 9 * hasError: (boolean|undefined), |
| 10 * hasUnrecoverableError: (boolean|undefined), | 10 * hasUnrecoverableError: (boolean|undefined), |
| 11 * managed: (boolean|undefined), | 11 * managed: (boolean|undefined), |
| 12 * setupCompleted: (boolean|undefined), | 12 * setupCompleted: (boolean|undefined), |
| 13 * setupInProgress: (boolean|undefined), | 13 * setupInProgress: (boolean|undefined), |
| 14 * signedIn: (boolean|undefined), | 14 * signedIn: (boolean|undefined), |
| 15 * signinAllowed: (boolean|undefined), | |
| 16 * signinAllowed: boolean, | 15 * signinAllowed: boolean, |
| 17 * signoutAllowed: (boolean|undefined), | 16 * signoutAllowed: (boolean|undefined), |
| 18 * statusText: (string|undefined), | 17 * statusText: (string|undefined), |
| 19 * syncSystemEnabled: (boolean|undefined)}} | 18 * syncSystemEnabled: (boolean|undefined)}} |
| 20 * @see chrome/browser/ui/webui/options/browser_options_handler.cc | 19 * @see chrome/browser/ui/webui/options/browser_options_handler.cc |
| 21 */ | 20 */ |
| 22 options.SyncStatus; | 21 options.SyncStatus; |
| 23 | 22 |
| 23 /** |
| 24 * @typedef {{id: string, name: string}} |
| 25 */ |
| 26 options.ExtensionData; |
| 27 |
| 24 cr.define('options', function() { | 28 cr.define('options', function() { |
| 25 var OptionsPage = options.OptionsPage; | 29 var OptionsPage = options.OptionsPage; |
| 26 var Page = cr.ui.pageManager.Page; | 30 var Page = cr.ui.pageManager.Page; |
| 27 var PageManager = cr.ui.pageManager.PageManager; | 31 var PageManager = cr.ui.pageManager.PageManager; |
| 28 var ArrayDataModel = cr.ui.ArrayDataModel; | 32 var ArrayDataModel = cr.ui.ArrayDataModel; |
| 29 var RepeatingButton = cr.ui.RepeatingButton; | 33 var RepeatingButton = cr.ui.RepeatingButton; |
| 30 var HotwordSearchSettingIndicator = options.HotwordSearchSettingIndicator; | 34 var HotwordSearchSettingIndicator = options.HotwordSearchSettingIndicator; |
| 31 var NetworkPredictionOptions = { | 35 var NetworkPredictionOptions = { |
| 32 ALWAYS: 0, | 36 ALWAYS: 0, |
| 33 WIFI_ONLY: 1, | 37 WIFI_ONLY: 1, |
| (...skipping 1711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1745 div.innerHTML = docFrag.firstChild.innerHTML; | 1749 div.innerHTML = docFrag.firstChild.innerHTML; |
| 1746 | 1750 |
| 1747 // Wire up the button to disable the right extension. | 1751 // Wire up the button to disable the right extension. |
| 1748 var button = div.nextElementSibling; | 1752 var button = div.nextElementSibling; |
| 1749 button.dataset.extensionId = extensionId; | 1753 button.dataset.extensionId = extensionId; |
| 1750 }, | 1754 }, |
| 1751 | 1755 |
| 1752 /** | 1756 /** |
| 1753 * Toggles the warning boxes that show which extension is controlling | 1757 * Toggles the warning boxes that show which extension is controlling |
| 1754 * various settings of Chrome. | 1758 * various settings of Chrome. |
| 1755 * @param {object} details A dictionary of ID+name pairs for each of the | 1759 * @param {{searchEngine: options.ExtensionData, |
| 1756 * settings controlled by an extension. | 1760 * homePage: options.ExtensionData, |
| 1761 * startUpPage: options.ExtensionData, |
| 1762 * newTabPage: options.ExtensionData, |
| 1763 * proxy: options.ExtensionData}} details A dictionary of ID+name |
| 1764 * pairs for each of the settings controlled by an extension. |
| 1757 * @private | 1765 * @private |
| 1758 */ | 1766 */ |
| 1759 toggleExtensionIndicators_: function(details) { | 1767 toggleExtensionIndicators_: function(details) { |
| 1760 this.toggleExtensionControlledBox_('search-section-content', | 1768 this.toggleExtensionControlledBox_('search-section-content', |
| 1761 'search-engine-controlled', | 1769 'search-engine-controlled', |
| 1762 details.searchEngine.id, | 1770 details.searchEngine.id, |
| 1763 details.searchEngine.name); | 1771 details.searchEngine.name); |
| 1764 this.toggleExtensionControlledBox_('extension-controlled-container', | 1772 this.toggleExtensionControlledBox_('extension-controlled-container', |
| 1765 'homepage-controlled', | 1773 'homepage-controlled', |
| 1766 details.homePage.id, | 1774 details.homePage.id, |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2018 } | 2026 } |
| 2019 button.textContent = loadTimeData.getString(strId); | 2027 button.textContent = loadTimeData.getString(strId); |
| 2020 }; | 2028 }; |
| 2021 } | 2029 } |
| 2022 | 2030 |
| 2023 // Export | 2031 // Export |
| 2024 return { | 2032 return { |
| 2025 BrowserOptions: BrowserOptions | 2033 BrowserOptions: BrowserOptions |
| 2026 }; | 2034 }; |
| 2027 }); | 2035 }); |
| OLD | NEW |