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

Side by Side Diff: chrome/browser/resources/ntp_search/most_visited_page.js

Issue 11566026: NTP5: Apps regression fix. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: NTP5: Apps regression fix Created 8 years 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 cr.define('ntp', function() { 5 cr.define('ntp', function() {
6 'use strict'; 6 'use strict';
7 7
8 var Thumbnail = ntp.Thumbnail; 8 var Thumbnail = ntp.Thumbnail;
9 var ThumbnailPage = ntp.ThumbnailPage; 9 var ThumbnailPage = ntp.ThumbnailPage;
10 10
11 /** 11 /**
12 * Creates a new Most Visited object for tiling. 12 * Creates a new Most Visited object for tiling.
13 * @param {Object=} opt_data The data representing the most visited page.
13 * @constructor 14 * @constructor
14 * @extends {Thumbnail} 15 * @extends {Thumbnail}
15 * @extends {HTMLAnchorElement} 16 * @extends {HTMLAnchorElement}
16 */ 17 */
17 function MostVisited() { 18 function MostVisited(opt_data) {
18 var el = cr.doc.createElement('a'); 19 var el = cr.doc.createElement('a');
19 el.__proto__ = MostVisited.prototype; 20 el.__proto__ = MostVisited.prototype;
20 el.initialize(); 21 el.initialize();
21 22
23 if (opt_data)
24 el.data = opt_data;
25
22 return el; 26 return el;
23 } 27 }
24 28
25 MostVisited.prototype = { 29 MostVisited.prototype = {
26 __proto__: Thumbnail.prototype, 30 __proto__: Thumbnail.prototype,
27 31
28 /** 32 /**
29 * Initializes a MostVisited Thumbnail. 33 * Initializes a MostVisited Thumbnail.
30 */ 34 */
31 initialize: function() { 35 initialize: function() {
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 chrome.send('mostVisitedSelected'); 233 chrome.send('mostVisitedSelected');
230 } 234 }
231 }; 235 };
232 236
233 return { 237 return {
234 MostVisitedPage: MostVisitedPage, 238 MostVisitedPage: MostVisitedPage,
235 }; 239 };
236 }); 240 });
237 241
238 document.addEventListener('ntpLoaded', ntp.MostVisitedPage.onLoaded); 242 document.addEventListener('ntpLoaded', ntp.MostVisitedPage.onLoaded);
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp_search/apps_page.js ('k') | chrome/browser/resources/ntp_search/new_tab.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698