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

Side by Side Diff: chrome/browser/resources/ntp4/recently_closed.js

Issue 10141005: switch ntp to jstemplate v2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test once and for all Created 8 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview The recently closed menu: button, model data, and menu. 6 * @fileoverview The recently closed menu: button, model data, and menu.
7 */ 7 */
8 8
9 cr.define('ntp', function() { 9 cr.define('ntp', function() {
10 'use strict'; 10 'use strict';
11 11
12 var localStrings = new LocalStrings();
13
14 /** 12 /**
15 * Returns the text used for a recently closed window. 13 * Returns the text used for a recently closed window.
16 * @param {number} numTabs Number of tabs in the window. 14 * @param {number} numTabs Number of tabs in the window.
17 * @return {string} The text to use. 15 * @return {string} The text to use.
18 */ 16 */
19 function formatTabsText(numTabs) { 17 function formatTabsText(numTabs) {
20 if (numTabs == 1) 18 if (numTabs == 1)
21 return localStrings.getString('closedwindowsingle'); 19 return loadTimeData.getString('closedwindowsingle');
22 return localStrings.getStringF('closedwindowmultiple', numTabs); 20 return loadTimeData.getStringF('closedwindowmultiple', numTabs);
23 } 21 }
24 22
25 var Menu = cr.ui.Menu; 23 var Menu = cr.ui.Menu;
26 var MenuItem = cr.ui.MenuItem; 24 var MenuItem = cr.ui.MenuItem;
27 var MenuButton = cr.ui.MenuButton; 25 var MenuButton = cr.ui.MenuButton;
28 var RecentMenuButton = cr.ui.define('button'); 26 var RecentMenuButton = cr.ui.define('button');
29 27
30 RecentMenuButton.prototype = { 28 RecentMenuButton.prototype = {
31 __proto__: MenuButton.prototype, 29 __proto__: MenuButton.prototype,
32 30
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 104
107 this.menu.appendChild(a); 105 this.menu.appendChild(a);
108 cr.ui.decorate(a, MenuItem); 106 cr.ui.decorate(a, MenuItem);
109 }, 107 },
110 }; 108 };
111 109
112 return { 110 return {
113 RecentMenuButton: RecentMenuButton, 111 RecentMenuButton: RecentMenuButton,
114 }; 112 };
115 }); 113 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp4/page_list_view.js ('k') | chrome/browser/resources/ntp4/suggestions_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698