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

Unified Diff: chrome/browser/resources/new_new_tab.js

Issue 3236001: Add the collapsed 'miniview' to the apps and most visisted sections. (Closed)
Patch Set: more unnecessary changes Created 10 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
Index: chrome/browser/resources/new_new_tab.js
diff --git a/chrome/browser/resources/new_new_tab.js b/chrome/browser/resources/new_new_tab.js
index a03969a22c76d9cba103b4d14bb45886afcf4dec..2255005c901ac48b6d06fb30f5788373b54d7c78 100644
--- a/chrome/browser/resources/new_new_tab.js
+++ b/chrome/browser/resources/new_new_tab.js
@@ -2,6 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// To avoid creating tons of unnecessary nodes. We assume we cannot fit more
+// than this many items in the miniview.
+var MAX_MINIVIEW_ITEMS = 15;
+
var loading = true;
function updateSimpleSection(id, section) {
@@ -872,9 +876,11 @@ function fixLinkUnderline(el) {
updateAttribution();
-var mostVisited = new MostVisited($('most-visited'),
- useSmallGrid(),
- shownSections & Section.THUMB);
+var mostVisited = new MostVisited(
+ $('most-visited'),
+ $('most-visited-section').getElementsByClassName('miniview')[0],
arv (Not doing code reviews) 2010/08/31 20:54:22 document.querySelector('#most-visited-section .min
+ useSmallGrid(),
+ shownSections & Section.THUMB);
function mostVisitedPages(data, firstRun) {
logEvent('received most visited pages');

Powered by Google App Engine
This is Rietveld 408576698