| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // File Description: | 5 // File Description: |
| 6 // Contains all the necessary functions for rendering the NTP on mobile | 6 // Contains all the necessary functions for rendering the NTP on mobile |
| 7 // devices. | 7 // devices. |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * The event type used to determine when a touch starts. | 10 * The event type used to determine when a touch starts. |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 * @param {function(Object, string, BrowserEvent)=} opt_clickCallback The | 585 * @param {function(Object, string, BrowserEvent)=} opt_clickCallback The |
| 586 * click callback to be triggered upon selection (if not provided it will | 586 * click callback to be triggered upon selection (if not provided it will |
| 587 * use the default -- itemShortcutClickHandler). | 587 * use the default -- itemShortcutClickHandler). |
| 588 * @return {Element} The shortcut element created. | 588 * @return {Element} The shortcut element created. |
| 589 */ | 589 */ |
| 590 function makeRecentlyClosedTabletItem(item, opt_clickCallback) { | 590 function makeRecentlyClosedTabletItem(item, opt_clickCallback) { |
| 591 var cell = createDiv('cell'); | 591 var cell = createDiv('cell'); |
| 592 | 592 |
| 593 cell.setAttribute(CONTEXT_MENU_URL_KEY, item.url); | 593 cell.setAttribute(CONTEXT_MENU_URL_KEY, item.url); |
| 594 | 594 |
| 595 var iconUrl = item.icon || 'chrome://touch-icon/size/64/' + item.url; | 595 var iconUrl = item.icon || 'chrome://touch-icon/size/16/' + item.url; |
| 596 var icon = createDiv('icon', iconUrl); | 596 var icon = createDiv('icon', iconUrl); |
| 597 trackImageLoad(iconUrl); | 597 trackImageLoad(iconUrl); |
| 598 cell.appendChild(icon); | 598 cell.appendChild(icon); |
| 599 | 599 |
| 600 var title = createDiv('title'); | 600 var title = createDiv('title'); |
| 601 title.textContent = item.title; | 601 title.textContent = item.title; |
| 602 cell.appendChild(title); | 602 cell.appendChild(title); |
| 603 | 603 |
| 604 wrapClickHandler(cell, item, opt_clickCallback); | 604 wrapClickHandler(cell, item, opt_clickCallback); |
| 605 | 605 |
| (...skipping 2008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2614 // NTP Entry point. | 2614 // NTP Entry point. |
| 2615 ///////////////////////////////////////////////////////////////////////////// | 2615 ///////////////////////////////////////////////////////////////////////////// |
| 2616 | 2616 |
| 2617 /* | 2617 /* |
| 2618 * Handles initializing the UI when the page has finished loading. | 2618 * Handles initializing the UI when the page has finished loading. |
| 2619 */ | 2619 */ |
| 2620 window.addEventListener('DOMContentLoaded', function(evt) { | 2620 window.addEventListener('DOMContentLoaded', function(evt) { |
| 2621 ntp.init(); | 2621 ntp.init(); |
| 2622 $('content-area').style.display = 'block'; | 2622 $('content-area').style.display = 'block'; |
| 2623 }); | 2623 }); |
| OLD | NEW |