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

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

Issue 2282603002: [HBD] Update MD SiteSettingsHandler to support 3 modes. (Closed)
Patch Set: fix comment Created 4 years, 3 months 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
« no previous file with comments | « no previous file | chrome/browser/resources/settings/site_settings/site_settings_category.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 = {
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 /** 425 /**
426 * Returns the icon to use for a given site. 426 * Returns the icon to use for a given site.
427 * @param {string} site The url of the site to fetch the icon for. 427 * @param {string} site The url of the site to fetch the icon for.
428 * @return {string} The background-image style with the favicon. 428 * @return {string} The background-image style with the favicon.
429 * @private 429 * @private
430 */ 430 */
431 computeSiteIcon: function(site) { 431 computeSiteIcon: function(site) {
432 var url = this.ensureUrlHasScheme(site); 432 var url = this.ensureUrlHasScheme(site);
433 return 'background-image: ' + cr.icon.getFaviconImageSet(url); 433 return 'background-image: ' + cr.icon.getFaviconImageSet(url);
434 }, 434 },
435
436 /**
437 * Returns true if the passed content setting is considered 'enabled'.
438 * @param {string} category
439 * @param {string} setting
440 * @return {boolean}
441 * @private
442 */
443 computeIsSettingEnabled: function(category, setting) {
444 // FullScreen is Allow vs. Ask.
445 return category == settings.ContentSettingsTypes.FULLSCREEN ?
446 setting != settings.PermissionValues.ASK :
447 setting != settings.PermissionValues.BLOCK;
448 },
435 }; 449 };
436 450
437 /** @polymerBehavior */ 451 /** @polymerBehavior */
438 var SiteSettingsBehavior = [SiteSettingsBehaviorImpl]; 452 var SiteSettingsBehavior = [SiteSettingsBehaviorImpl];
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/settings/site_settings/site_settings_category.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698