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

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

Issue 238073002: Provide UI for per-extension enabling/disabling of error collection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 <include src="extension_error.js"></include> 5 <include src="extension_error.js"></include>
6 6
7 cr.define('options', function() { 7 cr.define('options', function() {
8 'use strict'; 8 'use strict';
9 9
10 /** 10 /**
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 var checked = e.target.checked; 141 var checked = e.target.checked;
142 butterBarVisibility[extension.id] = checked; 142 butterBarVisibility[extension.id] = checked;
143 butterBar.hidden = !checked || extension.is_hosted_app; 143 butterBar.hidden = !checked || extension.is_hosted_app;
144 chrome.send('extensionSettingsEnableIncognito', 144 chrome.send('extensionSettingsEnableIncognito',
145 [extension.id, String(checked)]); 145 [extension.id, String(checked)]);
146 }); 146 });
147 } 147 }
148 var butterBar = node.querySelector('.butter-bar'); 148 var butterBar = node.querySelector('.butter-bar');
149 butterBar.hidden = !butterBarVisibility[extension.id]; 149 butterBar.hidden = !butterBarVisibility[extension.id];
150 150
151 // The 'collect errors' checkbox. This should only be visible if the
152 // error console is enabled - we can detect this by the existence of the
153 // |errorCollectionEnabled| property.
154 if (extension.wantsErrorCollection) {
155 node.querySelector('.error-collection-control').hidden = false;
156 var errorCollection =
157 node.querySelector('.error-collection-control input');
158 errorCollection.checked = extension.errorCollectionEnabled;
159 errorCollection.addEventListener('change', function(e) {
160 chrome.send('extensionSettingsEnableErrorCollection',
161 [extension.id, String(e.target.checked)]);
162 });
163 }
164
151 // The 'allow file:// access' checkbox. 165 // The 'allow file:// access' checkbox.
152 if (extension.wantsFileAccess) { 166 if (extension.wantsFileAccess) {
153 var fileAccess = node.querySelector('.file-access-control'); 167 var fileAccess = node.querySelector('.file-access-control');
154 fileAccess.addEventListener('click', function(e) { 168 fileAccess.addEventListener('click', function(e) {
155 chrome.send('extensionSettingsAllowFileAccess', 169 chrome.send('extensionSettingsAllowFileAccess',
156 [extension.id, String(e.target.checked)]); 170 [extension.id, String(e.target.checked)]);
157 }); 171 });
158 fileAccess.querySelector('input').checked = extension.allowFileAccess; 172 fileAccess.querySelector('input').checked = extension.allowFileAccess;
159 fileAccess.hidden = false; 173 fileAccess.hidden = false;
160 } 174 }
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 topScroll -= pad / 2; 365 topScroll -= pad / 2;
352 setScrollTopForDocument(document, topScroll); 366 setScrollTopForDocument(document, topScroll);
353 } 367 }
354 }, 368 },
355 }; 369 };
356 370
357 return { 371 return {
358 ExtensionsList: ExtensionsList 372 ExtensionsList: ExtensionsList
359 }; 373 };
360 }); 374 });
OLDNEW
« no previous file with comments | « chrome/browser/extensions/error_console/error_console_unittest.cc ('k') | chrome/browser/resources/extensions/extensions.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698