| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 this.app_ = app; | 113 this.app_ = app; |
| 114 | 114 |
| 115 this.launch_.textContent = app.appData.name; | 115 this.launch_.textContent = app.appData.name; |
| 116 | 116 |
| 117 this.forAllLaunchTypes_(function(launchTypeButton, id) { | 117 this.forAllLaunchTypes_(function(launchTypeButton, id) { |
| 118 launchTypeButton.disabled = false; | 118 launchTypeButton.disabled = false; |
| 119 launchTypeButton.checked = app.appData.launch_type == id; | 119 launchTypeButton.checked = app.appData.launch_type == id; |
| 120 }); | 120 }); |
| 121 | 121 |
| 122 this.options_.disabled = !app.appData.options_url; | 122 this.options_.disabled = !app.appData.options_url; |
| 123 this.uninstall_.disabled = !app.appData.can_uninstall; |
| 123 }, | 124 }, |
| 124 | 125 |
| 125 /** | 126 /** |
| 126 * Handlers for menu item activation. | 127 * Handlers for menu item activation. |
| 127 * @param {Event} e The activation event. | 128 * @param {Event} e The activation event. |
| 128 * @private | 129 * @private |
| 129 */ | 130 */ |
| 130 onLaunch_: function(e) { | 131 onLaunch_: function(e) { |
| 131 chrome.send('launchApp', [this.app_.appId, APP_LAUNCH.NTP_APPS_MENU]); | 132 chrome.send('launchApp', [this.app_.appId, APP_LAUNCH.NTP_APPS_MENU]); |
| 132 }, | 133 }, |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 } | 392 } |
| 392 | 393 |
| 393 chrome.send('reorderApps', [draggedTile.firstChild.appId, appIds]); | 394 chrome.send('reorderApps', [draggedTile.firstChild.appId, appIds]); |
| 394 }, | 395 }, |
| 395 }; | 396 }; |
| 396 | 397 |
| 397 return { | 398 return { |
| 398 AppsPage: AppsPage, | 399 AppsPage: AppsPage, |
| 399 }; | 400 }; |
| 400 }); | 401 }); |
| OLD | NEW |