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

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.
152 var errorCollection =
153 node.querySelector('.error-collection-control input');
154 errorCollection.checked = extension.errorCollectionEnabled;
155 errorCollection.addEventListener('change', function(e) {
156 chrome.send('extensionSettingsEnableErrorCollection',
157 [extension.id, String(e.target.checked)]);
158 });
159
151 // The 'allow file:// access' checkbox. 160 // The 'allow file:// access' checkbox.
152 if (extension.wantsFileAccess) { 161 if (extension.wantsFileAccess) {
153 var fileAccess = node.querySelector('.file-access-control'); 162 var fileAccess = node.querySelector('.file-access-control');
154 fileAccess.addEventListener('click', function(e) { 163 fileAccess.addEventListener('click', function(e) {
155 chrome.send('extensionSettingsAllowFileAccess', 164 chrome.send('extensionSettingsAllowFileAccess',
156 [extension.id, String(e.target.checked)]); 165 [extension.id, String(e.target.checked)]);
157 }); 166 });
158 fileAccess.querySelector('input').checked = extension.allowFileAccess; 167 fileAccess.querySelector('input').checked = extension.allowFileAccess;
159 fileAccess.hidden = false; 168 fileAccess.hidden = false;
160 } 169 }
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 topScroll -= pad / 2; 360 topScroll -= pad / 2;
352 setScrollTopForDocument(document, topScroll); 361 setScrollTopForDocument(document, topScroll);
353 } 362 }
354 }, 363 },
355 }; 364 };
356 365
357 return { 366 return {
358 ExtensionsList: ExtensionsList 367 ExtensionsList: ExtensionsList
359 }; 368 };
360 }); 369 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698