Index: chrome/browser/resources/options/content_settings.js |
diff --git a/chrome/browser/resources/options/content_settings.js b/chrome/browser/resources/options/content_settings.js |
index edcadafe4890d5ff79bbd9d97ac524b253f79b77..ac128c4b7efee863bfee952c8e739b6cbfd3271a 100644 |
--- a/chrome/browser/resources/options/content_settings.js |
+++ b/chrome/browser/resources/options/content_settings.js |
@@ -29,9 +29,9 @@ cr.define('options', function() { |
*/ |
function ContentSettings() { |
this.activeNavTab = null; |
- Page.call(this, 'content', |
- loadTimeData.getString('contentSettingsPageTabTitle'), |
- 'content-settings-page'); |
+ Page.call( |
+ this, 'content', loadTimeData.getString('contentSettingsPageTabTitle'), |
+ 'content-settings-page'); |
} |
cr.addSingletonGetter(ContentSettings); |
@@ -48,8 +48,8 @@ cr.define('options', function() { |
for (var i = 0; i < exceptionsButtons.length; i++) { |
exceptionsButtons[i].onclick = function(event) { |
var hash = event.currentTarget.getAttribute('contentType'); |
- PageManager.showPageByName('contentExceptions', true, |
- {hash: '#' + hash}); |
+ PageManager.showPageByName( |
+ 'contentExceptions', true, {hash: '#' + hash}); |
}; |
} |
@@ -82,10 +82,10 @@ cr.define('options', function() { |
$('media-pepper-flash-exceptions-mic').hidden = true; |
$('media-pepper-flash-exceptions-camera').hidden = true; |
- $('media-select-mic').addEventListener('change', |
- ContentSettings.setDefaultMicrophone_); |
- $('media-select-camera').addEventListener('change', |
- ContentSettings.setDefaultCamera_); |
+ $('media-select-mic') |
+ .addEventListener('change', ContentSettings.setDefaultMicrophone_); |
+ $('media-select-camera') |
+ .addEventListener('change', ContentSettings.setDefaultCamera_); |
}, |
}; |
@@ -103,12 +103,15 @@ cr.define('options', function() { |
ContentSettings.setContentFilterSettingsValue = function(dict) { |
for (var group in dict) { |
var managedBy = dict[group].managedBy; |
- var controlledBy = managedBy == 'policy' || managedBy == 'extension' ? |
- managedBy : null; |
- document.querySelector('input[type=radio][name=' + group + '][value=' + |
- dict[group].value + ']').checked = true; |
- var radios = document.querySelectorAll('input[type=radio][name=' + |
- group + ']'); |
+ var controlledBy = |
+ managedBy == 'policy' || managedBy == 'extension' ? managedBy : null; |
+ document |
+ .querySelector( |
+ 'input[type=radio][name=' + group + |
+ '][value=' + dict[group].value + ']') |
+ .checked = true; |
+ var radios = |
+ document.querySelectorAll('input[type=radio][name=' + group + ']'); |
for (var i = 0, len = radios.length; i < len; i++) { |
radios[i].disabled = (managedBy != 'default'); |
radios[i].controlledBy = controlledBy; |
@@ -169,9 +172,10 @@ cr.define('options', function() { |
ContentSettings.getExceptionsList = function(type, mode) { |
var exceptionsList = document.querySelector( |
'div[contentType=' + type + '] list[mode=' + mode + ']'); |
- return !exceptionsList ? null : |
- assertInstanceof(exceptionsList, |
- options.contentSettings.ExceptionsList); |
+ return !exceptionsList ? |
+ null : |
+ assertInstanceof( |
+ exceptionsList, options.contentSettings.ExceptionsList); |
}; |
/** |
@@ -183,10 +187,10 @@ cr.define('options', function() { |
* @param {boolean} valid Whether said pattern is valid in the context of |
* a content exception setting. |
*/ |
- ContentSettings.patternValidityCheckComplete = |
- function(type, mode, pattern, valid) { |
- this.getExceptionsList(type, mode).patternValidityCheckComplete(pattern, |
- valid); |
+ ContentSettings.patternValidityCheckComplete = function( |
+ type, mode, pattern, valid) { |
+ this.getExceptionsList(type, mode) |
+ .patternValidityCheckComplete(pattern, valid); |
}; |
/** |
@@ -198,8 +202,8 @@ cr.define('options', function() { |
* @param {string} contentType Can be 'mic' or 'camera'. |
* @param {boolean} show Whether to show (or hide) the link. |
*/ |
- ContentSettings.showMediaPepperFlashLink = |
- function(linkType, contentType, show) { |
+ ContentSettings.showMediaPepperFlashLink = function( |
+ linkType, contentType, show) { |
assert(['default', 'exceptions'].indexOf(linkType) >= 0); |
assert(['mic', 'camera'].indexOf(contentType) >= 0); |
$('media-pepper-flash-' + linkType + '-' + contentType).hidden = !show; |
@@ -218,8 +222,8 @@ cr.define('options', function() { |
} else if (type == 'camera') { |
deviceSelect = $('media-select-camera'); |
} else { |
- console.error('Unknown device type for <device select> UI element: ' + |
- type); |
+ console.error( |
+ 'Unknown device type for <device select> UI element: ' + type); |
return; |
} |
@@ -245,8 +249,9 @@ cr.define('options', function() { |
*/ |
ContentSettings.setDevicesMenuVisibility = function(type, show) { |
assert(type == 'media-stream-mic' || type == 'media-stream-camera'); |
- var deviceSelect = $(type == 'media-stream-mic' ? 'media-select-mic' : |
- 'media-select-camera'); |
+ var deviceSelect = |
+ $(type == 'media-stream-mic' ? 'media-select-mic' : |
+ 'media-select-camera'); |
deviceSelect.hidden = !show; |
}; |
@@ -279,8 +284,6 @@ cr.define('options', function() { |
}; |
// Export |
- return { |
- ContentSettings: ContentSettings |
- }; |
+ return {ContentSettings: ContentSettings}; |
}); |