| 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 1bc711f8e33eaccc7c1fde4d77f5493a1b866c1f..fa610e35421ca8d79fbb4c7867416732bb485f1b 100644
|
| --- a/chrome/browser/resources/options/browser_options.js
|
| +++ b/chrome/browser/resources/options/browser_options.js
|
| @@ -1492,8 +1492,10 @@ cr.define('options', function() {
|
| * @param {boolean} managed
|
| */
|
| setWallpaperManaged_: function(managed) {
|
| - var button = $('set-wallpaper');
|
| - button.disabled = !!managed;
|
| + if (managed)
|
| + $('set-wallpaper').disabled = true;
|
| + else
|
| + this.enableElementIfPossible_($('set-wallpaper'));
|
|
|
| // Create a synthetic pref change event decorated as
|
| // CoreOptionsHandler::CreateValueForPref() does.
|
| @@ -1939,6 +1941,18 @@ cr.define('options', function() {
|
| handleSetTime_: function() {
|
| chrome.send('showSetTime');
|
| },
|
| +
|
| + /**
|
| + * Enables the given element if possible; on Chrome OS, it won't enable
|
| + * an element that must stay disabled for the session type.
|
| + * @param {!Element} element Element to enable.
|
| + */
|
| + enableElementIfPossible_: function(element) {
|
| + if (cr.isChromeOS)
|
| + UIAccountTweaks.enableElementIfPossible(element);
|
| + else
|
| + element.disabled = false;
|
| + },
|
| };
|
|
|
| //Forward public APIs to private implementations.
|
|
|