| 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 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 dataTransfer.dropEffect = 'copy'; | 545 dataTransfer.dropEffect = 'copy'; |
| 546 }, | 546 }, |
| 547 }; | 547 }; |
| 548 | 548 |
| 549 AppsPage.setPromo = function(data) { | 549 AppsPage.setPromo = function(data) { |
| 550 var store = document.querySelector('.webstore'); | 550 var store = document.querySelector('.webstore'); |
| 551 if (store) | 551 if (store) |
| 552 store.setAppsPromoData(data); | 552 store.setAppsPromoData(data); |
| 553 }; | 553 }; |
| 554 | 554 |
| 555 // Launches the specified app using the APP_LAUNCH_NTP_APP_RE_ENABLE |
| 556 // histogram. This should only be invoked from the AppLauncherHandler. |
| 557 function launchAppAfterEnable(appId) { |
| 558 chrome.send('launchApp', [appId, APP_LAUNCH.NTP_APP_RE_ENABLE]); |
| 559 }; |
| 560 |
| 555 return { | 561 return { |
| 556 APP_LAUNCH: APP_LAUNCH, | 562 APP_LAUNCH: APP_LAUNCH, |
| 557 AppsPage: AppsPage, | 563 AppsPage: AppsPage, |
| 564 launchAppAfterEnable: launchAppAfterEnable, |
| 558 }; | 565 }; |
| 559 }); | 566 }); |
| 567 |
| 568 var launchAppAfterEnable = ntp4.launchAppAfterEnable; |
| OLD | NEW |