| 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 cr.define('ntp4', function() { | 5 cr.define('ntp4', function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 var localStrings = new LocalStrings; | 8 var localStrings = new LocalStrings; |
| 9 | 9 |
| 10 var APP_LAUNCH = { | 10 var APP_LAUNCH = { |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 */ | 363 */ |
| 364 createAppsPromoExtras_: function() { | 364 createAppsPromoExtras_: function() { |
| 365 this.classList.add('webstore'); | 365 this.classList.add('webstore'); |
| 366 | 366 |
| 367 this.appsPromoExtras_ = $('apps-promo-extras-template').cloneNode(true); | 367 this.appsPromoExtras_ = $('apps-promo-extras-template').cloneNode(true); |
| 368 this.appsPromoExtras_.id = ''; | 368 this.appsPromoExtras_.id = ''; |
| 369 this.appsPromoHeading_ = | 369 this.appsPromoHeading_ = |
| 370 this.appsPromoExtras_.querySelector('.apps-promo-heading'); | 370 this.appsPromoExtras_.querySelector('.apps-promo-heading'); |
| 371 this.appsPromoLink_ = | 371 this.appsPromoLink_ = |
| 372 this.appsPromoExtras_.querySelector('.apps-promo-link'); | 372 this.appsPromoExtras_.querySelector('.apps-promo-link'); |
| 373 this.appsPromoLink_.addEventListener('click', this.onClick_.bind(this)); |
| 373 | 374 |
| 374 this.appsPromoLogo_ = this.ownerDocument.createElement('img'); | 375 this.appsPromoLogo_ = this.ownerDocument.createElement('img'); |
| 375 this.appsPromoLogo_.className = 'apps-promo-logo'; | 376 this.appsPromoLogo_.className = 'apps-promo-logo'; |
| 376 this.appImgContainer_.appendChild(this.appsPromoLogo_); | 377 this.appImgContainer_.appendChild(this.appsPromoLogo_); |
| 377 | 378 |
| 378 this.appendChild(this.appsPromoExtras_); | 379 this.appendChild(this.appsPromoExtras_); |
| 379 this.appsPromoExtras_.hidden = false; | 380 this.appsPromoExtras_.hidden = false; |
| 380 }, | 381 }, |
| 381 | 382 |
| 382 /** | 383 /** |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 appNotificationChanged: appNotificationChanged, | 793 appNotificationChanged: appNotificationChanged, |
| 793 AppsPage: AppsPage, | 794 AppsPage: AppsPage, |
| 794 launchAppAfterEnable: launchAppAfterEnable, | 795 launchAppAfterEnable: launchAppAfterEnable, |
| 795 }; | 796 }; |
| 796 }); | 797 }); |
| 797 | 798 |
| 798 // TODO(estade): update the content handlers to use ntp namespace instead of | 799 // TODO(estade): update the content handlers to use ntp namespace instead of |
| 799 // making these global. | 800 // making these global. |
| 800 var appNotificationChanged = ntp4.appNotificationChanged; | 801 var appNotificationChanged = ntp4.appNotificationChanged; |
| 801 var launchAppAfterEnable = ntp4.launchAppAfterEnable; | 802 var launchAppAfterEnable = ntp4.launchAppAfterEnable; |
| OLD | NEW |