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

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

Issue 1962163002: Revert of [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: 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
« no previous file with comments | « no previous file | chrome/browser/resources/options/content_settings_exceptions_area.js » ('j') | 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 {{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 allowUserExceptions) {
141 // Update exceptions UI window.
142 this.getExceptionsList(type, 'normal').setAllowEdit(allowUserExceptions);
143 };
144
145 /**
146 * Initializes an exceptions list. 134 * Initializes an exceptions list.
147 * @param {string} type The content type that we are setting exceptions for. 135 * @param {string} type The content type that we are setting exceptions for.
148 * @param {Array<options.Exception>} exceptions An array of pairs, where the 136 * @param {Array<options.Exception>} exceptions An array of pairs, where the
149 * first element of each pair is the filter string, and the second is the 137 * first element of each pair is the filter string, and the second is the
150 * setting (allow/block). 138 * setting (allow/block).
151 */ 139 */
152 ContentSettings.setExceptions = function(type, exceptions) { 140 ContentSettings.setExceptions = function(type, exceptions) {
153 this.getExceptionsList(type, 'normal').setExceptions(exceptions); 141 this.getExceptionsList(type, 'normal').setExceptions(exceptions);
154 }; 142 };
155 143
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 var deviceSelect = $('media-select-camera'); 288 var deviceSelect = $('media-select-camera');
301 chrome.send('setDefaultCaptureDevice', ['camera', deviceSelect.value]); 289 chrome.send('setDefaultCaptureDevice', ['camera', deviceSelect.value]);
302 }; 290 };
303 291
304 // Export 292 // Export
305 return { 293 return {
306 ContentSettings: ContentSettings 294 ContentSettings: ContentSettings
307 }; 295 };
308 296
309 }); 297 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/options/content_settings_exceptions_area.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698