Skip to content

Commit

Permalink
[MD settings] site data icons and tool tips
Browse files Browse the repository at this point in the history
This Cl restores the site data icons and tool tips on the siteData page.

Bug: None
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Ia29e09f8ed8bf42fb377461b19be86436556ea69
Reviewed-on: https://chromium-review.googlesource.com/669665
Reviewed-by: Patti <patricialor@chromium.org>
Commit-Queue: Dave Schuyler <dschuyler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502640}
  • Loading branch information
dschuyler authored and Commit Bot committed Sep 18, 2017
1 parent d0ef1a9 commit 7e8dcc0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
notify-dom-change>
<div class="settings-box two-line" first$="[[!index]]" id="siteItem"
on-tap="onSiteTap_" actionable>
<div class="favicon-image" style$="[[computeSiteIcon(item.site)]]">
<div class="favicon-image"
style$="background-image: [[favicon_(item.site)]]">
</div>
<div class="middle">
[[item.site]]
Expand Down
12 changes: 12 additions & 0 deletions chrome/browser/resources/settings/site_settings/site_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Polymer({

behaviors: [
CookieTreeBehavior,
I18nBehavior,
],

properties: {
Expand Down Expand Up @@ -50,6 +51,17 @@ Polymer({
this.loadCookies();
},

/**
* Returns the icon to use for a given site.
* @param {string} url The url of the site to fetch the icon for.
* @return {string} Value for background-image style.
* @private
*/
favicon_: function(url) {
return cr.icon.getFavicon(url);
},


/**
* @param {!Map<string, string>} newConfig
* @param {?Map<string, string>} oldConfig
Expand Down

0 comments on commit 7e8dcc0

Please sign in to comment.