| 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 1750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1784 div.innerHTML = docFrag.firstChild.innerHTML; | 1788 div.innerHTML = docFrag.firstChild.innerHTML; |
| 1785 | 1789 |
| 1786 // Wire up the button to disable the right extension. | 1790 // Wire up the button to disable the right extension. |
| 1787 var button = div.nextElementSibling; | 1791 var button = div.nextElementSibling; |
| 1788 button.dataset.extensionId = extensionId; | 1792 button.dataset.extensionId = extensionId; |
| 1789 }, | 1793 }, |
| 1790 | 1794 |
| 1791 /** | 1795 /** |
| 1792 * Toggles the warning boxes that show which extension is controlling | 1796 * Toggles the warning boxes that show which extension is controlling |
| 1793 * various settings of Chrome. | 1797 * various settings of Chrome. |
| 1794 * @param {object} details A dictionary of ID+name pairs for each of the | 1798 * @param {{searchEngine: options.ExtensionData, |
| 1795 * settings controlled by an extension. | 1799 * homePage: options.ExtensionData, |
| 1800 * startUpPage: options.ExtensionData, |
| 1801 * newTabPage: options.ExtensionData, |
| 1802 * proxy: options.ExtensionData}} details A dictionary of ID+name |
| 1803 * pairs for each of the settings controlled by an extension. |
| 1796 * @private | 1804 * @private |
| 1797 */ | 1805 */ |
| 1798 toggleExtensionIndicators_: function(details) { | 1806 toggleExtensionIndicators_: function(details) { |
| 1799 this.toggleExtensionControlledBox_('search-section-content', | 1807 this.toggleExtensionControlledBox_('search-section-content', |
| 1800 'search-engine-controlled', | 1808 'search-engine-controlled', |
| 1801 details.searchEngine.id, | 1809 details.searchEngine.id, |
| 1802 details.searchEngine.name); | 1810 details.searchEngine.name); |
| 1803 this.toggleExtensionControlledBox_('extension-controlled-container', | 1811 this.toggleExtensionControlledBox_('extension-controlled-container', |
| 1804 'homepage-controlled', | 1812 'homepage-controlled', |
| 1805 details.homePage.id, | 1813 details.homePage.id, |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2058 } | 2066 } |
| 2059 button.textContent = loadTimeData.getString(strId); | 2067 button.textContent = loadTimeData.getString(strId); |
| 2060 }; | 2068 }; |
| 2061 } | 2069 } |
| 2062 | 2070 |
| 2063 // Export | 2071 // Export |
| 2064 return { | 2072 return { |
| 2065 BrowserOptions: BrowserOptions | 2073 BrowserOptions: BrowserOptions |
| 2066 }; | 2074 }; |
| 2067 }); | 2075 }); |
| OLD | NEW |