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

Side by Side Diff: chrome/browser/resources/plugins.js

Issue 10006028: Plugins page in BWSI session has unnecessary and misleading UI components (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit fix Created 8 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 /** 5 /**
6 * This variable structure is here to document the structure that the template 6 * This variable structure is here to document the structure that the template
7 * expects to correctly populate the page. 7 * expects to correctly populate the page.
8 */ 8 */
9 var pluginDataFormat = { 9 var pluginDataFormat = {
10 plugins: [ 10 plugins: [
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 return false; 154 return false;
155 }; 155 };
156 } 156 }
157 var checkboxes = document.getElementsByClassName('always-allow'); 157 var checkboxes = document.getElementsByClassName('always-allow');
158 for (var i = 0; i < checkboxes.length; i++) { 158 for (var i = 0; i < checkboxes.length; i++) {
159 checkboxes[i].onclick = function() { 159 checkboxes[i].onclick = function() {
160 handleSetPluginAlwaysAllowed(this); 160 handleSetPluginAlwaysAllowed(this);
161 }; 161 };
162 } 162 }
163 163
164 // Disable some controls for Guest in ChromeOS.
165 if (cr.isChromeOS)
166 uiAccountTweaks.UIAccountTweaks.applyGuestModeVisibility(document);
167
164 // Make sure the left column (with "Description:", "Location:", etc.) is the 168 // Make sure the left column (with "Description:", "Location:", etc.) is the
165 // same size for all plugins. 169 // same size for all plugins.
166 var labels = document.getElementsByClassName('plugin-details-label'); 170 var labels = document.getElementsByClassName('plugin-details-label');
167 var maxLabelWidth = 0; 171 var maxLabelWidth = 0;
168 for (var i = 0; i < labels.length; i++) 172 for (var i = 0; i < labels.length; i++)
169 labels[i].style.width = 'auto'; 173 labels[i].style.width = 'auto';
170 for (var i = 0; i < labels.length; i++) 174 for (var i = 0; i < labels.length; i++)
171 maxLabelWidth = Math.max(maxLabelWidth, labels[i].offsetWidth); 175 maxLabelWidth = Math.max(maxLabelWidth, labels[i].offsetWidth);
172 for (var i = 0; i < labels.length; i++) 176 for (var i = 0; i < labels.length; i++)
173 labels[i].style.width = maxLabelWidth + 'px'; 177 labels[i].style.width = maxLabelWidth + 'px';
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 // (yet), so in the meanwhile just update regularly. 267 // (yet), so in the meanwhile just update regularly.
264 setInterval(requestPluginsData, 30000); 268 setInterval(requestPluginsData, 30000);
265 269
266 // Get data and have it displayed upon loading. 270 // Get data and have it displayed upon loading.
267 document.addEventListener('DOMContentLoaded', requestPluginsData); 271 document.addEventListener('DOMContentLoaded', requestPluginsData);
268 272
269 // Add handlers to static HTML elements. 273 // Add handlers to static HTML elements.
270 $('collapse').onclick = toggleTmiMode; 274 $('collapse').onclick = toggleTmiMode;
271 $('expand').onclick = toggleTmiMode; 275 $('expand').onclick = toggleTmiMode;
272 $('details-link').onclick = toggleTmiMode; 276 $('details-link').onclick = toggleTmiMode;
OLDNEW
« no previous file with comments | « chrome/browser/resources/plugins.html ('k') | chrome/browser/resources/shared/css/chrome_shared2.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698