| 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 * Enables/disables the protected content exceptions button. | 254 * Enables/disables the protected content exceptions button. |
| 255 * @param {boolean} enable Whether to enable the button. | 255 * @param {boolean} enable Whether to enable the button. |
| 256 */ | 256 */ |
| 257 ContentSettings.enableProtectedContentExceptions = function(enable) { | 257 ContentSettings.enableProtectedContentExceptions = function(enable) { |
| 258 var exceptionsButton = $('protected-content-exceptions'); | 258 var exceptionsButton = $('protected-content-exceptions'); |
| 259 if (exceptionsButton) | 259 if (exceptionsButton) |
| 260 exceptionsButton.disabled = !enable; | 260 exceptionsButton.disabled = !enable; |
| 261 }; | 261 }; |
| 262 | 262 |
| 263 /** | 263 /** |
| 264 * Shows/hides the explanation of per-tab zoom scope under the list of any |
| 265 * existing zoom level exceptions. |
| 266 * TODO Is this how we want to present this to the user? |
| 267 * @param {boolean} show Whether to show the explanation. |
| 268 */ |
| 269 ContentSettings.showZoomScopeExplanation = function(show) { |
| 270 $('zoom-levels-ignored-explanation').hidden = !show; |
| 271 }; |
| 272 |
| 273 /** |
| 264 * Set the default microphone device based on the popup selection. | 274 * Set the default microphone device based on the popup selection. |
| 265 * @private | 275 * @private |
| 266 */ | 276 */ |
| 267 ContentSettings.setDefaultMicrophone_ = function() { | 277 ContentSettings.setDefaultMicrophone_ = function() { |
| 268 var deviceSelect = $('media-select-mic'); | 278 var deviceSelect = $('media-select-mic'); |
| 269 chrome.send('setDefaultCaptureDevice', ['mic', deviceSelect.value]); | 279 chrome.send('setDefaultCaptureDevice', ['mic', deviceSelect.value]); |
| 270 }; | 280 }; |
| 271 | 281 |
| 272 /** | 282 /** |
| 273 * Set the default camera device based on the popup selection. | 283 * Set the default camera device based on the popup selection. |
| 274 * @private | 284 * @private |
| 275 */ | 285 */ |
| 276 ContentSettings.setDefaultCamera_ = function() { | 286 ContentSettings.setDefaultCamera_ = function() { |
| 277 var deviceSelect = $('media-select-camera'); | 287 var deviceSelect = $('media-select-camera'); |
| 278 chrome.send('setDefaultCaptureDevice', ['camera', deviceSelect.value]); | 288 chrome.send('setDefaultCaptureDevice', ['camera', deviceSelect.value]); |
| 279 }; | 289 }; |
| 280 | 290 |
| 281 // Export | 291 // Export |
| 282 return { | 292 return { |
| 283 ContentSettings: ContentSettings | 293 ContentSettings: ContentSettings |
| 284 }; | 294 }; |
| 285 | 295 |
| 286 }); | 296 }); |
| OLD | NEW |