Chromium Code Reviews| Index: chrome/browser/resources/options/browser_options.js |
| diff --git a/chrome/browser/resources/options/browser_options.js b/chrome/browser/resources/options/browser_options.js |
| index 2dbfc5d0d5b7bee16236aa53c61d34a34429146d..fb8c6af246bfc8f04e5aad13ab837e26ec1df47d 100644 |
| --- a/chrome/browser/resources/options/browser_options.js |
| +++ b/chrome/browser/resources/options/browser_options.js |
| @@ -387,6 +387,13 @@ cr.define('options', function() { |
| if ($('set-time-button')) |
| $('set-time-button').onclick = this.handleSetTime_.bind(this); |
| + // Timezone |
| + if (loadTimeData.getBoolean('enableTimeZoneTrackingOption') && |
| + cr.isChromeOS) { |
|
stevenjb
2015/01/05 17:34:21
The entire 'Date and time section' is CrOS only, s
Alexander Alekseev
2015/01/15 18:59:02
Done.
|
| + $('resolve-timezone-by-geolocation-selection').hidden = false; |
| + this.setSystemTimezoneManaged_(false); |
| + } |
| + |
| // Default browser section. |
| if (!cr.isChromeOS) { |
| if (!loadTimeData.getBoolean('showSetDefault')) { |
| @@ -1613,6 +1620,26 @@ cr.define('options', function() { |
| }, |
| /** |
| + * @param {boolean} managed |
| + */ |
| + setSystemTimezoneManaged_: function(managed) { |
| + if (loadTimeData.getBoolean('enableTimeZoneTrackingOption')) { |
| + if (managed) { |
| + $('resolve-timezone-by-geolocation-selection').disabled = true; |
| + $('resolve-timezone-by-geolocation').onclick = function(event) {}; |
| + } else { |
| + this.enableElementIfPossible_( |
| + getRequiredElement('resolve-timezone-by-geolocation-selection')); |
| + $('resolve-timezone-by-geolocation').onclick = function(event) { |
| + $('timezone-value-select').disabled = event.currentTarget.checked; |
| + }; |
| + $('timezone-value-select').disabled = |
| + $('resolve-timezone-by-geolocation').checked; |
| + } |
| + } |
| + }, |
| + |
| + /** |
| * Handle the 'add device' button click. |
| * @private |
| */ |