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

Side by Side Diff: chrome/browser/resources/ntp4/recently_closed.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 recently closed menu: button, model data, and menu. 6 * @fileoverview The recently closed menu: button, model data, and menu.
7 */ 7 */
8 8
9 cr.define('ntp', function() { 9 cr.define('ntp', function() {
10 'use strict'; 10 'use strict';
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 var isWindow = data.type == 'window'; 76 var isWindow = data.type == 'window';
77 var a = this.ownerDocument.createElement('a'); 77 var a = this.ownerDocument.createElement('a');
78 a.className = 'footer-menu-item'; 78 a.className = 'footer-menu-item';
79 if (isWindow) { 79 if (isWindow) {
80 a.href = ''; 80 a.href = '';
81 a.classList.add('recent-window'); 81 a.classList.add('recent-window');
82 a.textContent = formatTabsText(data.tabs.length); 82 a.textContent = formatTabsText(data.tabs.length);
83 a.title = data.tabs.map(function(tab) { return tab.title; }).join('\n'); 83 a.title = data.tabs.map(function(tab) { return tab.title; }).join('\n');
84 } else { 84 } else {
85 a.href = data.url; 85 a.href = data.url;
86 a.style.backgroundImage = url(getFaviconUrl(data.url)); 86 a.style.backgroundImage = getFaviconImageSet(data.url);
87 a.textContent = data.title; 87 a.textContent = data.title;
88 } 88 }
89 89
90 function onActivated(e) { 90 function onActivated(e) {
91 ntp.logTimeToClick('RecentlyClosed'); 91 ntp.logTimeToClick('RecentlyClosed');
92 chrome.send('recordAppLaunchByURL', 92 chrome.send('recordAppLaunchByURL',
93 [encodeURIComponent(data.url), 93 [encodeURIComponent(data.url),
94 ntp.APP_LAUNCH.NTP_RECENTLY_CLOSED]); 94 ntp.APP_LAUNCH.NTP_RECENTLY_CLOSED]);
95 var index = Array.prototype.indexOf.call(a.parentNode.children, a); 95 var index = Array.prototype.indexOf.call(a.parentNode.children, a);
96 var orig = e.originalEvent; 96 var orig = e.originalEvent;
(...skipping 14 matching lines...) Expand all
111 111
112 this.menu.appendChild(a); 112 this.menu.appendChild(a);
113 cr.ui.decorate(a, MenuItem); 113 cr.ui.decorate(a, MenuItem);
114 }, 114 },
115 }; 115 };
116 116
117 return { 117 return {
118 RecentMenuButton: RecentMenuButton, 118 RecentMenuButton: RecentMenuButton,
119 }; 119 };
120 }); 120 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp4/other_sessions.js ('k') | chrome/browser/resources/ntp_search/thumbnail_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698