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

Side by Side Diff: chrome/browser/resources/md_history/grouped_list.js

Issue 2280853002: Slightly nicer icon.js APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 * @typedef {{domain: string, 6 * @typedef {{domain: string,
7 * visits: !Array<HistoryEntry>, 7 * visits: !Array<HistoryEntry>,
8 * rendered: boolean, 8 * rendered: boolean,
9 * expanded: boolean}} 9 * expanded: boolean}}
10 */ 10 */
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 itemIndex 169 itemIndex
170 ].join('.'); 170 ].join('.');
171 }, 171 },
172 172
173 /** 173 /**
174 * @param {HistoryDomain} domain 174 * @param {HistoryDomain} domain
175 * @return {string} 175 * @return {string}
176 * @private 176 * @private
177 */ 177 */
178 getWebsiteIconStyle_: function(domain) { 178 getWebsiteIconStyle_: function(domain) {
179 return 'background-image: ' + 179 return 'background-image: ' + cr.icon.getFavicon(domain.visits[0].url);
180 cr.icon.getFaviconImageSet(domain.visits[0].url);
181 }, 180 },
182 181
183 /** 182 /**
184 * @param {boolean} expanded 183 * @param {boolean} expanded
185 * @return {string} 184 * @return {string}
186 * @private 185 * @private
187 */ 186 */
188 getDropdownIcon_: function(expanded) { 187 getDropdownIcon_: function(expanded) {
189 return expanded ? 'cr:expand-less' : 'cr:expand-more'; 188 return expanded ? 'cr:expand-less' : 'cr:expand-more';
190 }, 189 },
191 }); 190 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698