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

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

Issue 2342473003: [MD settings] site details url below Site details subpage title (Closed)
Patch Set: merge with master 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
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 6 * @fileoverview
7 * 'site-details' show the details (permissions and usage) for a given origin 7 * 'site-details' show the details (permissions and usage) for a given origin
8 * under Site Settings. 8 * under Site Settings.
9 */ 9 */
10 Polymer({ 10 Polymer({
(...skipping 27 matching lines...) Expand all
38 38
39 listeners: { 39 listeners: {
40 'usage-deleted': 'onUsageDeleted', 40 'usage-deleted': 'onUsageDeleted',
41 }, 41 },
42 42
43 ready: function() { 43 ready: function() {
44 this.ContentSettingsTypes = settings.ContentSettingsTypes; 44 this.ContentSettingsTypes = settings.ContentSettingsTypes;
45 }, 45 },
46 46
47 /** 47 /**
48 * @param {string} url Location of an image to get a set of icons for.
49 * @return {string} A set of icon URLs.
50 * @private
51 */
52 getIconSet_: function(url) {
53 return cr.icon.getFavicon(this.ensureUrlHasScheme(url));
54 },
Finnur 2016/09/14 11:00:21 The behavior already has a computeSiteIcon functio
dschuyler 2016/09/14 19:11:33 Done.
55
56 /**
48 * Handler for when the origin changes. 57 * Handler for when the origin changes.
49 */ 58 */
50 onSiteChanged_: function() { 59 onSiteChanged_: function() {
51 // Using originForDisplay avoids the [*.] prefix that some exceptions use. 60 // Using originForDisplay avoids the [*.] prefix that some exceptions use.
52 var url = new URL(this.ensureUrlHasScheme(this.site.originForDisplay)); 61 var url = new URL(this.ensureUrlHasScheme(this.site.originForDisplay));
53 this.$.usageApi.fetchUsageTotal(url.hostname); 62 this.$.usageApi.fetchUsageTotal(url.hostname);
54 }, 63 },
55 64
56 /** 65 /**
57 * Clears all data stored for the current origin. 66 * Clears all data stored for the current origin.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 103
95 /** 104 /**
96 * Returns true if one or more permission is showing. 105 * Returns true if one or more permission is showing.
97 */ 106 */
98 permissionShowing_: function() { 107 permissionShowing_: function() {
99 return Array.prototype.some.call( 108 return Array.prototype.some.call(
100 this.root.querySelectorAll('site-details-permission'), 109 this.root.querySelectorAll('site-details-permission'),
101 function(element) { return element.offsetHeight > 0; }); 110 function(element) { return element.offsetHeight > 0; });
102 }, 111 },
103 }); 112 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698