Lines Matching refs:extension

8  * The type of the extension data object. The definition is based on
74 * @type {Object.<string, boolean>} A map from extension id to a boolean
81 * @type {Object.<string, number>} A map from extension id to last reloaded
83 * link. It is used to refresh the icon of an unpacked extension.
116 * Creates all extension items from scratch.
120 // Iterate over the extension data and add each item to the list.
132 this.classList.add('empty-extension-list');
134 this.classList.remove('empty-extension-list');
138 * Scrolls the page down to the extension node with the given id.
139 * @param {string} extensionId The id of the extension to scroll to.
154 * Synthesizes and initializes an HTML element for the extension metadata
155 * given in |extension|.
156 * @param {ExtensionData} extension A dictionary of extension metadata.
159 createNode_: function(extension) {
161 '.extension-list-item-wrapper');
163 node.id = extension.id;
165 if (!extension.enabled || extension.terminated)
166 node.classList.add('inactive-extension');
168 if (extension.managedInstall ||
169 extension.dependentExtensions.length > 0) {
172 } else if (extension.suspiciousInstall || extension.corruptInstall) {
178 node.classList.add('extension-highlight');
180 var item = node.querySelector('.extension-list-item');
181 // Prevent the image cache of extension icon by using the reloaded
184 if (extensionReloadedTimestamp[extension.id]) {
186 'url(' + extension.icon + '?' +
187 extensionReloadedTimestamp[extension.id] + ')';
189 item.style.backgroundImage = 'url(' + extension.icon + ')';
192 var title = node.querySelector('.extension-title');
193 title.textContent = extension.name;
195 var version = node.querySelector('.extension-version');
196 version.textContent = extension.version;
199 locationText.textContent = extension.locationText;
202 blacklistText.textContent = extension.blacklistText;
205 description.textContent = extension.description;
206 node.querySelector('.extension-description').appendChild(description);
209 if (extension.enable_show_button) {
212 chrome.send('extensionSettingsShowButton', [extension.id]);
221 incognito.disabled = !extension.incognitoCanBeEnabled;
222 incognito.checked = extension.enabledIncognito;
226 butterBarVisibility[extension.id] = checked;
227 butterBar.hidden = !checked || extension.is_hosted_app;
229 [extension.id, String(checked)]);
233 butterBar.hidden = !butterBarVisibility[extension.id];
238 if (extension.wantsErrorCollection) {
242 errorCollection.checked = extension.errorCollectionEnabled;
245 [extension.id, String(e.target.checked)]);
252 if (extension.wantsAllUrls) {
256 [extension.id, String(e.target.checked)]);
258 allUrls.querySelector('input').checked = extension.allowAllUrls;
263 if (extension.wantsFileAccess) {
267 [extension.id, String(e.target.checked)]);
269 fileAccess.querySelector('input').checked = extension.allowFileAccess;
274 if (extension.enabled && extension.optionsUrl) {
277 if (!extension.optionsOpenInTab) {
278 this.showEmbeddedExtensionOptions_(extension.id, false);
280 chrome.send('extensionSettingsOptions', [extension.id]);
290 chrome.send('extensionSettingsPermissions', [extension.id]);
295 if (extension.homepageUrl) {
297 siteLink.href = extension.homepageUrl;
299 extension.homepageProvided ? 'extensionSettingsVisitWebsite' :
304 if (extension.allow_reload) {
308 chrome.send('extensionSettingsReload', [extension.id]);
309 extensionReloadedTimestamp[extension.id] = Date.now();
313 if (extension.is_platform_app) {
317 chrome.send('extensionSettingsLaunch', [extension.id]);
323 if (extension.terminated) {
327 chrome.send('extensionSettingsReload', [extension.id]);
329 } else if (extension.corruptInstall && extension.isFromStore) {
333 chrome.send('extensionSettingsRepair', [extension.id]);
339 var enableCheckboxDisabled = extension.managedInstall ||
340 extension.suspiciousInstall ||
341 extension.corruptInstall ||
342 extension.dependentExtensions.length > 0;
354 [extension.id, checked ? 'true' : 'false']);
357 // but this page will be updated asynchronously if the extension
365 enable.querySelector('input').checked = extension.enabled;
373 butterBarVisibility[extension.id] = false;
374 chrome.send('extensionSettingsUninstall', [extension.id]);
381 var idLabel = node.querySelector('.extension-id');
382 idLabel.textContent = ' ' + extension.id;
384 // Then the path, if provided by unpacked extension.
385 if (extension.isUnpacked) {
389 pathLink.textContent = ' ' + extension.prettifiedPath;
391 chrome.send('extensionSettingsShowPath', [String(extension.id)]);
397 if (extension.managedInstall) {
400 if (extension.suspiciousInstall) {
404 if (extension.corruptInstall) {
405 // Then the 'This is a corrupt extension' message.
410 if (extension.dependentExtensions.length > 0) {
417 extension.dependentExtensions.forEach(function(elem) {
419 depNode.querySelector('.dep-extension-title').textContent = elem.name;
420 depNode.querySelector('.dep-extension-id').textContent = elem.id;
426 if (extension.views.length > 0) {
431 extension.views.forEach(function(view, i) {
443 String(extension.id),
450 if (i < extension.views.length - 1) {
457 // The extension warnings (describing runtime issues).
458 if (extension.warnings) {
459 var panel = node.querySelector('.extension-warnings');
462 extension.warnings.forEach(function(warning) {
470 if (extension.manifestErrors) {
474 extension.manifestErrors));
476 if (extension.runtimeErrors) {
480 extension.runtimeErrors));
482 if (extension.installWarnings) {
486 extension.installWarnings.forEach(function(warning) {
494 if (location.hash.substr(1) == extension.id) {
495 // Scroll beneath the fixed header so that the extension is not
506 * Opens the extension options overlay for the extension with the given id.
507 * @param {string} extensionId The id of extension whose options page should
509 * @param {boolean} scroll Whether the page should scroll to the extension
516 // Get the extension from the given id.
517 var extension = this.data_.extensions.filter(function(extension) {
518 return extension.id == extensionId;
521 if (!extension)
533 extension.name,
534 extension.icon);