| 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 * childUser: (boolean|undefined), | 9 * childUser: (boolean|undefined), |
| 10 * hasError: (boolean|undefined), | 10 * hasError: (boolean|undefined), |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 | 400 |
| 401 // Date and time section (CrOS only). | 401 // Date and time section (CrOS only). |
| 402 if (cr.isChromeOS) { | 402 if (cr.isChromeOS) { |
| 403 if ($('set-time-button')) | 403 if ($('set-time-button')) |
| 404 $('set-time-button').onclick = this.handleSetTime_.bind(this); | 404 $('set-time-button').onclick = this.handleSetTime_.bind(this); |
| 405 | 405 |
| 406 // Timezone | 406 // Timezone |
| 407 if (loadTimeData.getBoolean('enableTimeZoneTrackingOption')) { | 407 if (loadTimeData.getBoolean('enableTimeZoneTrackingOption')) { |
| 408 $('resolve-timezone-by-geolocation-selection').hidden = false; | 408 $('resolve-timezone-by-geolocation-selection').hidden = false; |
| 409 this.setSystemTimezoneManaged_(false); | 409 this.setSystemTimezoneManaged_(false); |
| 410 $('timezone-value-select').disabled = loadTimeData.getBoolean( |
| 411 'resolveTimezoneByGeolocationInitialValue'); |
| 410 } | 412 } |
| 411 } | 413 } |
| 412 | 414 |
| 413 // Default browser section. | 415 // Default browser section. |
| 414 if (!cr.isChromeOS) { | 416 if (!cr.isChromeOS) { |
| 415 if (!loadTimeData.getBoolean('showSetDefault')) { | 417 if (!loadTimeData.getBoolean('showSetDefault')) { |
| 416 $('set-default-browser-section').hidden = true; | 418 $('set-default-browser-section').hidden = true; |
| 417 } | 419 } |
| 418 $('set-as-default-browser').onclick = function(event) { | 420 $('set-as-default-browser').onclick = function(event) { |
| 419 chrome.send('becomeDefaultBrowser'); | 421 chrome.send('becomeDefaultBrowser'); |
| (...skipping 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2106 $('profiles-supervised-dashboard-tip').hidden; | 2108 $('profiles-supervised-dashboard-tip').hidden; |
| 2107 }, | 2109 }, |
| 2108 | 2110 |
| 2109 /** | 2111 /** |
| 2110 * Updates the date and time section with time sync information. | 2112 * Updates the date and time section with time sync information. |
| 2111 * @param {boolean} canSetTime Whether the system time can be set. | 2113 * @param {boolean} canSetTime Whether the system time can be set. |
| 2112 * @private | 2114 * @private |
| 2113 */ | 2115 */ |
| 2114 setCanSetTime_: function(canSetTime) { | 2116 setCanSetTime_: function(canSetTime) { |
| 2115 // If the time has been network-synced, it cannot be set manually. | 2117 // If the time has been network-synced, it cannot be set manually. |
| 2116 $('time-synced-explanation').hidden = canSetTime; | |
| 2117 $('set-time').hidden = !canSetTime; | 2118 $('set-time').hidden = !canSetTime; |
| 2118 }, | 2119 }, |
| 2119 | 2120 |
| 2120 /** | 2121 /** |
| 2121 * Handle the 'set date and time' button click. | 2122 * Handle the 'set date and time' button click. |
| 2122 * @private | 2123 * @private |
| 2123 */ | 2124 */ |
| 2124 handleSetTime_: function() { | 2125 handleSetTime_: function() { |
| 2125 chrome.send('showSetTime'); | 2126 chrome.send('showSetTime'); |
| 2126 }, | 2127 }, |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2185 'setHotwordRetrainLinkVisible', | 2186 'setHotwordRetrainLinkVisible', |
| 2186 'setNativeThemeButtonEnabled', | 2187 'setNativeThemeButtonEnabled', |
| 2187 'setNetworkPredictionValue', | 2188 'setNetworkPredictionValue', |
| 2188 'setNowSectionVisible', | 2189 'setNowSectionVisible', |
| 2189 'setHighContrastCheckboxState', | 2190 'setHighContrastCheckboxState', |
| 2190 'setAllHotwordSectionsVisible', | 2191 'setAllHotwordSectionsVisible', |
| 2191 'setMetricsReportingCheckboxState', | 2192 'setMetricsReportingCheckboxState', |
| 2192 'setMetricsReportingSettingVisibility', | 2193 'setMetricsReportingSettingVisibility', |
| 2193 'setProfilesInfo', | 2194 'setProfilesInfo', |
| 2194 'setSpokenFeedbackCheckboxState', | 2195 'setSpokenFeedbackCheckboxState', |
| 2196 'setSystemTimezoneManaged', |
| 2195 'setThemesResetButtonEnabled', | 2197 'setThemesResetButtonEnabled', |
| 2196 'setVirtualKeyboardCheckboxState', | 2198 'setVirtualKeyboardCheckboxState', |
| 2197 'setupPageZoomSelector', | 2199 'setupPageZoomSelector', |
| 2198 'setupProxySettingsButton', | 2200 'setupProxySettingsButton', |
| 2199 'setAudioHistorySectionVisible', | 2201 'setAudioHistorySectionVisible', |
| 2200 'showBluetoothSettings', | 2202 'showBluetoothSettings', |
| 2201 'showCreateProfileError', | 2203 'showCreateProfileError', |
| 2202 'showCreateProfileSuccess', | 2204 'showCreateProfileSuccess', |
| 2203 'showCreateProfileWarning', | 2205 'showCreateProfileWarning', |
| 2204 'showHotwordAlwaysOnSection', | 2206 'showHotwordAlwaysOnSection', |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2264 } | 2266 } |
| 2265 button.textContent = loadTimeData.getString(strId); | 2267 button.textContent = loadTimeData.getString(strId); |
| 2266 }; | 2268 }; |
| 2267 } | 2269 } |
| 2268 | 2270 |
| 2269 // Export | 2271 // Export |
| 2270 return { | 2272 return { |
| 2271 BrowserOptions: BrowserOptions | 2273 BrowserOptions: BrowserOptions |
| 2272 }; | 2274 }; |
| 2273 }); | 2275 }); |
| OLD | NEW |