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

Side by Side Diff: chrome/browser/resources/extensions/extension_list.js

Issue 16831012: Fix a bug where an extension's icon was not being properly updated. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 6 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
« no previous file with comments | « AUTHORS ('k') | chrome/browser/ui/webui/extensions/extension_basic_info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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('options', function() { 5 cr.define('options', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * A lookup helper function to find the first node that has an id (starting 9 * A lookup helper function to find the first node that has an id (starting
10 * at |node| and going up the parent chain). 10 * at |node| and going up the parent chain).
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 node.classList.add('inactive-extension'); 90 node.classList.add('inactive-extension');
91 91
92 if (!extension.userModifiable) 92 if (!extension.userModifiable)
93 node.classList.add('may-not-disable'); 93 node.classList.add('may-not-disable');
94 94
95 var idToHighlight = this.getIdQueryParam_(); 95 var idToHighlight = this.getIdQueryParam_();
96 if (node.id == idToHighlight) 96 if (node.id == idToHighlight)
97 node.classList.add('extension-highlight'); 97 node.classList.add('extension-highlight');
98 98
99 var item = node.querySelector('.extension-list-item'); 99 var item = node.querySelector('.extension-list-item');
100 item.style.backgroundImage = 'url(' + extension.icon + ')'; 100 item.style.backgroundImage = 'url(' + extension.icon + '?' +
101 extension.imageId + ')';
101 102
102 var title = node.querySelector('.extension-title'); 103 var title = node.querySelector('.extension-title');
103 title.textContent = extension.name; 104 title.textContent = extension.name;
104 105
105 var version = node.querySelector('.extension-version'); 106 var version = node.querySelector('.extension-version');
106 version.textContent = extension.version; 107 version.textContent = extension.version;
107 108
108 var locationText = node.querySelector('.location-text'); 109 var locationText = node.querySelector('.location-text');
109 locationText.textContent = extension.locationText; 110 locationText.textContent = extension.locationText;
110 111
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 } 315 }
315 316
316 this.appendChild(node); 317 this.appendChild(node);
317 } 318 }
318 }; 319 };
319 320
320 return { 321 return {
321 ExtensionsList: ExtensionsList 322 ExtensionsList: ExtensionsList
322 }; 323 };
323 }); 324 });
OLDNEW
« no previous file with comments | « AUTHORS ('k') | chrome/browser/ui/webui/extensions/extension_basic_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698