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

Side by Side Diff: chrome/browser/resources/ntp4/other_sessions.js

Issue 11762004: Make favicons for about:history and about:bookmarks switch from lodpi to hidpi when dragging browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | Annotate | Revision Log
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 /** 5 /**
6 * @fileoverview The menu that shows tabs from sessions on other devices. 6 * @fileoverview The menu that shows tabs from sessions on other devices.
7 */ 7 */
8 8
9 cr.define('ntp', function() { 9 cr.define('ntp', function() {
10 'use strict'; 10 'use strict';
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // Show a separator between multiple windows in the same session. 205 // Show a separator between multiple windows in the same session.
206 if (i > 0) 206 if (i > 0)
207 contents.appendChild(doc.createElement('hr')); 207 contents.appendChild(doc.createElement('hr'));
208 208
209 for (var j = 0; j < window.tabs.length; j++) { 209 for (var j = 0; j < window.tabs.length; j++) {
210 var tab = window.tabs[j]; 210 var tab = window.tabs[j];
211 var a = doc.createElement('a'); 211 var a = doc.createElement('a');
212 a.className = 'footer-menu-item'; 212 a.className = 'footer-menu-item';
213 a.textContent = tab.title; 213 a.textContent = tab.title;
214 a.href = tab.url; 214 a.href = tab.url;
215 a.style.backgroundImage = url( 215 a.style.backgroundImage =
216 getFaviconUrl(tab.url, 16, /* session-favicon */ true)); 216 getFaviconImageSet(tab.url, 16, /* session-favicon */ true);
217 217
218 var clickHandler = this.makeClickHandler_( 218 var clickHandler = this.makeClickHandler_(
219 session.tag, String(window.sessionId), String(tab.sessionId)); 219 session.tag, String(window.sessionId), String(tab.sessionId));
220 a.addEventListener('click', clickHandler); 220 a.addEventListener('click', clickHandler);
221 contents.appendChild(a); 221 contents.appendChild(a);
222 } 222 }
223 } 223 }
224 224
225 return contents; 225 return contents;
226 }, 226 },
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 updateMenuItems_: function() { 350 updateMenuItems_: function() {
351 this.collapseItem_.hidden = this.session_.collapsed; 351 this.collapseItem_.hidden = this.session_.collapsed;
352 this.expandItem_.hidden = !this.session_.collapsed; 352 this.expandItem_.hidden = !this.session_.collapsed;
353 } 353 }
354 }; 354 };
355 355
356 return { 356 return {
357 OtherSessionsMenuButton: OtherSessionsMenuButton, 357 OtherSessionsMenuButton: OtherSessionsMenuButton,
358 }; 358 };
359 }); 359 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp4/most_visited_page.js ('k') | chrome/browser/resources/ntp4/recently_closed.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698