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

Unified Diff: chrome/browser/resources/shared/js/util.js

Issue 11747016: Add support for high DPI favicons on the "other devices" menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ordering in header file. Created 7 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/ntp4/other_sessions.js ('k') | chrome/browser/ui/webui/favicon_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/shared/js/util.js
diff --git a/chrome/browser/resources/shared/js/util.js b/chrome/browser/resources/shared/js/util.js
index 29cdd96b442971e52461f4b4c869138e24396ba5..1377f40c4ff2a4f5bc90832f9e6182a6104189dd 100644
--- a/chrome/browser/resources/shared/js/util.js
+++ b/chrome/browser/resources/shared/js/util.js
@@ -231,11 +231,14 @@ function appendParam(url, key, value) {
* Creates a new URL for a favicon request.
* @param {string} url The url for the favicon.
* @param {number=} opt_size Optional preferred size of the favicon.
+ * @param {boolean=} opt_sessionFavicon Optional flag to indicate if
+ * requesting a session favicon.
* @return {string} Updated URL for the favicon.
*/
-function getFaviconUrl(url, opt_size) {
+function getFaviconUrl(url, opt_size, opt_sessionFavicon) {
var size = opt_size || 16;
- return 'chrome://favicon/size/' + size + '@' +
+ var type = opt_sessionFavicon ? 'session-favicon' : 'favicon';
+ return 'chrome://' + type + '/size/' + size + '@' +
window.devicePixelRatio + 'x/' + url;
}
« no previous file with comments | « chrome/browser/resources/ntp4/other_sessions.js ('k') | chrome/browser/ui/webui/favicon_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698