Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: chrome/ext/background.js

Issue 5838171610808320: Added high resolution icons for Retina displays (Closed)
Patch Set: Addressed comment Created April 3, 2014, 11:40 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « background.js ('k') | chrome/icons/abp-38.png » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/ext/background.js
===================================================================
--- a/chrome/ext/background.js
+++ b/chrome/ext/background.js
@@ -206,7 +206,14 @@
BrowserAction.prototype = {
setIcon: function(path)
{
- chrome.browserAction.setIcon({tabId: this._tabId, path: path});
+ var paths = {};
+ for (var i = 1; i <= 2; i++)
+ {
+ var size = i * 19;
+ paths[size] = path.replace("$size", size);
+ }
+
+ chrome.browserAction.setIcon({tabId: this._tabId, path: paths});
},
setBadge: function(badge)
{
« no previous file with comments | « background.js ('k') | chrome/icons/abp-38.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld