| 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 8cbf35c8935756adc73781988fb0f03800d87ce9..93c8e1ab99f630344a322ab31293975405780b5a 100644
|
| --- a/chrome/browser/resources/ntp4/apps_page.js
|
| +++ b/chrome/browser/resources/ntp4/apps_page.js
|
| @@ -475,6 +475,7 @@ cr.define('ntp4', function() {
|
| 'utm_source',
|
| 'chrome-ntp-icon');
|
|
|
| + this.recordAppLaunchedFromIndex_();
|
| chrome.send('launchApp',
|
| [this.appId, APP_LAUNCH.NTP_APPS_MAXIMIZED, url,
|
| e.button, e.altKey, e.ctrlKey, e.metaKey, e.shiftKey]);
|
| @@ -490,6 +491,7 @@ cr.define('ntp4', function() {
|
| */
|
| onKeydown_: function(e) {
|
| if (e.keyIdentifier == 'Enter') {
|
| + this.recordAppLaunchedFromIndex_();
|
| chrome.send('launchApp',
|
| [this.appId, APP_LAUNCH.NTP_APPS_MAXIMIZED, '',
|
| 0, e.altKey, e.ctrlKey, e.metaKey, e.shiftKey]);
|
| @@ -499,6 +501,16 @@ cr.define('ntp4', function() {
|
| },
|
|
|
| /**
|
| + * Records the index of an app when launched.
|
| + * @private
|
| + */
|
| + recordAppLaunchedFromIndex_: function() {
|
| + var page = this.tile.tilePage;
|
| + var wide = page.layoutValues.numRowTiles == page.gridValues.maxColCount;
|
| + chrome.send('recordAppLaunchedFromIndex', [this.tile.index, wide]);
|
| + },
|
| +
|
| + /**
|
| * Adds a node to the list of targets that will launch the app. This list
|
| * is also used in onMousedown to determine whether the app contents should
|
| * be shown as active (if we don't do this, then clicking anywhere in
|
|
|