Index: chrome/browser/resources/ntp4/new_tab.js |
diff --git a/chrome/browser/resources/ntp4/new_tab.js b/chrome/browser/resources/ntp4/new_tab.js |
index b127c69a3df63f43ef1c19d4ca471c052bc3ec23..678be69906002c8e89a2f31ec1e0c57d60e3d461 100644 |
--- a/chrome/browser/resources/ntp4/new_tab.js |
+++ b/chrome/browser/resources/ntp4/new_tab.js |
@@ -8,15 +8,6 @@ |
* browsers. For now this is still a prototype. |
*/ |
-/** |
- * @typedef {{direction: string, |
- * filler: (boolean|undefined), |
- * title: string, |
- * url: string}} |
- * @see chrome/browser/ui/webui/ntp/most_visited_handler.cc |
- */ |
-var PageData; |
- |
// Use an anonymous function to enable strict mode just for this file (which |
// will be concatenated with other files when embedded in Chrome |
cr.define('ntp', function() { |
@@ -120,8 +111,6 @@ cr.define('ntp', function() { |
*/ |
function onLoad() { |
sectionsToWaitFor = 0; |
- if (loadTimeData.getBoolean('showMostvisited')) |
- sectionsToWaitFor++; |
if (loadTimeData.getBoolean('showApps')) { |
sectionsToWaitFor++; |
if (loadTimeData.getBoolean('showAppLauncherPromo')) { |
@@ -142,18 +131,6 @@ cr.define('ntp', function() { |
notificationContainer.addEventListener( |
'webkitTransitionEnd', onNotificationTransitionEnd); |
- if (loadTimeData.getBoolean('showMostvisited')) { |
- var mostVisited = new ntp.MostVisitedPage(); |
- // Move the footer into the most visited page if we are in "bare minimum" |
- // mode. |
- if (document.body.classList.contains('bare-minimum')) |
- mostVisited.appendFooter(getRequiredElement('footer')); |
- newTabView.appendTilePage(mostVisited, |
- loadTimeData.getString('mostvisited'), |
- false); |
- chrome.send('getMostVisited'); |
- } |
- |
if (!loadTimeData.getBoolean('showWebStoreIcon')) { |
var webStoreIcon = $('chrome-web-store-link'); |
// Not all versions of the NTP have a footer, so this may not exist. |
@@ -326,14 +303,11 @@ cr.define('ntp', function() { |
* its length may be measured and the nav dots sized accordingly. |
*/ |
function measureNavDots() { |
- var pxWidth = measureNavDot('appDefaultPageName'); |
- if (loadTimeData.getBoolean('showMostvisited')) |
- pxWidth = Math.max(measureNavDot('mostvisited'), pxWidth); |
- |
var styleElement = document.createElement('style'); |
styleElement.type = 'text/css'; |
// max-width is used because if we run out of space, the nav dots will be |
// shrunk. |
+ var pxWidth = measureNavDot('appDefaultPageName'); |
styleElement.textContent = '.dot { max-width: ' + pxWidth + 'px; }'; |
document.querySelector('head').appendChild(styleElement); |
} |
@@ -507,15 +481,6 @@ cr.define('ntp', function() { |
} |
/** |
- * @param {Array<PageData>} data |
- * @param {boolean} hasBlacklistedUrls |
- */ |
- function setMostVisitedPages(data, hasBlacklistedUrls) { |
- newTabView.mostVisitedPage.data = data; |
- cr.dispatchSimpleEvent(document, 'sectionready', true, true); |
- } |
- |
- /** |
* Set the dominant color for a node. This will be called in response to |
* getFaviconDominantColor. The node represented by |id| better have a setter |
* for stripeColor. |
@@ -574,16 +539,6 @@ cr.define('ntp', function() { |
} |
/** |
- * Logs the time to click for the specified item. |
- * @param {string} item The item to log the time-to-click. |
- */ |
- function logTimeToClick(item) { |
- var timeToClick = Date.now() - startTime; |
- chrome.send('logTimeToClick', |
- ['NewTabPage.TimeToClick' + item, timeToClick]); |
- } |
- |
- /** |
* Wrappers to forward the callback to corresponding PageListView member. |
*/ |
@@ -706,12 +661,10 @@ cr.define('ntp', function() { |
getCardSlider: getCardSlider, |
onLoad: onLoad, |
leaveRearrangeMode: leaveRearrangeMode, |
- logTimeToClick: logTimeToClick, |
NtpFollowAction: NtpFollowAction, |
saveAppPageName: saveAppPageName, |
setAppToBeHighlighted: setAppToBeHighlighted, |
setBookmarkBarAttached: setBookmarkBarAttached, |
- setMostVisitedPages: setMostVisitedPages, |
setFaviconDominantColor: setFaviconDominantColor, |
showNotification: showNotification, |
themeChanged: themeChanged, |