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

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

Issue 11787015: Allow the password manager in the settings page to have hidpi favicons too (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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
« no previous file with comments | « no previous file | chrome/browser/resources/ntp_android/ntp_android.js » ('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('ntp', function() { 5 cr.define('ntp', function() {
6 'use strict'; 6 'use strict';
7 7
8 var TilePage = ntp.TilePage; 8 var TilePage = ntp.TilePage;
9 9
10 /** 10 /**
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 this.reset(); 88 this.reset();
89 return; 89 return;
90 } 90 }
91 91
92 var id = tileID++; 92 var id = tileID++;
93 this.id = 'suggestions-tile-' + id; 93 this.id = 'suggestions-tile-' + id;
94 this.data_ = data; 94 this.data_ = data;
95 this.classList.add('focusable'); 95 this.classList.add('focusable');
96 96
97 var faviconDiv = this.querySelector('.favicon'); 97 var faviconDiv = this.querySelector('.favicon');
98 var faviconUrl = 'chrome://favicon/size/16/' + data.url; 98 var faviconUrl = 'chrome://favicon/size/16@1x/' + data.url;
99 faviconDiv.style.backgroundImage = url(faviconUrl); 99 faviconDiv.style.backgroundImage = url(faviconUrl);
100 chrome.send('getFaviconDominantColor', [faviconUrl, this.id]); 100 chrome.send('getFaviconDominantColor', [faviconUrl, this.id]);
101 101
102 var title = this.querySelector('.title'); 102 var title = this.querySelector('.title');
103 title.textContent = data.title; 103 title.textContent = data.title;
104 title.dir = data.direction; 104 title.dir = data.direction;
105 105
106 var score = this.querySelector('.score'); 106 var score = this.querySelector('.score');
107 score.textContent = data.score; 107 score.textContent = data.score;
108 108
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 return oldData; 465 return oldData;
466 } 466 }
467 467
468 return { 468 return {
469 SuggestionsPage: SuggestionsPage, 469 SuggestionsPage: SuggestionsPage,
470 refreshData: refreshData, 470 refreshData: refreshData,
471 }; 471 };
472 }); 472 });
473 473
474 document.addEventListener('ntpLoaded', ntp.SuggestionsPage.onLoaded); 474 document.addEventListener('ntpLoaded', ntp.SuggestionsPage.onLoaded);
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/ntp_android/ntp_android.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698