Chromium Code Reviews| 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 28565609590af3e6b4d2e2d6dc93971bc757c2af..4a63134cf28f04c4ab597b27e5e4ca72e65cc1d7 100644 |
| --- a/chrome/browser/resources/apps_debugger/js/items.js |
| +++ b/chrome/browser/resources/apps_debugger/js/items.js |
| @@ -117,14 +117,18 @@ AppsDevTool.prototype = { |
| // 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 = appsDevtool.PackItemOverlay.getInstance(); |
| + packItemOverlay.initializePage(); |
|
Dan Beam
2013/02/11 23:44:24
nit: indent off
Gaurav
2013/02/12 19:33:17
Done.
|
| + |
|
Dan Beam
2013/02/11 23:44:24
nit: remove \n
Gaurav
2013/02/12 19:33:17
Done.
|
| }, |
| - /** |
| - * Handles the Load Unpacked Extension button. |
| - * @param {!Event} e Change event. |
| + /** Handles the Load Unpacked Extension button. |
| + * @param {Event} e Change event. |
| * @private |
| */ |
| handleLoadUnpackedItem_: function(e) { |
| @@ -133,6 +137,14 @@ AppsDevTool.prototype = { |
| }); |
| }, |
| + /** 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 Change event. |
| @@ -148,7 +160,7 @@ AppsDevTool.prototype = { |
| * @return {Element} The overlay element. |
| */ |
| AppsDevTool.getCurrentOverlay = function() { |
| - return this.ownerDocument.querySelector('#overlay .page.showing'); |
| + return document.querySelector('#overlay .page.showing'); |
|
Dan Beam
2013/02/11 23:44:24
why did you change this?
Gaurav
2013/02/12 19:33:17
this.ownerDocument returns null.
On 2013/02/11 23
Dan Beam
2013/02/14 21:10:40
ah, 'cuz it's static, OK
|
| }; |
| /** |