Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "nsISupports.idl" |
michael@0 | 7 | |
michael@0 | 8 | interface nsIUTF8StringEnumerator; |
michael@0 | 9 | interface nsIURI; |
michael@0 | 10 | |
michael@0 | 11 | /* nsIGnomeVFSMimeApp holds information about an application that is looked up |
michael@0 | 12 | with nsIGnomeVFSService::GetAppForMimeType. */ |
michael@0 | 13 | |
michael@0 | 14 | [scriptable, uuid(66009894-9877-405b-9321-bf30420e34e6)] |
michael@0 | 15 | interface nsIGnomeVFSMimeApp : nsISupports |
michael@0 | 16 | { |
michael@0 | 17 | const long EXPECTS_URIS = 0; |
michael@0 | 18 | const long EXPECTS_PATHS = 1; |
michael@0 | 19 | const long EXPECTS_URIS_FOR_NON_FILES = 2; |
michael@0 | 20 | |
michael@0 | 21 | readonly attribute AUTF8String id; |
michael@0 | 22 | readonly attribute AUTF8String name; |
michael@0 | 23 | readonly attribute AUTF8String command; |
michael@0 | 24 | readonly attribute boolean canOpenMultipleFiles; |
michael@0 | 25 | readonly attribute long expectsURIs; // see constants above |
michael@0 | 26 | readonly attribute nsIUTF8StringEnumerator supportedURISchemes; |
michael@0 | 27 | readonly attribute boolean requiresTerminal; |
michael@0 | 28 | |
michael@0 | 29 | void launch(in AUTF8String uri); |
michael@0 | 30 | }; |
michael@0 | 31 | |
michael@0 | 32 | /* |
michael@0 | 33 | * The VFS service makes use of a registry for information. |
michael@0 | 34 | * |
michael@0 | 35 | * The MIME registry holds information about MIME types, such as which |
michael@0 | 36 | * extensions map to a given MIME type. The MIME registry also stores the |
michael@0 | 37 | * id of the application selected to handle each MIME type. |
michael@0 | 38 | */ |
michael@0 | 39 | |
michael@0 | 40 | [scriptable, uuid(d1ac73a6-2ceb-4164-8142-215afe7fe8a6)] |
michael@0 | 41 | interface nsIGnomeVFSService : nsISupports |
michael@0 | 42 | { |
michael@0 | 43 | /*** MIME registry methods ***/ |
michael@0 | 44 | |
michael@0 | 45 | /* Obtain the MIME type registered for an extension. The extension |
michael@0 | 46 | should not include a leading dot. */ |
michael@0 | 47 | AUTF8String getMimeTypeFromExtension(in AUTF8String extension); |
michael@0 | 48 | |
michael@0 | 49 | /* Obtain the preferred application for opening a given MIME type */ |
michael@0 | 50 | nsIGnomeVFSMimeApp getAppForMimeType(in AUTF8String mimeType); |
michael@0 | 51 | |
michael@0 | 52 | /* Obtain a description for the given MIME type */ |
michael@0 | 53 | AUTF8String getDescriptionForMimeType(in AUTF8String mimeType); |
michael@0 | 54 | |
michael@0 | 55 | /*** Misc. methods ***/ |
michael@0 | 56 | |
michael@0 | 57 | /* Open the given URI in the default application */ |
michael@0 | 58 | void showURI(in nsIURI uri); |
michael@0 | 59 | [noscript] void showURIForInput(in ACString uri); |
michael@0 | 60 | }; |
michael@0 | 61 | |
michael@0 | 62 | %{C++ |
michael@0 | 63 | #define NS_GNOMEVFSSERVICE_CONTRACTID "@mozilla.org/gnome-vfs-service;1" |
michael@0 | 64 | %} |