Index: chrome/browser/resources/apps_debugger/js/items.js |
diff --git a/chrome/browser/resources/apps_debugger/js/items.js b/chrome/browser/resources/apps_debugger/js/items.js |
index 27f658de5c2ec4e62e2afbee08515320c23b5f39..e3bc223571fd0e29154e5c0c294ed936b181dd6f 100644 |
--- a/chrome/browser/resources/apps_debugger/js/items.js |
+++ b/chrome/browser/resources/apps_debugger/js/items.js |
@@ -22,8 +22,12 @@ cr.define('apps_dev_tool', function() { |
// Set up the three buttons (load unpacked, pack and update). |
$('load-unpacked').addEventListener('click', |
this.handleLoadUnpackedItem_.bind(this)); |
+ $('pack-item').addEventListener('click', |
+ this.handlePackItem_.bind(this)); |
$('update-items-now').addEventListener('click', |
this.handleUpdateItemNow_.bind(this)); |
+ var packItemOverlay = |
+ apps_dev_tool.PackItemOverlay.getInstance().initializePage(); |
}, |
/** |
@@ -37,6 +41,14 @@ cr.define('apps_dev_tool', function() { |
}); |
}, |
+ /** Handles the Pack Extension button. |
+ * @param {Event} e Change event. |
+ * @private |
+ */ |
+ handlePackItem_: function(e) { |
+ AppsDevTool.showOverlay($('packItemOverlay')); |
+ }, |
+ |
/** |
* Handles the Update Extension Now Button. |
* @param {!Event} e Click event. |
@@ -64,10 +76,8 @@ cr.define('apps_dev_tool', function() { |
var currentlyShowingOverlay = AppsDevTool.getCurrentOverlay(); |
if (currentlyShowingOverlay) |
currentlyShowingOverlay.classList.remove('showing'); |
- |
if (el) |
el.classList.add('showing'); |
- |
overlay.hidden = !el; |
uber.invokeMethodOnParent(el ? 'beginInterceptingEvents' : |
'stopInterceptingEvents'); |