| Index: chrome/browser/resources/ntp4/apps_page.js
|
| diff --git a/chrome/browser/resources/ntp4/apps_page.js b/chrome/browser/resources/ntp4/apps_page.js
|
| index 144d40ac1e14e4394eab1ee6c4d134eddc7f7a1c..527713ec1606ded295fb7bc92119f380dfc84b61 100644
|
| --- a/chrome/browser/resources/ntp4/apps_page.js
|
| +++ b/chrome/browser/resources/ntp4/apps_page.js
|
| @@ -257,9 +257,6 @@ cr.define('ntp', function() {
|
| this.appContents_.addEventListener('contextmenu',
|
| cr.ui.contextMenuHandler);
|
|
|
| - if (this.appData_.is_webstore)
|
| - this.createAppsPromoExtras_();
|
| -
|
| this.addEventListener('mousedown', this.onMousedown_, true);
|
| this.addEventListener('keydown', this.onKeydown_);
|
| this.addEventListener('keyup', this.onKeyup_);
|
| @@ -387,49 +384,6 @@ cr.define('ntp', function() {
|
| },
|
|
|
| /**
|
| - * Creates the apps-promo section of the app (should only be called for the
|
| - * webstore app).
|
| - * @private
|
| - */
|
| - createAppsPromoExtras_: function() {
|
| - this.classList.add('webstore');
|
| -
|
| - this.appsPromoExtras_ = $('apps-promo-extras-template').cloneNode(true);
|
| - this.appsPromoExtras_.id = '';
|
| - this.appsPromoHeading_ =
|
| - this.appsPromoExtras_.querySelector('.apps-promo-heading');
|
| - this.appsPromoLink_ =
|
| - this.appsPromoExtras_.querySelector('.apps-promo-link');
|
| - this.appsPromoLink_.addEventListener('click', this.onClick_.bind(this));
|
| -
|
| - this.appsPromoLogo_ = this.ownerDocument.createElement('img');
|
| - this.appsPromoLogo_.className = 'apps-promo-logo';
|
| - this.appImgContainer_.appendChild(this.appsPromoLogo_);
|
| -
|
| - this.appendChild(this.appsPromoExtras_);
|
| - },
|
| -
|
| - /**
|
| - * Sets the apps promo appearance. If |data| is null, there is no promo. If
|
| - * |data| is non-null, it contains strings to be shown for the promo. The
|
| - * promo is only shown when the webstore app icon is alone on a page.
|
| - * @param {Object} data A dictionary that contains apps promo strings.
|
| - */
|
| - setAppsPromoData: function(data) {
|
| - if (data) {
|
| - this.classList.add('has-promo');
|
| - } else {
|
| - this.classList.remove('has-promo');
|
| - return;
|
| - }
|
| -
|
| - this.appsPromoHeading_.textContent = data.promoHeader;
|
| - this.appsPromoLink_.href = data.promoLink;
|
| - this.appsPromoLink_.textContent = data.promoButton;
|
| - this.appsPromoLogo_.src = data.promoLogo;
|
| - },
|
| -
|
| - /**
|
| * Set the size and position of the app tile.
|
| * @param {number} size The total size of |this|.
|
| * @param {number} x The x-position.
|
| @@ -468,13 +422,10 @@ cr.define('ntp', function() {
|
| * @private
|
| */
|
| onClick_: function(e) {
|
| - var is_promo = this.appsPromoExtras_ &&
|
| - window.getComputedStyle(this.appsPromoExtras_).display != 'none';
|
| var url = !this.appData_.is_webstore ? '' :
|
| - is_promo ? this.appsPromoLink_.href :
|
| - appendParam(this.appData_.url,
|
| - 'utm_source',
|
| - 'chrome-ntp-icon');
|
| + appendParam(this.appData_.url,
|
| + 'utm_source',
|
| + 'chrome-ntp-icon');
|
|
|
| chrome.send('launchApp',
|
| [this.appId, APP_LAUNCH.NTP_APPS_MAXIMIZED, url,
|
| @@ -905,12 +856,6 @@ cr.define('ntp', function() {
|
| },
|
| };
|
|
|
| - AppsPage.setPromo = function(data) {
|
| - var store = document.querySelector('.webstore');
|
| - if (store)
|
| - store.setAppsPromoData(data);
|
| - };
|
| -
|
| /**
|
| * Launches the specified app using the APP_LAUNCH_NTP_APP_RE_ENABLE
|
| * histogram. This should only be invoked from the AppLauncherHandler.
|
|
|