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

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

Issue 917093003: Shorten Closure template notation from Array.<*> to Array<*>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove cvox 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 {{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 }; 124 };
125 125
126 ContentSettings.updateHandlersEnabledRadios = function(enabled) { 126 ContentSettings.updateHandlersEnabledRadios = function(enabled) {
127 var selector = '#content-settings-page input[type=radio][value=' + 127 var selector = '#content-settings-page input[type=radio][value=' +
128 (enabled ? 'allow' : 'block') + '].handler-radio'; 128 (enabled ? 'allow' : 'block') + '].handler-radio';
129 document.querySelector(selector).checked = true; 129 document.querySelector(selector).checked = true;
130 }; 130 };
131 131
132 /** 132 /**
133 * Sets the values for all the content settings radios and labels. 133 * Sets the values for all the content settings radios and labels.
134 * @param {Object.<string, {managedBy: string, value: string}>} dict A mapping 134 * @param {Object<string, {managedBy: string, value: string}>} dict A mapping
135 * from radio groups to the checked value for that group. 135 * from radio groups to the checked value for that group.
136 */ 136 */
137 ContentSettings.setContentFilterSettingsValue = function(dict) { 137 ContentSettings.setContentFilterSettingsValue = function(dict) {
138 for (var group in dict) { 138 for (var group in dict) {
139 var settingLabel = $(group + '-default-string'); 139 var settingLabel = $(group + '-default-string');
140 if (settingLabel) { 140 if (settingLabel) {
141 var value = dict[group].value; 141 var value = dict[group].value;
142 var valueId = 142 var valueId =
143 permissionsLookup[group] + value[0].toUpperCase() + value.slice(1); 143 permissionsLookup[group] + value[0].toUpperCase() + value.slice(1);
144 settingLabel.textContent = loadTimeData.getString(valueId); 144 settingLabel.textContent = loadTimeData.getString(valueId);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 'textpolicy', loadTimeData.getString(mediaSettings.bubbleText)); 211 'textpolicy', loadTimeData.getString(mediaSettings.bubbleText));
212 $('media-indicator').location = cr.ui.ArrowLocation.TOP_START; 212 $('media-indicator').location = cr.ui.ArrowLocation.TOP_START;
213 } 213 }
214 214
215 $('media-indicator').handlePrefChange(event); 215 $('media-indicator').handlePrefChange(event);
216 }; 216 };
217 217
218 /** 218 /**
219 * Initializes an exceptions list. 219 * Initializes an exceptions list.
220 * @param {string} type The content type that we are setting exceptions for. 220 * @param {string} type The content type that we are setting exceptions for.
221 * @param {Array.<options.Exception>} exceptions An array of pairs, where the 221 * @param {Array<options.Exception>} exceptions An array of pairs, where the
222 * first element of each pair is the filter string, and the second is the 222 * first element of each pair is the filter string, and the second is the
223 * setting (allow/block). 223 * setting (allow/block).
224 */ 224 */
225 ContentSettings.setExceptions = function(type, exceptions) { 225 ContentSettings.setExceptions = function(type, exceptions) {
226 this.getExceptionsList(type, 'normal').setExceptions(exceptions); 226 this.getExceptionsList(type, 'normal').setExceptions(exceptions);
227 }; 227 };
228 228
229 ContentSettings.setHandlers = function(handlers) { 229 ContentSettings.setHandlers = function(handlers) {
230 $('handlers-list').setHandlers(handlers); 230 $('handlers-list').setHandlers(handlers);
231 }; 231 };
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 var deviceSelect = $('media-select-camera'); 360 var deviceSelect = $('media-select-camera');
361 chrome.send('setDefaultCaptureDevice', ['camera', deviceSelect.value]); 361 chrome.send('setDefaultCaptureDevice', ['camera', deviceSelect.value]);
362 }; 362 };
363 363
364 // Export 364 // Export
365 return { 365 return {
366 ContentSettings: ContentSettings 366 ContentSettings: ContentSettings
367 }; 367 };
368 368
369 }); 369 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698