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

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

Issue 1855393006: [Chrome Settings UI] If User Exceptions are not allowed, prevent editing / viewing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding and using ArrayDataModel.pop(). Created 4 years, 7 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 {{appId: string, 8 * @typedef {{appId: string,
9 * appName: (string|undefined), 9 * appName: (string|undefined),
10 * embeddingOrigin: (string|undefined), 10 * embeddingOrigin: (string|undefined),
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 value: dict[group].value, 124 value: dict[group].value,
125 controlledBy: controlledBy, 125 controlledBy: controlledBy,
126 }; 126 };
127 for (var i = 0; i < indicators.length; i++) { 127 for (var i = 0; i < indicators.length; i++) {
128 indicators[i].handlePrefChange(event); 128 indicators[i].handlePrefChange(event);
129 } 129 }
130 } 130 }
131 }; 131 };
132 132
133 /** 133 /**
134 * Updates UI to allow/disallow user from using exceptions for a particular
135 * content setting.
136 * @param {string} type The content settings type being updated.
137 * @param {boolean} allowUserExceptions Whether user may set exceptions.
138 */
139 ContentSettings.setUserExceptionsAllowed = function(type,
140 userExceptionsAllowed) {
141 // Update exceptions UI window.
142 this.getExceptionsList(type, 'normal').setAllowEdit(userExceptionsAllowed);
143 };
144
145 /**
134 * Initializes an exceptions list. 146 * Initializes an exceptions list.
135 * @param {string} type The content type that we are setting exceptions for. 147 * @param {string} type The content type that we are setting exceptions for.
136 * @param {Array<options.Exception>} exceptions An array of pairs, where the 148 * @param {Array<options.Exception>} exceptions An array of pairs, where the
137 * first element of each pair is the filter string, and the second is the 149 * first element of each pair is the filter string, and the second is the
138 * setting (allow/block). 150 * setting (allow/block).
139 */ 151 */
140 ContentSettings.setExceptions = function(type, exceptions) { 152 ContentSettings.setExceptions = function(type, exceptions) {
141 this.getExceptionsList(type, 'normal').setExceptions(exceptions); 153 this.getExceptionsList(type, 'normal').setExceptions(exceptions);
142 }; 154 };
143 155
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 var deviceSelect = $('media-select-camera'); 300 var deviceSelect = $('media-select-camera');
289 chrome.send('setDefaultCaptureDevice', ['camera', deviceSelect.value]); 301 chrome.send('setDefaultCaptureDevice', ['camera', deviceSelect.value]);
290 }; 302 };
291 303
292 // Export 304 // Export
293 return { 305 return {
294 ContentSettings: ContentSettings 306 ContentSettings: ContentSettings
295 }; 307 };
296 308
297 }); 309 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698