summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/new_new_tab.html
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-27 00:35:56 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-27 00:35:56 +0000
commited95ffbea8f0558c75b99b312b917a71b088a4be (patch)
treee2c7c2f0089726be5b2ac05545cdfff3185d452d /chrome/browser/resources/new_new_tab.html
parenta4fe3a78551184e580ea94cee4c25628b0bb2a23 (diff)
downloadchromium_src-ed95ffbea8f0558c75b99b312b917a71b088a4be.zip
chromium_src-ed95ffbea8f0558c75b99b312b917a71b088a4be.tar.gz
chromium_src-ed95ffbea8f0558c75b99b312b917a71b088a4be.tar.bz2
revert cl 19438
BUG=none TEST=none Review URL: http://codereview.chromium.org/149116 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19444 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/new_new_tab.html')
-rw-r--r--chrome/browser/resources/new_new_tab.html191
1 files changed, 191 insertions, 0 deletions
diff --git a/chrome/browser/resources/new_new_tab.html b/chrome/browser/resources/new_new_tab.html
new file mode 100644
index 0000000..d3a2d22
--- /dev/null
+++ b/chrome/browser/resources/new_new_tab.html
@@ -0,0 +1,191 @@
+<!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>