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, | |
25 * name: string}} | |
Dan Beam
2014/09/16 01:19:10
nit: /** @typedef {{id: string, name: string}} */
Vitaly Pavlenko
2014/09/16 03:36:55
Done.
| |
26 */ | |
27 options.ExtensionData; | |
28 | |
24 cr.define('options', function() { | 29 cr.define('options', function() { |
25 var OptionsPage = options.OptionsPage; | 30 var OptionsPage = options.OptionsPage; |
26 var Page = cr.ui.pageManager.Page; | 31 var Page = cr.ui.pageManager.Page; |
27 var PageManager = cr.ui.pageManager.PageManager; | 32 var PageManager = cr.ui.pageManager.PageManager; |
28 var ArrayDataModel = cr.ui.ArrayDataModel; | 33 var ArrayDataModel = cr.ui.ArrayDataModel; |
29 var RepeatingButton = cr.ui.RepeatingButton; | 34 var RepeatingButton = cr.ui.RepeatingButton; |
30 var HotwordSearchSettingIndicator = options.HotwordSearchSettingIndicator; | 35 var HotwordSearchSettingIndicator = options.HotwordSearchSettingIndicator; |
31 var NetworkPredictionOptions = { | 36 var NetworkPredictionOptions = { |
32 ALWAYS: 0, | 37 ALWAYS: 0, |
33 WIFI_ONLY: 1, | 38 WIFI_ONLY: 1, |
(...skipping 1711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1745 div.innerHTML = docFrag.firstChild.innerHTML; | 1750 div.innerHTML = docFrag.firstChild.innerHTML; |
1746 | 1751 |
1747 // Wire up the button to disable the right extension. | 1752 // Wire up the button to disable the right extension. |
1748 var button = div.nextElementSibling; | 1753 var button = div.nextElementSibling; |
1749 button.dataset.extensionId = extensionId; | 1754 button.dataset.extensionId = extensionId; |
1750 }, | 1755 }, |
1751 | 1756 |
1752 /** | 1757 /** |
1753 * Toggles the warning boxes that show which extension is controlling | 1758 * Toggles the warning boxes that show which extension is controlling |
1754 * various settings of Chrome. | 1759 * various settings of Chrome. |
1755 * @param {object} details A dictionary of ID+name pairs for each of the | 1760 * @param {{searchEngine: options.ExtensionData, |
1756 * settings controlled by an extension. | 1761 * homePage: options.ExtensionData, |
1762 * startUpPage: options.ExtensionData, | |
1763 * newTabPage: options.ExtensionData, | |
1764 * proxy: options.ExtensionData}} details A dictionary of ID+name | |
1765 * pairs for each of the settings controlled by an extension. | |
1757 * @private | 1766 * @private |
1758 */ | 1767 */ |
1759 toggleExtensionIndicators_: function(details) { | 1768 toggleExtensionIndicators_: function(details) { |
1760 this.toggleExtensionControlledBox_('search-section-content', | 1769 this.toggleExtensionControlledBox_('search-section-content', |
1761 'search-engine-controlled', | 1770 'search-engine-controlled', |
1762 details.searchEngine.id, | 1771 details.searchEngine.id, |
1763 details.searchEngine.name); | 1772 details.searchEngine.name); |
1764 this.toggleExtensionControlledBox_('extension-controlled-container', | 1773 this.toggleExtensionControlledBox_('extension-controlled-container', |
1765 'homepage-controlled', | 1774 'homepage-controlled', |
1766 details.homePage.id, | 1775 details.homePage.id, |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2018 } | 2027 } |
2019 button.textContent = loadTimeData.getString(strId); | 2028 button.textContent = loadTimeData.getString(strId); |
2020 }; | 2029 }; |
2021 } | 2030 } |
2022 | 2031 |
2023 // Export | 2032 // Export |
2024 return { | 2033 return { |
2025 BrowserOptions: BrowserOptions | 2034 BrowserOptions: BrowserOptions |
2026 }; | 2035 }; |
2027 }); | 2036 }); |
OLD | NEW |