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

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

Issue 8505041: ntp: make the app promo button use LaunchApp instead of being a dumb <a> link (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698