toolkit/mozapps/extensions/amIWebInstaller.idl

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 #include "nsISupports.idl"
michael@0 6
michael@0 7 interface nsIDOMWindow;
michael@0 8 interface nsIVariant;
michael@0 9 interface nsIURI;
michael@0 10
michael@0 11 /**
michael@0 12 * A callback function used to notify webpages when a requested install has
michael@0 13 * ended.
michael@0 14 *
michael@0 15 * NOTE: This is *not* the same as InstallListener.
michael@0 16 */
michael@0 17 [scriptable, function, uuid(bb22f5c0-3ca1-48f6-873c-54e87987700f)]
michael@0 18 interface amIInstallCallback : nsISupports
michael@0 19 {
michael@0 20 /**
michael@0 21 * Called when an install completes or fails.
michael@0 22 *
michael@0 23 * @param aUrl
michael@0 24 * The url of the add-on being installed
michael@0 25 * @param aStatus
michael@0 26 * 0 if the install was successful or negative if not
michael@0 27 */
michael@0 28 void onInstallEnded(in AString aUrl, in int32_t aStatus);
michael@0 29 };
michael@0 30
michael@0 31
michael@0 32 /**
michael@0 33 * This interface is used to allow webpages to start installing add-ons.
michael@0 34 */
michael@0 35 [scriptable, uuid(4fdf4f84-73dc-4857-9bbe-84895e8afd5d)]
michael@0 36 interface amIWebInstaller : nsISupports
michael@0 37 {
michael@0 38 /**
michael@0 39 * Checks if installation is enabled for a webpage.
michael@0 40 *
michael@0 41 * @param aMimetype
michael@0 42 * The mimetype for the add-on to be installed
michael@0 43 * @param referer
michael@0 44 * The URL of the webpage trying to install an add-on
michael@0 45 * @return true if installation is enabled
michael@0 46 */
michael@0 47 boolean isInstallEnabled(in AString aMimetype, in nsIURI aReferer);
michael@0 48
michael@0 49 /**
michael@0 50 * Installs an array of add-ons at the request of a webpage
michael@0 51 *
michael@0 52 * @param aMimetype
michael@0 53 * The mimetype for the add-ons
michael@0 54 * @param aWindow
michael@0 55 * The window installing the add-ons
michael@0 56 * @param aReferer
michael@0 57 * The URI for the webpage installing the add-ons
michael@0 58 * @param aUris
michael@0 59 * The URIs of add-ons to be installed
michael@0 60 * @param aHashes
michael@0 61 * The hashes for the add-ons to be installed
michael@0 62 * @param aNames
michael@0 63 * The names for the add-ons to be installed
michael@0 64 * @param aIcons
michael@0 65 * The icons for the add-ons to be installed
michael@0 66 * @param aCallback
michael@0 67 * An optional callback to notify about installation success and
michael@0 68 * failure
michael@0 69 * @param aInstallCount
michael@0 70 * An optional argument including the number of add-ons to install
michael@0 71 * @return true if the installation was successfully started
michael@0 72 */
michael@0 73 boolean installAddonsFromWebpage(in AString aMimetype,
michael@0 74 in nsIDOMWindow aWindow,
michael@0 75 in nsIURI aReferer,
michael@0 76 [array, size_is(aInstallCount)] in wstring aUris,
michael@0 77 [array, size_is(aInstallCount)] in wstring aHashes,
michael@0 78 [array, size_is(aInstallCount)] in wstring aNames,
michael@0 79 [array, size_is(aInstallCount)] in wstring aIcons,
michael@0 80 [optional] in amIInstallCallback aCallback,
michael@0 81 [optional] in uint32_t aInstallCount);
michael@0 82 };

mercurial