Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(522)

Side by Side Diff: chrome/browser/resources/options/browser_options.js

Issue 944593002: ChromeOS: Update browser option UI for automatic timezone detection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 391
392 if ($('themes-native-button')) { 392 if ($('themes-native-button')) {
393 $('themes-native-button').onclick = function(event) { 393 $('themes-native-button').onclick = function(event) {
394 chrome.send('themesSetNative'); 394 chrome.send('themesSetNative');
395 }; 395 };
396 } 396 }
397 } 397 }
398 398
399 // Date and time section (CrOS only). 399 // Date and time section (CrOS only).
400 if (cr.isChromeOS) { 400 if (cr.isChromeOS) {
401 if ($('set-time-button')) 401 if ($('set-time-button'))
michaelpg 2015/02/24 13:04:39 by the way, this check is redundant now
Alexander Alekseev 2015/02/25 20:39:41 Why? It seems I haven't changed its behavior.
michaelpg 2015/02/27 18:12:29 True, I think the outer if statement had been adde
402 $('set-time-button').onclick = this.handleSetTime_.bind(this); 402 $('set-time-button').onclick = this.handleSetTime_.bind(this);
403 403
404 // Timezone 404 // Timezone
405 if (loadTimeData.getBoolean('enableTimeZoneTrackingOption')) { 405 if (loadTimeData.getBoolean('enableTimeZoneTrackingOption')) {
406 $('resolve-timezone-by-geolocation-selection').hidden = false; 406 $('resolve-timezone-by-geolocation-selection').hidden = false;
407 this.setSystemTimezoneManaged_(false); 407 this.setSystemTimezoneManaged_(false);
408 $('timezone-value-select').disabled = loadTimeData.getBoolean(
michaelpg 2015/02/19 22:38:36 Do we re-enable this dropdown if I uncheck the res
Alexander Alekseev 2015/02/19 22:41:55 Yes. See setSystemTimezoneManaged() code.
michaelpg 2015/02/24 06:38:06 Sorry, I'm confused. Assuming no enterprise policy
Alexander Alekseev 2015/02/24 12:18:30 setSystemTimezoneManaged() creates onclick handler
michaelpg 2015/02/24 13:04:39 Ah, I see. It's kind of unintuitive that we rely o
Alexander Alekseev 2015/02/25 20:39:41 This would lead to duplicate call to this new func
409 'resolveTimezoneByGeolocationInitialValue');
408 } 410 }
409 } 411 }
410 412
411 // Default browser section. 413 // Default browser section.
412 if (!cr.isChromeOS) { 414 if (!cr.isChromeOS) {
413 if (!loadTimeData.getBoolean('showSetDefault')) { 415 if (!loadTimeData.getBoolean('showSetDefault')) {
414 $('set-default-browser-section').hidden = true; 416 $('set-default-browser-section').hidden = true;
415 } 417 }
416 $('set-as-default-browser').onclick = function(event) { 418 $('set-as-default-browser').onclick = function(event) {
417 chrome.send('becomeDefaultBrowser'); 419 chrome.send('becomeDefaultBrowser');
(...skipping 1672 matching lines...) Expand 10 before | Expand all | Expand 10 after
2090 $('profiles-supervised-dashboard-tip').hidden; 2092 $('profiles-supervised-dashboard-tip').hidden;
2091 }, 2093 },
2092 2094
2093 /** 2095 /**
2094 * Updates the date and time section with time sync information. 2096 * Updates the date and time section with time sync information.
2095 * @param {boolean} canSetTime Whether the system time can be set. 2097 * @param {boolean} canSetTime Whether the system time can be set.
2096 * @private 2098 * @private
2097 */ 2099 */
2098 setCanSetTime_: function(canSetTime) { 2100 setCanSetTime_: function(canSetTime) {
2099 // If the time has been network-synced, it cannot be set manually. 2101 // If the time has been network-synced, it cannot be set manually.
2100 $('time-synced-explanation').hidden = canSetTime;
2101 $('set-time').hidden = !canSetTime; 2102 $('set-time').hidden = !canSetTime;
2102 }, 2103 },
2103 2104
2104 /** 2105 /**
2105 * Handle the 'set date and time' button click. 2106 * Handle the 'set date and time' button click.
2106 * @private 2107 * @private
2107 */ 2108 */
2108 handleSetTime_: function() { 2109 handleSetTime_: function() {
2109 chrome.send('showSetTime'); 2110 chrome.send('showSetTime');
2110 }, 2111 },
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
2168 'setFontSize', 2169 'setFontSize',
2169 'setHotwordRetrainLinkVisible', 2170 'setHotwordRetrainLinkVisible',
2170 'setNativeThemeButtonEnabled', 2171 'setNativeThemeButtonEnabled',
2171 'setNetworkPredictionValue', 2172 'setNetworkPredictionValue',
2172 'setHighContrastCheckboxState', 2173 'setHighContrastCheckboxState',
2173 'setAllHotwordSectionsVisible', 2174 'setAllHotwordSectionsVisible',
2174 'setMetricsReportingCheckboxState', 2175 'setMetricsReportingCheckboxState',
2175 'setMetricsReportingSettingVisibility', 2176 'setMetricsReportingSettingVisibility',
2176 'setProfilesInfo', 2177 'setProfilesInfo',
2177 'setSpokenFeedbackCheckboxState', 2178 'setSpokenFeedbackCheckboxState',
2179 'setSystemTimezoneManaged',
michaelpg 2015/02/24 13:04:39 so this is an existing bug, since the function is
Alexander Alekseev 2015/02/25 20:39:41 Yes.
2178 'setThemesResetButtonEnabled', 2180 'setThemesResetButtonEnabled',
2179 'setVirtualKeyboardCheckboxState', 2181 'setVirtualKeyboardCheckboxState',
2180 'setupPageZoomSelector', 2182 'setupPageZoomSelector',
2181 'setupProxySettingsButton', 2183 'setupProxySettingsButton',
2182 'setAudioHistorySectionVisible', 2184 'setAudioHistorySectionVisible',
2183 'showBluetoothSettings', 2185 'showBluetoothSettings',
2184 'showCreateProfileError', 2186 'showCreateProfileError',
2185 'showCreateProfileSuccess', 2187 'showCreateProfileSuccess',
2186 'showCreateProfileWarning', 2188 'showCreateProfileWarning',
2187 'showHotwordAlwaysOnSection', 2189 'showHotwordAlwaysOnSection',
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
2247 } 2249 }
2248 button.textContent = loadTimeData.getString(strId); 2250 button.textContent = loadTimeData.getString(strId);
2249 }; 2251 };
2250 } 2252 }
2251 2253
2252 // Export 2254 // Export
2253 return { 2255 return {
2254 BrowserOptions: BrowserOptions 2256 BrowserOptions: BrowserOptions
2255 }; 2257 };
2256 }); 2258 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/browser_options.html ('k') | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698