Commit 2220a68c authored by grv@chromium.org's avatar grv@chromium.org

fix launch button missing on apptool.

Launch link was only getting setup for the apps which allow reload. Moving the launch button setup out.

BUG=149036

Review URL: https://chromiumcodereview.appspot.com/13998027

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195232 0039d316-1c4b-4281-b951-d872f2087c98
parent 4168774f
......@@ -172,26 +172,25 @@ cr.define('apps_dev_tool', function() {
this.setWebstoreLink_(item, node);
// The 'Reload' checkbox.
if (item.allow_reload) {
if (item.allow_reload)
this.setReloadLink_(item, node);
if (item.type == 'packaged_app') {
// The 'Launch' link.
var launch = node.querySelector('.launch-link');
launch.addEventListener('click', function(e) {
ItemsList.launchApp(item.id);
});
launch.hidden = false;
// The 'Restart' link.
var restart = node.querySelector('.restart-link');
restart.addEventListener('click', function(e) {
chrome.developerPrivate.restart(item.id, function() {
ItemsList.loadItemsInfo();
});
if (item.type == 'packaged_app') {
// The 'Launch' link.
var launch = node.querySelector('.launch-link');
launch.addEventListener('click', function(e) {
ItemsList.launchApp(item.id);
});
launch.hidden = false;
// The 'Restart' link.
var restart = node.querySelector('.restart-link');
restart.addEventListener('click', function(e) {
chrome.developerPrivate.restart(item.id, function() {
ItemsList.loadItemsInfo();
});
restart.hidden = false;
}
});
restart.hidden = false;
}
// The terminated reload link.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment