Bug 1890277: part 1) Add CSP parser tests for `require-trusted-types-for`. r=tschuster
[gecko.git] / uriloader / exthandler / PHandlerService.ipdl
blobbcd1e746684bfe10b3ed3b89af7a9c2f00f6d7bb
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 include protocol PContent;
7 namespace mozilla {
8 namespace dom {
10 struct HandlerApp {
11   nsString name;
12   nsString detailedDescription;
15 struct HandlerInfo {
16   nsCString type;
17   bool isMIMEInfo;
18   nsString description;
19   bool alwaysAskBeforeHandling;
20   nsCString[] extensions;
21   HandlerApp preferredApplicationHandler;
22   HandlerApp[] possibleApplicationHandlers;
23   int32_t preferredAction;
26 [ChildImpl=virtual, ParentImpl=virtual]
27 sync protocol PHandlerService
29   manager PContent;
31 parent:
32   sync FillHandlerInfo(HandlerInfo aHandlerInfoData,
33                        nsCString aOverrideType)
34       returns (HandlerInfo handlerInfoData);
36   /*
37    * Check if an OS handler exists for the given protocol scheme.
38    */
39   sync ExistsForProtocolOS(nsCString aProtocolScheme)
40       returns (bool exists);
42   /*
43    * Check if a handler exists for the given protocol scheme. Check
44    * the datastore first and then fallback to an OS handler check.
45    */
46   sync ExistsForProtocol(nsCString aProtocolScheme)
47       returns (bool exists);
49   sync Exists(HandlerInfo aHandlerInfo)
50       returns (bool exists);
51   sync GetTypeFromExtension(nsCString aFileExtension)
52       returns (nsCString type);
53   sync GetMIMEInfoFromOS(nsCString aMIMEType, nsCString aExtension)
54       returns (nsresult rv, HandlerInfo handlerInfoData, bool found);
55   sync GetApplicationDescription(nsCString aScheme)
56       returns (nsresult rv, nsString description);
57   async __delete__();
61 } // namespace dom
62 } // namespace mozilla