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

Side by Side Diff: chrome/browser/resources/options/content_settings.js

Issue 1033103002: Plugin Power Saver: Overhaul plugin-power-saver flags. Show in UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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.exportPath('options'); 5 cr.exportPath('options');
6 6
7 /** 7 /**
8 * @typedef {{appId: string, 8 * @typedef {{appId: string,
9 * appName: (string|undefined), 9 * appName: (string|undefined),
10 * embeddingOrigin: (string|undefined), 10 * embeddingOrigin: (string|undefined),
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 * Shows/hides the link to the Pepper Flash camera and microphone 286 * Shows/hides the link to the Pepper Flash camera and microphone
287 * site-specific settings. 287 * site-specific settings.
288 * Please note that whether the link is actually showed or not is also 288 * Please note that whether the link is actually showed or not is also
289 * affected by the style class pepper-flash-settings. 289 * affected by the style class pepper-flash-settings.
290 */ 290 */
291 ContentSettings.showMediaPepperFlashExceptionsLink = function(show) { 291 ContentSettings.showMediaPepperFlashExceptionsLink = function(show) {
292 $('media-pepper-flash-exceptions').hidden = !show; 292 $('media-pepper-flash-exceptions').hidden = !show;
293 }; 293 };
294 294
295 /** 295 /**
296 * Disable the 'allow' option in the Plugins section.
297 */
298 ContentSettings.disablePluginsAllowOption = function() {
299 $('plugins-allow-radio').disabled = true;
300 };
301
302 /**
296 * Updates the microphone/camera devices menu with the given entries. 303 * Updates the microphone/camera devices menu with the given entries.
297 * @param {string} type The device type. 304 * @param {string} type The device type.
298 * @param {Array} devices List of available devices. 305 * @param {Array} devices List of available devices.
299 * @param {string} defaultdevice The unique id of the current default device. 306 * @param {string} defaultdevice The unique id of the current default device.
300 */ 307 */
301 ContentSettings.updateDevicesMenu = function(type, devices, defaultdevice) { 308 ContentSettings.updateDevicesMenu = function(type, devices, defaultdevice) {
302 var deviceSelect = ''; 309 var deviceSelect = '';
303 if (type == 'mic') { 310 if (type == 'mic') {
304 deviceSelect = $('media-select-mic'); 311 deviceSelect = $('media-select-mic');
305 } else if (type == 'camera') { 312 } else if (type == 'camera') {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 var deviceSelect = $('media-select-camera'); 359 var deviceSelect = $('media-select-camera');
353 chrome.send('setDefaultCaptureDevice', ['camera', deviceSelect.value]); 360 chrome.send('setDefaultCaptureDevice', ['camera', deviceSelect.value]);
354 }; 361 };
355 362
356 // Export 363 // Export
357 return { 364 return {
358 ContentSettings: ContentSettings 365 ContentSettings: ContentSettings
359 }; 366 };
360 367
361 }); 368 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/content_settings.html ('k') | chrome/browser/ui/website_settings/permission_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698