diff options
author | grv@chromium.org <grv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-19 05:12:37 +0000 |
---|---|---|
committer | grv@chromium.org <grv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-19 05:12:37 +0000 |
commit | 6e1a27a33d4fac9cffe4b5a6091d025523902461 (patch) | |
tree | 30b316ada3d2bd33920153c72da3cb139c5e9d14 /chrome/common | |
parent | cbe93dd74799aabee54f7e20585d3f3499f8e380 (diff) | |
download | chromium_src-6e1a27a33d4fac9cffe4b5a6091d025523902461.zip chromium_src-6e1a27a33d4fac9cffe4b5a6091d025523902461.tar.gz chromium_src-6e1a27a33d4fac9cffe4b5a6091d025523902461.tar.bz2 |
Adds functionality to pack an extension / app from the developer_app.
BUG=149036
Review URL: https://chromiumcodereview.appspot.com/11794034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183156 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/extensions/api/developer_private.idl | 54 |
1 files changed, 51 insertions, 3 deletions
diff --git a/chrome/common/extensions/api/developer_private.idl b/chrome/common/extensions/api/developer_private.idl index bd244af..5a774ba 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. |