OLD | NEW |
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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 * @param {boolean} show Whether to show (or hide) the link. | 199 * @param {boolean} show Whether to show (or hide) the link. |
200 */ | 200 */ |
201 ContentSettings.showMediaPepperFlashLink = | 201 ContentSettings.showMediaPepperFlashLink = |
202 function(linkType, contentType, show) { | 202 function(linkType, contentType, show) { |
203 assert(['default', 'exceptions'].indexOf(linkType) >= 0); | 203 assert(['default', 'exceptions'].indexOf(linkType) >= 0); |
204 assert(['mic', 'camera'].indexOf(contentType) >= 0); | 204 assert(['mic', 'camera'].indexOf(contentType) >= 0); |
205 $('media-pepper-flash-' + linkType + '-' + contentType).hidden = !show; | 205 $('media-pepper-flash-' + linkType + '-' + contentType).hidden = !show; |
206 }; | 206 }; |
207 | 207 |
208 /** | 208 /** |
209 * Shows/hides parts of the fullscreen and mouselock sections. | |
210 * @param {boolean} deprecationVisible Whether to show (or hide) the | |
211 * deprecation warning labels. | |
212 * @param {boolean} globalsVisible Whether to show (or hide) global settings. | |
213 */ | |
214 ContentSettings.setExclusiveAccessVisible = function( | |
215 deprecationVisible, globalsVisible) { | |
216 $('fullscreen-deprecated').hidden = !deprecationVisible; | |
217 $('mouselock-deprecated').hidden = !deprecationVisible; | |
218 $('mouselock-global-settings').hidden = !globalsVisible; | |
219 }; | |
220 | |
221 /** | |
222 * Updates the microphone/camera devices menu with the given entries. | 209 * Updates the microphone/camera devices menu with the given entries. |
223 * @param {string} type The device type. | 210 * @param {string} type The device type. |
224 * @param {Array} devices List of available devices. | 211 * @param {Array} devices List of available devices. |
225 * @param {string} defaultdevice The unique id of the current default device. | 212 * @param {string} defaultdevice The unique id of the current default device. |
226 */ | 213 */ |
227 ContentSettings.updateDevicesMenu = function(type, devices, defaultdevice) { | 214 ContentSettings.updateDevicesMenu = function(type, devices, defaultdevice) { |
228 var deviceSelect = ''; | 215 var deviceSelect = ''; |
229 if (type == 'mic') { | 216 if (type == 'mic') { |
230 deviceSelect = $('media-select-mic'); | 217 deviceSelect = $('media-select-mic'); |
231 } else if (type == 'camera') { | 218 } else if (type == 'camera') { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 var deviceSelect = $('media-select-camera'); | 277 var deviceSelect = $('media-select-camera'); |
291 chrome.send('setDefaultCaptureDevice', ['camera', deviceSelect.value]); | 278 chrome.send('setDefaultCaptureDevice', ['camera', deviceSelect.value]); |
292 }; | 279 }; |
293 | 280 |
294 // Export | 281 // Export |
295 return { | 282 return { |
296 ContentSettings: ContentSettings | 283 ContentSettings: ContentSettings |
297 }; | 284 }; |
298 | 285 |
299 }); | 286 }); |
OLD | NEW |