Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6189)

Unified Diff: chrome/browser/resources/apps_debugger/js/items.js

Issue 11794034: Adds functionality to pack an extension / app from the app. (Closed) Base URL: http://git.chromium.org/chromium/src.git@bacha_lo
Patch Set: comments Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..d8fb42c2bde358c55adb67ddfd4411878aea2912 100644
--- a/chrome/browser/resources/apps_debugger/js/items.js
+++ b/chrome/browser/resources/apps_debugger/js/items.js
@@ -117,14 +117,17 @@ 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 = apps_dev_tool.PackItemOverlay.getInstance();
+ packItemOverlay.initializePage();
Dan Beam 2013/02/14 21:10:40 nit: apps_dev_tool.PackItemOverlay.getInstance()
Gaurav 2013/02/15 17:54:24 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 +136,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 +159,7 @@ AppsDevTool.prototype = {
* @return {Element} The overlay element.
*/
AppsDevTool.getCurrentOverlay = function() {
- return this.ownerDocument.querySelector('#overlay .page.showing');
+ return document.querySelector('#overlay .page.showing');
};
/**

Powered by Google App Engine
This is Rietveld 408576698