1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/widget/nsIMacWebAppUtils.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,35 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#include "nsISupports.idl" 1.9 + 1.10 +interface nsIMacWebAppUtils; 1.11 + 1.12 +[scriptable, function, uuid(8c899c4f-58c1-4b74-9034-3bb64e484b68)] 1.13 +interface nsITrashAppCallback : nsISupports 1.14 +{ 1.15 + void trashAppFinished(in nsresult rv); 1.16 +}; 1.17 + 1.18 +/** 1.19 + * Allow MozApps API to locate and manipulate natively installed apps 1.20 + */ 1.21 + 1.22 +[scriptable, uuid(c69cf343-ea41-428b-b161-4655fd54d8e7)] 1.23 +interface nsIMacWebAppUtils : nsISupports { 1.24 + /** 1.25 + * Find the path for an app with the given signature. 1.26 + */ 1.27 + AString pathForAppWithIdentifier(in AString bundleIdentifier); 1.28 + 1.29 + /** 1.30 + * Launch the app with the given identifier, if it exists. 1.31 + */ 1.32 + void launchAppWithIdentifier(in AString bundleIdentifier); 1.33 + 1.34 + /** 1.35 + * Move the app from the given directory to the Trash. 1.36 + */ 1.37 + void trashApp(in AString path, in nsITrashAppCallback callback); 1.38 +};