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

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

Issue 12094034: Add a link (to view Permissions) to the Extension details on chrome://extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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 | Annotate | Revision Log
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.define('options', function() { 5 cr.define('options', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * A lookup helper function to find the first node that has an id (starting 9 * A lookup helper function to find the first node that has an id (starting
10 * at |node| and going up the parent chain). 10 * at |node| and going up the parent chain).
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 if (extension.wantsFileAccess) { 143 if (extension.wantsFileAccess) {
144 var fileAccess = node.querySelector('.file-access-control'); 144 var fileAccess = node.querySelector('.file-access-control');
145 fileAccess.addEventListener('click', function(e) { 145 fileAccess.addEventListener('click', function(e) {
146 chrome.send('extensionSettingsAllowFileAccess', 146 chrome.send('extensionSettingsAllowFileAccess',
147 [extension.id, String(e.target.checked)]); 147 [extension.id, String(e.target.checked)]);
148 }); 148 });
149 fileAccess.querySelector('input').checked = extension.allowFileAccess; 149 fileAccess.querySelector('input').checked = extension.allowFileAccess;
150 fileAccess.hidden = false; 150 fileAccess.hidden = false;
151 } 151 }
152 152
153 // The 'Options' checkbox. 153 // The 'Options' link.
154 if (extension.enabled && extension.optionsUrl) { 154 if (extension.enabled && extension.optionsUrl) {
155 var options = node.querySelector('.options-link'); 155 var options = node.querySelector('.options-link');
156 options.addEventListener('click', function(e) { 156 options.addEventListener('click', function(e) {
157 chrome.send('extensionSettingsOptions', [extension.id]); 157 chrome.send('extensionSettingsOptions', [extension.id]);
158 e.preventDefault(); 158 e.preventDefault();
159 }); 159 });
160 options.hidden = false; 160 options.hidden = false;
161 } 161 }
162 162
163 // The 'Permissions' link.
164 var permissions = node.querySelector('.permissions-link');
165 permissions.addEventListener('click', function(e) {
166 chrome.send('extensionSettingsPermissions', [extension.id]);
167 e.preventDefault();
168 });
169
163 if (extension.allow_activity) { 170 if (extension.allow_activity) {
164 var activity = node.querySelector('.activity-link'); 171 var activity = node.querySelector('.activity-link');
165 activity.addEventListener('click', function(e) { 172 activity.addEventListener('click', function(e) {
166 chrome.send('navigateToUrl', [ 173 chrome.send('navigateToUrl', [
167 'chrome://extension-activity?extensionId=' + extension.id, 174 'chrome://extension-activity?extensionId=' + extension.id,
168 '_blank', 175 '_blank',
169 e.button, 176 e.button,
170 e.altKey, 177 e.altKey,
171 e.ctrlKey, 178 e.ctrlKey,
172 e.metaKey, 179 e.metaKey,
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 } 328 }
322 329
323 this.appendChild(node); 330 this.appendChild(node);
324 } 331 }
325 }; 332 };
326 333
327 return { 334 return {
328 ExtensionsList: ExtensionsList 335 ExtensionsList: ExtensionsList
329 }; 336 };
330 }); 337 });
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_install_prompt.cc ('k') | chrome/browser/resources/extensions/extensions.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698