gecko-dev/uriloader/exthandler/PHandlerService.ipdl
Blake Kaplan 47a7f17127 Bug 1389836 - Push extensions from MIME info objects to the child. r=bz
It would be really nice to push all of this back up to the parent or to at
least make it asynchronous. I think it should be possible since we control
when we send the DOM events, but for the moment this should work.

With this patch, I extend ProxyMIMEInfo and HandlerInfo with information about
the available extensions for a given MIME type. On Linux, at least, we read
the system (in my case GNOME) registry in the child and handlers.json in the
parent finally merging them again in the child (in
ContentHandlerService::FillHandlerInfo). Even though I was unable to get my
mochitest to work, it did work well enough that I could verify that this patch
was getting all of the proper extensions to the nsContentAreaDragDrop.cpp
code.

MozReview-Commit-ID: AR3VayMUiDN

--HG--
extra : rebase_source : f9861e46e92fb7e8d297eff3e5d61a3c18912b47
2017-11-01 17:49:22 -07:00

46 lines
1.1 KiB
Plaintext

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
include protocol PContent;
namespace mozilla {
namespace dom {
struct HandlerApp {
nsString name;
nsString detailedDescription;
};
struct HandlerInfo {
nsCString type;
bool isMIMEInfo;
nsString description;
bool alwaysAskBeforeHandling;
nsCString[] extensions;
HandlerApp preferredApplicationHandler;
HandlerApp[] possibleApplicationHandlers;
long preferredAction;
};
sync protocol PHandlerService
{
manager PContent;
parent:
sync FillHandlerInfo(HandlerInfo aHandlerInfoData,
nsCString aOverrideType)
returns (HandlerInfo handlerInfoData);
sync ExistsForProtocol(nsCString aProtocolScheme)
returns (bool exists);
sync Exists(HandlerInfo aHandlerInfo)
returns (bool exists);
sync GetTypeFromExtension(nsCString aFileExtension)
returns (nsCString type);
async __delete__();
};
} // namespace dom
} // namespace mozilla