| OLD | NEW |
| 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 cr.define('cr.icon', function() { | 5 cr.define('cr.icon', function() { |
| 6 /** | 6 /** |
| 7 * @return {!Array<number>} The scale factors supported by this platform for | 7 * @return {!Array<number>} The scale factors supported by this platform for |
| 8 * webui resources. | 8 * webui resources. |
| 9 */ | 9 */ |
| 10 function getSupportedScaleFactors() { | 10 function getSupportedScaleFactors() { |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 var type = opt_type || 'favicon'; | 91 var type = opt_type || 'favicon'; |
| 92 | 92 |
| 93 return imageset( | 93 return imageset( |
| 94 'chrome://' + type + '/size/' + size + '@scalefactorx/' + | 94 'chrome://' + type + '/size/' + size + '@scalefactorx/' + |
| 95 // Note: Literal 'iconurl' must match |kIconURLParameter| in | 95 // Note: Literal 'iconurl' must match |kIconURLParameter| in |
| 96 // components/favicon_base/favicon_url_parser.cc. | 96 // components/favicon_base/favicon_url_parser.cc. |
| 97 (FAVICON_URL_REGEX.test(url) ? 'iconurl/' : '') + url); | 97 (FAVICON_URL_REGEX.test(url) ? 'iconurl/' : '') + url); |
| 98 } | 98 } |
| 99 | 99 |
| 100 return { | 100 return { |
| 101 getSupportedScaleFactors: getSupportedScaleFactors, |
| 101 getProfileAvatarIcon: getProfileAvatarIcon, | 102 getProfileAvatarIcon: getProfileAvatarIcon, |
| 102 getFaviconImageSet: getFaviconImageSet, | 103 getFaviconImageSet: getFaviconImageSet, |
| 103 }; | 104 }; |
| 104 }); | 105 }); |
| OLD | NEW |