tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

PFilePicker.ipdl (1366B)


      1 /* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
      2 /* vim: set sw=4 ts=8 et tw=80 ft=cpp : */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4  * License, v. 2.0. If a copy of the MPL was not distributed with this
      5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 include protocol PBrowser;
      8 
      9 include IPCBlob;
     10 
     11 include "mozilla/dom/FilePickerMessageUtils.h";
     12 
     13 using struct mozilla::void_t from "mozilla/ipc/IPCCore.h";
     14 using nsIFilePicker::CaptureTarget from "nsIFilePicker.h";
     15 using nsIFilePicker::ResultCode from "nsIFilePicker.h";
     16 
     17 namespace mozilla {
     18 namespace dom {
     19 
     20 struct InputBlobs { IPCBlob[] blobs; };
     21 struct InputDirectory {
     22   nsString directoryPath;
     23   IPCBlob[] blobsInWebKitDirectory;
     24 };
     25 union MaybeInputData
     26 {
     27   InputBlobs;
     28   InputDirectory;
     29   void_t;
     30 };
     31 
     32 [ChildImpl=virtual]
     33 protocol PFilePicker
     34 {
     35   manager PBrowser;
     36 
     37 parent:
     38     async Open(int16_t selectedType, bool addToRecentDocs, nsString defaultFile,
     39                nsString defaultExtension, nsString[] filters, nsString[] filterNames,
     40                nsString[] rawFilters, nsString displayDirectory,
     41                nsString displaySpecialDirectory, nsString okButtonLabel,
     42                CaptureTarget capture);
     43 
     44 child:
     45     async __delete__(MaybeInputData data, ResultCode result);
     46 };
     47 
     48 } // namespace dom
     49 } // namespace mozilla