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

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

Issue 147226: Make the new new tab page the default new tab page.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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.html
===================================================================
--- chrome/browser/resources/new_new_tab.html (revision 19334)
+++ chrome/browser/resources/new_new_tab.html (working copy)
@@ -1,191 +0,0 @@
-<!DOCTYPE html>
-<html id="t" jsvalues="dir:textdirection;firstview:firstview;bookmarkbarattached:bookmarkbarattached;hasattribution:hasattribution;anim:anim">
-
-<meta charset="utf-8">
-<title jscontent="title"></title>
-<script>
-// Logging info for benchmarking purposes.
-var log = [];
-function logEvent(name) {
- log.push([name, Date.now()]);
-}
-
-var global = this;
-
-/**
- * Registers a callback function so that if the backend calls it too early it
- * will get delayed until DOMContentLoaded is fired.
- * @param {string} name The name of the global function that the backend calls.
- */
-function registerCallback(name) {
- var f = function(var_args) {
- var args = Array.prototype.slice.call(arguments);
- // If we still have the temporary function we delay until the dom is ready.
- if (global[name] == f) {
- logEvent(name + ' is not yet ready. Waiting for DOMContentLoaded');
- document.addEventListener('DOMContentLoaded', function() {
- logEvent('Calling the new ' + name);
- global[name].apply(null, args);
- });
- }
- };
- global[name] = f;
-}
-
-chrome.send('getShownSections');
-chrome.send('getMostVisited');
-chrome.send('getDownloads');
-chrome.send('getRecentlyClosedTabs');
-chrome.send('getTips');
-
-registerCallback('onShownSections');
-registerCallback('mostVisitedPages');
-registerCallback('downloadsList');
-registerCallback('recentlyClosedTabs');
-registerCallback('tips');
-
-logEvent('log start');
-
-</script>
-<link rel="stylesheet" href="new_new_tab.css">
-<link id="themecss" rel="stylesheet" href="chrome://theme/css/newtab.css">
-</head>
-<body class="loading"
- jsvalues=".style.fontFamily:fontfamily;.style.fontSize:fontsize">
-
-<div id="main">
-
- <div id="view-toolbar"><input type=checkbox id="thumb-checkbox"
- ><input type=checkbox id="list-checkbox"
- ><input type="button" id="option-button"></div>
-
-
-<div id="option-menu" class="window-menu">
- <div section="THUMB" show="true" jscontent="showthumbnails"></div>
- <div section="THUMB" show="false" jscontent="hidethumbnails"></div>
- <div section="LIST" show="true" jscontent="showlist"></div>
- <div section="LIST" show="false" jscontent="hidelist"></div>
- <div section="RECENT" show="true" jscontent="showrecent"></div>
- <div section="RECENT" show="false" jscontent="hiderecent"></div>
- <div section="TIPS" show="true"
- jscontent="showtips"></div>
- <div section="TIPS" show="false"
- jscontent="hidetips"></div>
-</div>
-
- <div id="notification">
- <span>&nbsp;</span>
- <span><span class="link" tabindex="0"></span></span>
- </div>
-
- <div id="most-visited" jsskip="!processing">
- <a class="thumbnail-container" style="display:none" id="thumbnail-template">
- <div class="edit-mode-border">
- <div class="edit-bar">
- <div class="pin"></div>
- <div class="spacer"></div>
- <div class="remove"></div>
- </div>
- <span class="thumbnail-wrapper">
- <span class="thumbnail"></span>
- </span>
- </div>
- <div class="title">
- <div></div>
- </div>
- </a>
-
- </div>
-
- <div id="lower-sections">
-
- <div id="recent-activities" class="section">
- <h2 jscontent="recentactivities"></h2>
-
- <div class="hbox">
-
- <div id="recent-tabs">
- <h3 jscontent="recentlyclosed"></h3>
-
- <div class="item-container">
- <div id="tab-items" jsskip="!processing">
- <div jsselect="$this">
- <a class="item"
- jsdisplay="type == 'tab'"
- jsvalues="href:url;
- title:title;
- .style.backgroundImage:'url(chrome://favicon/' + url +
- ')';
- dir:direction;
- .sessionId:sessionId"
- jscontent="title"></a>
- <div jsdisplay="type == 'window'"
- class="item link window"
- jsvalues=".sessionId:sessionId;
- .tabItems:tabs"
- tabindex="0">
- <span jscontent="formatTabsText($this.tabs.length)"></span>
- </div>
- </div>
- </div>
-
- <div>
- <a href="chrome://history/" class="item nav"
- jscontent="viewfullhistory"></a>
- </div>
-
- </div>
- </div>
-
- <div id="downloads">
- <h3 jscontent="downloads"></h3>
- <div class="item-container">
- <div id="download-items" jsskip="!processing">
- <a class="item" jsselect="$this"
- jsdisplay="state != 'CANCELLED'"
- jsvalues="href:file_path;title:url;
- .style.backgroundImage:'url(chrome://fileicon/' +
- file_path + ')';
- dir:direction;
- .fileId:id"
- jscontent="file_name"></a>
- </div>
-
- <div>
- <a href="chrome://downloads/" class="item nav"
- jscontent="viewalldownloads"></a>
- </div>
-
- </div>
- </div>
-
- </div>
-
- </div><div class="spacer">
-
- </div><div id="tips" class="section">
- <h2>Tips and Suggestions</h2>
- <div class="item-container">
- <div id="tip-items" jsskip="!processing">
- <a class="item" jsselect="$this"
- jsvalues="href:url;title:title"
- jscontent="title"></a>
- </div>
- </div>
- </div>
- </div>
-
-</div> <!-- main -->
-
-<div jsskip="true">
- <div class="window-menu" id="window-menu">
- <span class="item" jsselect="$this"
- jsvalues=".style.backgroundImage:'url(chrome://favicon/' + url + ')';
- dir:direction;"
- jscontent="title"></span>
- </div>
-</div>
-
-<script src="local_strings.js"></script>
-<script src="new_new_tab.js"></script>
-</html>

Powered by Google App Engine
This is Rietveld 408576698