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

Side by Side Diff: chrome/browser/resources/new_tab.html

Issue 144022: Removes some duplicated code to use LocalStrings formatString instead... (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/new_new_tab.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <html id="t" jsvalues="dir:textdirection;firstview:firstview;bookmarkbarattached :bookmarkbarattached;hasattribution:hasattribution;anim:anim"> 2 <html id="t" jsvalues="dir:textdirection;firstview:firstview;bookmarkbarattached :bookmarkbarattached;hasattribution:hasattribution;anim:anim">
3 <!-- 3 <!--
4 This page is optimized for perceived performance. Our enemies are the time 4 This page is optimized for perceived performance. Our enemies are the time
5 taken for the backend to generate our data, and the time taken to parse 5 taken for the backend to generate our data, and the time taken to parse
6 and render the starting HTML/CSS content of the page. This page is 6 and render the starting HTML/CSS content of the page. This page is
7 designed to let Chrome do both of those things in parallel. 7 designed to let Chrome do both of those things in parallel.
8 8
9 1. Defines temporary content callback functions 9 1. Defines temporary content callback functions
10 2. Fires off requests for content (these can come back 20-150ms later) 10 2. Fires off requests for content (these can come back 20-150ms later)
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 /** 781 /**
782 * Returns the text used for a recently closed window. 782 * Returns the text used for a recently closed window.
783 * 783 *
784 * @param numTabs number of tabs in the window 784 * @param numTabs number of tabs in the window
785 * 785 *
786 * @return the text to use 786 * @return the text to use
787 */ 787 */
788 function recentlyClosedWindowText(numTabs) { 788 function recentlyClosedWindowText(numTabs) {
789 if (numTabs == 1) 789 if (numTabs == 1)
790 return localStrings.getString('closedwindowsingle'); 790 return localStrings.getString('closedwindowsingle');
791 return localStrings.getString('closedwindowmultiple').replace('%', numTabs); 791 return localStrings.formatString('closedwindowmultiple', numTabs);
792 } 792 }
793 793
794 /** 794 /**
795 * Creates an item to go in the recent bookmarks or recently closed lists. 795 * Creates an item to go in the recent bookmarks or recently closed lists.
796 * 796 *
797 * @param {String} tagName Tagname for the DOM element to create. 797 * @param {String} tagName Tagname for the DOM element to create.
798 * @param {Object} data Object with title, url, and direction to popuplate the e lement. 798 * @param {Object} data Object with title, url, and direction to popuplate the e lement.
799 * 799 *
800 * @return {Node} The element containing the bookmark. 800 * @return {Node} The element containing the bookmark.
801 */ 801 */
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 background: url(chrome://theme/newtab_closed_window); 1023 background: url(chrome://theme/newtab_closed_window);
1024 background-repeat: no-repeat; 1024 background-repeat: no-repeat;
1025 } 1025 }
1026 html[dir='rtl'] .recent-window-container { 1026 html[dir='rtl'] .recent-window-container {
1027 background-position: right; 1027 background-position: right;
1028 padding-right: 22px; 1028 padding-right: 22px;
1029 } 1029 }
1030 </style> 1030 </style>
1031 1031
1032 </html> 1032 </html>
OLDNEW
« no previous file with comments | « chrome/browser/resources/new_new_tab.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698