| Index: chrome/browser/resources/options/website_settings.js
|
| diff --git a/chrome/browser/resources/options/website_settings.js b/chrome/browser/resources/options/website_settings.js
|
| index 4c909ac40cda7810fd42ee325e30ab3f4f21bbc9..eb663e3d06f2ea404c4f91000a0ed981825de911 100644
|
| --- a/chrome/browser/resources/options/website_settings.js
|
| +++ b/chrome/browser/resources/options/website_settings.js
|
| @@ -69,6 +69,11 @@ cr.define('options', function() {
|
| chrome.send('setDefaultContentSetting', [this.value]);
|
| };
|
|
|
| + $('global-setting-toggle').onchange = function(event) {
|
| + var value = event.target.checked;
|
| + chrome.send('setGlobalEnabled', [value]);
|
| + };
|
| +
|
| var searchBox = $('website-settings-search-box');
|
| searchBox.addEventListener('search',
|
| this.handleSearchQueryChange_.bind(this));
|
| @@ -147,9 +152,10 @@ cr.define('options', function() {
|
| which will be used to sort the origins in the main/allowed list.
|
| * @param {!Object} blockedDict An optional dictionary of origins to their
|
| usage, which will be used to sort the origins in the blocked list.
|
| + * @param {bool} isGloballyEnabled If the content setting is turned on.
|
| * @private
|
| */
|
| - populateOrigins: function(allowedDict, blockedDict) {
|
| + populateOrigins: function(allowedDict, blockedDict, isGloballyEnabled) {
|
| this.populateOriginsHelper_(this.allowedList_, allowedDict);
|
| if (blockedDict) {
|
| this.populateOriginsHelper_(this.blockedList_, blockedDict);
|
| @@ -161,6 +167,7 @@ cr.define('options', function() {
|
| $('blocked-origin-list-title').hidden = true;
|
| this.allowedList_.classList.add('nonsplit-origin-list');
|
| }
|
| + $('global-setting-toggle').checked = isGloballyEnabled;
|
| },
|
|
|
| /**
|
| @@ -241,9 +248,10 @@ cr.define('options', function() {
|
| }
|
| };
|
|
|
| - WebsiteSettingsManager.populateOrigins = function(allowedDict, blockedDict) {
|
| + WebsiteSettingsManager.populateOrigins = function(allowedDict, blockedDict,
|
| + isGloballyEnabled) {
|
| WebsiteSettingsManager.getInstance().populateOrigins(allowedDict,
|
| - blockedDict);
|
| + blockedDict, isGloballyEnabled);
|
| };
|
|
|
| WebsiteSettingsManager.updateDefault = function(dict) {
|
|
|