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

Side by Side Diff: chrome/browser/resources/settings/site_settings/site_settings_behavior.js

Issue 1428313002: Add a page for showing the details for a given origin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback Created 5 years, 1 month 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 /** 5 /**
6 * @fileoverview Behavior common to Site Settings classes. 6 * @fileoverview Behavior common to Site Settings classes.
7 */ 7 */
8 8
9 /** @polymerBehavior */ 9 /** @polymerBehavior */
10 var SiteSettingsBehaviorImpl = { 10 var SiteSettingsBehaviorImpl = {
11 /** 11 /**
12 * Returns whether the category default is set to enabled or not. 12 * Returns whether the category default is set to enabled or not.
13 * @param {number} category The category to check. 13 * @param {number} category The category to check.
14 * @return {boolean} True if the category default is set to enabled. 14 * @return {boolean} True if the category default is set to enabled.
15 * @protected 15 * @protected
16 */ 16 */
17 isCategoryAllowed: function(category) { 17 isCategoryAllowed: function(category) {
18 var pref = this.getPref(this.computeCategoryPrefName(category)); 18 var pref = this.getPref(this.computeCategoryPrefName(category));
19 19
20 // FullScreen is Allow vs. Ask. 20 // FullScreen is Allow vs. Ask.
21 if (category == settings.ContentSettingsTypes.FULLSCREEN) 21 if (category == settings.ContentSettingsTypes.FULLSCREEN)
22 return pref.value != settings.DefaultValues.ASK; 22 return pref.value != settings.PermissionValues.ASK;
23 23
24 return pref.value != settings.DefaultValues.BLOCK; 24 return pref.value != settings.PermissionValues.BLOCK;
25 }, 25 },
26 26
27 /** 27 /**
28 * A utility function to compute the icon to use for the category. 28 * A utility function to compute the icon to use for the category.
29 * @param {number} category The category to show the icon for. 29 * @param {number} category The category to show the icon for.
30 * @return {string} The id of the icon for the given category. 30 * @return {string} The id of the icon for the given category.
31 * @protected 31 * @protected
32 */ 32 */
33 computeIconForContentCategory: function(category) { 33 computeIconForContentCategory: function(category) {
34 switch (category) { 34 switch (category) {
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 loadTimeData.getString('siteSettingsBlocked'); 181 loadTimeData.getString('siteSettingsBlocked');
182 default: 182 default:
183 assertNotReached(); 183 assertNotReached();
184 return ''; 184 return '';
185 } 185 }
186 }, 186 },
187 }; 187 };
188 188
189 /** @polymerBehavior */ 189 /** @polymerBehavior */
190 var SiteSettingsBehavior = [PrefsBehavior, SiteSettingsBehaviorImpl]; 190 var SiteSettingsBehavior = [PrefsBehavior, SiteSettingsBehaviorImpl];
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698