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

Side by Side Diff: chrome/browser/resources/extensions/extension_list.js

Issue 874683005: [Extensions] Enable the scripts-require-action feature based on all-urls pref (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated metrics 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 <include src="extension_error.js"> 5 <include src="extension_error.js">
6 6
7 /** 7 /**
8 * The type of the extension data object. The definition is based on 8 * The type of the extension data object. The definition is based on
9 * chrome/browser/ui/webui/extensions/extension_basic_info.cc 9 * chrome/browser/ui/webui/extensions/extension_basic_info.cc
10 * and 10 * and
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 * optionsOpenInTab: boolean, 44 * optionsOpenInTab: boolean,
45 * optionsPageHref: string, 45 * optionsPageHref: string,
46 * optionsUrl: string, 46 * optionsUrl: string,
47 * order: number, 47 * order: number,
48 * packagedApp: boolean, 48 * packagedApp: boolean,
49 * path: (string|undefined), 49 * path: (string|undefined),
50 * policyText: (string|undefined), 50 * policyText: (string|undefined),
51 * prettifiedPath: (string|undefined), 51 * prettifiedPath: (string|undefined),
52 * recommendedInstall: boolean, 52 * recommendedInstall: boolean,
53 * runtimeErrors: (Array.<RuntimeError>|undefined), 53 * runtimeErrors: (Array.<RuntimeError>|undefined),
54 * showAllUrls: boolean,
54 * suspiciousInstall: boolean, 55 * suspiciousInstall: boolean,
55 * terminated: boolean, 56 * terminated: boolean,
56 * updateRequiredByPolicy: boolean, 57 * updateRequiredByPolicy: boolean,
57 * version: string, 58 * version: string,
58 * views: Array.<{renderViewId: number, renderProcessId: number, 59 * views: Array.<{renderViewId: number, renderProcessId: number,
59 * path: string, incognito: boolean, 60 * path: string, incognito: boolean,
60 * generatedBackgroundPage: boolean}>, 61 * generatedBackgroundPage: boolean}>,
61 * wantsAllUrls: boolean,
62 * wantsErrorCollection: boolean, 62 * wantsErrorCollection: boolean,
63 * wantsFileAccess: boolean, 63 * wantsFileAccess: boolean,
64 * warnings: (Array|undefined)}} 64 * warnings: (Array|undefined)}}
65 */ 65 */
66 var ExtensionData; 66 var ExtensionData;
67 67
68 cr.define('options', function() { 68 cr.define('options', function() {
69 'use strict'; 69 'use strict';
70 70
71 /** 71 /**
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 errorCollection.checked = extension.errorCollectionEnabled; 253 errorCollection.checked = extension.errorCollectionEnabled;
254 errorCollection.addEventListener('change', function(e) { 254 errorCollection.addEventListener('change', function(e) {
255 chrome.send('extensionSettingsEnableErrorCollection', 255 chrome.send('extensionSettingsEnableErrorCollection',
256 [extension.id, String(e.target.checked)]); 256 [extension.id, String(e.target.checked)]);
257 }); 257 });
258 } 258 }
259 259
260 // The 'allow on all urls' checkbox. This should only be visible if 260 // The 'allow on all urls' checkbox. This should only be visible if
261 // active script restrictions are enabled. If they are not enabled, no 261 // active script restrictions are enabled. If they are not enabled, no
262 // extensions should want all urls. 262 // extensions should want all urls.
263 if (extension.wantsAllUrls) { 263 if (extension.showAllUrls) {
264 var allUrls = node.querySelector('.all-urls-control'); 264 var allUrls = node.querySelector('.all-urls-control');
265 allUrls.addEventListener('click', function(e) { 265 allUrls.addEventListener('click', function(e) {
266 chrome.send('extensionSettingsAllowOnAllUrls', 266 chrome.send('extensionSettingsAllowOnAllUrls',
267 [extension.id, String(e.target.checked)]); 267 [extension.id, String(e.target.checked)]);
268 }); 268 });
269 allUrls.querySelector('input').checked = extension.allowAllUrls; 269 allUrls.querySelector('input').checked = extension.allowAllUrls;
270 allUrls.hidden = false; 270 allUrls.hidden = false;
271 } 271 }
272 272
273 // The 'allow file:// access' checkbox. 273 // The 'allow file:// access' checkbox.
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 $('overlay').addEventListener('cancelOverlay', function() { 581 $('overlay').addEventListener('cancelOverlay', function() {
582 this.optionsShown_ = false; 582 this.optionsShown_ = false;
583 }.bind(this)); 583 }.bind(this));
584 }, 584 },
585 }; 585 };
586 586
587 return { 587 return {
588 ExtensionsList: ExtensionsList 588 ExtensionsList: ExtensionsList
589 }; 589 };
590 }); 590 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698