| Index: chrome/browser/resources/ntp/apps.js
|
| ===================================================================
|
| --- chrome/browser/resources/ntp/apps.js (revision 52778)
|
| +++ chrome/browser/resources/ntp/apps.js (working copy)
|
| @@ -12,7 +12,6 @@
|
| appsSection.appendChild(apps.createElement(app));
|
| });
|
|
|
| -
|
| // TODO(aa): Figure out what to do with the debug mode when we turn apps on
|
| // for everyone.
|
| if (appsSection.hasChildNodes()) {
|
| @@ -20,6 +19,8 @@
|
| if (data.showDebugLink) {
|
| debugSection.classList.remove('disabled');
|
| }
|
| +
|
| + appsSection.appendChild(apps.createWebStoreElement());
|
| } else {
|
| appsSection.classList.add('disabled');
|
| debugSection.classList.add('disabled');
|
| @@ -58,7 +59,7 @@
|
| return false;
|
| },
|
|
|
| - createElement: function(app) {
|
| + createElement_: function(app) {
|
| var div = document.createElement('div');
|
| div.className = 'app';
|
|
|
| @@ -70,6 +71,14 @@
|
| a.xtitle = a.textContent = app['name'];
|
| a.href = app['launch_url'];
|
|
|
| + return div;
|
| + },
|
| +
|
| + createElement: function(app) {
|
| + var div = this.createElement_(app);
|
| + var front = div.firstChild;
|
| + var a = front.firstChild;
|
| +
|
| a.onclick = apps.handleClick_;
|
| a.style.backgroundImage = url(app['icon']);
|
| if (hashParams['app-id'] == app['id']) {
|
| @@ -112,5 +121,13 @@
|
| };
|
|
|
| return div;
|
| + },
|
| +
|
| + createWebStoreElement: function() {
|
| + return this.createElement_({
|
| + 'id': 'web-store-entry',
|
| + 'name': localStrings.getString('web_store_title'),
|
| + 'launch_url': localStrings.getString('web_store_url')
|
| + });
|
| }
|
| };
|
|
|