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

Unified Diff: chrome/browser/resources/chromeos/user_images_grid.js

Issue 10830341: options image grid: Make sure the images are requested with the appropriate scale. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/user_images_grid.js
diff --git a/chrome/browser/resources/chromeos/user_images_grid.js b/chrome/browser/resources/chromeos/user_images_grid.js
index cde2fc7a527b5af6f5e04dfa107551ee3aa74a72..335d00651181ea1b4345950187da1fef74700edf 100644
--- a/chrome/browser/resources/chromeos/user_images_grid.js
+++ b/chrome/browser/resources/chromeos/user_images_grid.js
@@ -64,7 +64,11 @@ cr.define('options', function() {
decorate: function() {
GridItem.prototype.decorate.call(this);
var imageEl = cr.doc.createElement('img');
- imageEl.src = this.dataItem.url;
+ var scheme = 'chrome://';
+ if (this.dataItem.url.slice(0, scheme.length) == scheme)
Ivan Korotkov 2012/08/16 17:47:53 Optional: using a regexp or url.indexOf(scheme) ==
sadrul 2012/08/16 19:36:16 I considered using indexOf at first. But since thi
Ivan Korotkov 2012/08/17 08:01:43 Right, makes sense.
+ imageEl.src = this.dataItem.url + '@' + window.devicePixelRatio + 'x';
+ else
+ imageEl.src = this.dataItem.url;
imageEl.title = this.dataItem.title || '';
if (typeof this.dataItem.clickHandler == 'function')
imageEl.addEventListener('mousedown', this.dataItem.clickHandler);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698