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

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

Issue 599723002: Disable wallpaper button in Guest mode settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * hasError: (boolean|undefined), 9 * hasError: (boolean|undefined),
10 * hasUnrecoverableError: (boolean|undefined), 10 * hasUnrecoverableError: (boolean|undefined),
(...skipping 1475 matching lines...) Expand 10 before | Expand all | Expand 10 after
1486 picture.src = 'chrome://userimage/' + this.username_ + '?id=' + 1486 picture.src = 'chrome://userimage/' + this.username_ + '?id=' +
1487 Date.now(); 1487 Date.now();
1488 } 1488 }
1489 }, 1489 },
1490 1490
1491 /** 1491 /**
1492 * @param {boolean} managed 1492 * @param {boolean} managed
1493 */ 1493 */
1494 setWallpaperManaged_: function(managed) { 1494 setWallpaperManaged_: function(managed) {
1495 var button = $('set-wallpaper'); 1495 var button = $('set-wallpaper');
1496 button.disabled = !!managed; 1496 button.disabled |= !!managed;
stevenjb 2014/09/24 16:15:23 nit: Actually, I think that in general this kind o
michaelpg 2014/09/24 22:29:23 +dbeam@ Actually it looks like this can be called
Dan Beam 2014/09/29 18:52:18 why are we doing !! if |managed| should already be
Dan Beam 2014/09/29 18:52:18 any version including: button.disabled = button
1497 1497
1498 // Create a synthetic pref change event decorated as 1498 // Create a synthetic pref change event decorated as
1499 // CoreOptionsHandler::CreateValueForPref() does. 1499 // CoreOptionsHandler::CreateValueForPref() does.
1500 var event = new Event('wallpaper'); 1500 var event = new Event('wallpaper');
1501 if (managed) 1501 if (managed)
1502 event.value = { controlledBy: 'policy' }; 1502 event.value = { controlledBy: 'policy' };
1503 else 1503 else
1504 event.value = {}; 1504 event.value = {};
Dan Beam 2014/09/29 18:52:18 for example: event.value = managed ? {controlle
1505 $('wallpaper-indicator').handlePrefChange(event); 1505 $('wallpaper-indicator').handlePrefChange(event);
1506 }, 1506 },
1507 1507
1508 /** 1508 /**
1509 * Handle the 'add device' button click. 1509 * Handle the 'add device' button click.
1510 * @private 1510 * @private
1511 */ 1511 */
1512 handleAddBluetoothDevice_: function() { 1512 handleAddBluetoothDevice_: function() {
1513 chrome.send('findBluetoothDevices'); 1513 chrome.send('findBluetoothDevices');
1514 PageManager.showPageByName('bluetooth', false); 1514 PageManager.showPageByName('bluetooth', false);
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
2036 } 2036 }
2037 button.textContent = loadTimeData.getString(strId); 2037 button.textContent = loadTimeData.getString(strId);
2038 }; 2038 };
2039 } 2039 }
2040 2040
2041 // Export 2041 // Export
2042 return { 2042 return {
2043 BrowserOptions: BrowserOptions 2043 BrowserOptions: BrowserOptions
2044 }; 2044 };
2045 }); 2045 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698