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

Unified Diff: chrome/common/extensions/api/developer_private.idl

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: . 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
« no previous file with comments | « chrome/browser/resources/apps_debugger/pack_item_overlay.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/developer_private.idl
diff --git a/chrome/common/extensions/api/developer_private.idl b/chrome/common/extensions/api/developer_private.idl
index bd244af5f5936afbb5bcec9f79e58c5fbcca1315..5a774bafdb545a21f3ae0d21fd88f4f87c593c91 100644
--- a/chrome/common/extensions/api/developer_private.idl
+++ b/chrome/common/extensions/api/developer_private.idl
@@ -68,9 +68,41 @@ namespace developerPrivate {
boolean incognito;
};
+ enum PackStatus {
+ SUCCESS,
+ ERROR,
+ WARNING
+ };
+
+ enum FileType {
+ LOAD,
+ PEM
+ };
+
+ enum SelectType {
+ FILE,
+ FOLDER
+ };
+
+ dictionary PackDirectoryResponse {
+ // The response message of success or error.
+ DOMString message;
+
+ // Unpacked items's path.
+ DOMString item_path;
+
+ // Permanent key path.
+ DOMString pem_path;
+
+ long override_flags;
+ PackStatus status;
+ };
+
callback BooleanCallback = void (boolean result);
callback ItemsInfoCallback = void (ItemInfo[] result);
callback GetStringsCallback = void (object result);
+ callback PathCallback = void (DOMString path);
+ callback PackCallback = void (PackDirectoryResponse response);
interface Functions {
// Runs auto update for extensions and apps immediately.
@@ -90,8 +122,8 @@ namespace developerPrivate {
static void inspect(InspectOptions options,
BooleanCallback callback);
- // Enable / Disable file access for a given |itemId|
- static void allowFileAccess(DOMString itemId,
+ // Enable / Disable file access for a given |item_id|
+ static void allowFileAccess(DOMString item_id,
boolean allow,
BooleanCallback callback);
@@ -103,9 +135,25 @@ namespace developerPrivate {
boolean enable,
BooleanCallback callback);
- // Load a user selected unpacked item.
+ // Load a user selected unpacked item
static void loadUnpacked(BooleanCallback callback);
+ // Open Dialog to browse to an entry.
+ // |select_type| : Select a file or a folder.
+ // |file_type| : Required file type. For Example pem type is for private
+ // key and load type is for an unpacked item.
+ // |callback| : called with selected item's path.
+ static void choosePath(SelectType select_type,
+ FileType file_type,
+ PathCallback callback);
+
+ // Pack an item with given |path| and |private_key_path|
+ // |callback| : called with the success result string.
+ static void packDirectory(DOMString path,
+ DOMString private_key_path,
+ long flags,
+ PackCallback callback);
+
// Gets localized translated strings for apps_debugger. It returns the
// strings as a dictionary mapping from string identifier to the
// translated string to use in the apps_debugger app UI.
« no previous file with comments | « chrome/browser/resources/apps_debugger/pack_item_overlay.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698