Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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('apps_dev_tool', function() { | 5 cr.define('apps_dev_tool', function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 // The list of all apps & extensions. | 8 // The list of all apps & extensions. |
| 9 var completeList = []; | 9 var completeList = []; |
| 10 | 10 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 166 | 166 |
| 167 // The 'Permissions' link. | 167 // The 'Permissions' link. |
| 168 this.setPermissionsLink_(item, node); | 168 this.setPermissionsLink_(item, node); |
| 169 | 169 |
| 170 // The 'View in Web Store/View Web Site' link. | 170 // The 'View in Web Store/View Web Site' link. |
| 171 if (item.homepage_url) | 171 if (item.homepage_url) |
| 172 this.setWebstoreLink_(item, node); | 172 this.setWebstoreLink_(item, node); |
| 173 | 173 |
| 174 // The 'Reload' checkbox. | 174 // The 'Reload' checkbox. |
| 175 if (item.allow_reload) { | 175 if (item.allow_reload) { |
| 176 this.setReloadLink_(item, node); | 176 this.setReloadLink_(item, node); |
|
Dan Beam
2013/04/17 00:32:52
nit: no curlies
| |
| 177 } | |
| 177 | 178 |
| 178 if (item.type == 'packaged_app') { | 179 if (item.type == 'packaged_app') { |
| 179 // The 'Launch' link. | 180 // The 'Launch' link. |
| 180 var launch = node.querySelector('.launch-link'); | 181 var launch = node.querySelector('.launch-link'); |
| 181 launch.addEventListener('click', function(e) { | 182 launch.addEventListener('click', function(e) { |
| 182 ItemsList.launchApp(item.id); | 183 ItemsList.launchApp(item.id); |
| 184 }); | |
| 185 launch.hidden = false; | |
| 186 | |
| 187 // The 'Restart' link. | |
| 188 var restart = node.querySelector('.restart-link'); | |
| 189 restart.addEventListener('click', function(e) { | |
| 190 chrome.developerPrivate.restart(item.id, function() { | |
| 191 ItemsList.loadItemsInfo(); | |
| 183 }); | 192 }); |
| 184 launch.hidden = false; | 193 }); |
| 185 | 194 restart.hidden = false; |
| 186 // The 'Restart' link. | |
| 187 var restart = node.querySelector('.restart-link'); | |
| 188 restart.addEventListener('click', function(e) { | |
| 189 chrome.developerPrivate.restart(item.id, function() { | |
| 190 ItemsList.loadItemsInfo(); | |
| 191 }); | |
| 192 }); | |
| 193 restart.hidden = false; | |
| 194 } | |
| 195 } | 195 } |
| 196 | 196 |
| 197 // The terminated reload link. | 197 // The terminated reload link. |
| 198 if (!item.terminated) | 198 if (!item.terminated) |
| 199 this.setEnabledCheckbox_(item, node); | 199 this.setEnabledCheckbox_(item, node); |
| 200 else | 200 else |
| 201 this.setTerminatedReloadLink_(node, item); | 201 this.setTerminatedReloadLink_(node, item); |
| 202 | 202 |
| 203 // Set remove button handler. | 203 // Set remove button handler. |
| 204 this.setRemoveButton_(item, node); | 204 this.setRemoveButton_(item, node); |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 422 ItemsList.launchApp = function(id) { | 422 ItemsList.launchApp = function(id) { |
| 423 chrome.management.launchApp(id, function() { | 423 chrome.management.launchApp(id, function() { |
| 424 ItemsList.loadItemsInfo(); | 424 ItemsList.loadItemsInfo(); |
| 425 }); | 425 }); |
| 426 }; | 426 }; |
| 427 | 427 |
| 428 return { | 428 return { |
| 429 ItemsList: ItemsList, | 429 ItemsList: ItemsList, |
| 430 }; | 430 }; |
| 431 }); | 431 }); |
| OLD | NEW |