author Mike Hommey <>
Thu, 26 Mar 2015 12:07:17 +0900
changeset 258314 fc1e894eec2fbd34b745cd94f505080427d24705
parent 236672 2db29c0ae60b6eb0e196165631127d195fe2ef0b
child 357441 e51a6f9a0ebb3a533b34bb4fb0585eeaec1b3c59
permissions -rw-r--r--
Bug 1147207 - Add a ComposedFinder class that acts like a FileFinder proxy over multiple FileFinders. r=gps, a=sledru

/* 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 */

#include "nsISupports.idl"

interface nsIDOMDragEvent;
interface nsIURI;

[scriptable, uuid(6B58A5A7-76D0-4E93-AB2E-4DE108683FF8)]
interface nsIDroppedLinkHandler : nsISupports
   * Determines if a link being dragged can be dropped and returns true if so.
   * aEvent should be a dragenter or dragover event.
   * If aAllowSameDocument is false, drops are only allowed if the document
   * of the source of the drag is different from the destination. This check
   * includes any parent, sibling and child frames in the same content tree.
   * If true, the source is not checked.
  boolean canDropLink(in nsIDOMDragEvent aEvent, in boolean aAllowSameDocument);

   * Given a drop event aEvent, determines the link being dragged and returns
   * it. If a uri is returned the caller can, for instance, load it. If null
   * is returned, there is no valid link to be dropped.
   * A NS_ERROR_DOM_SECURITY_ERR error will be thrown and the event cancelled if
   * the receiving target should not load the uri for security reasons. This
   * will occur if any of the following conditions are true:
   *  - the source of the drag initiated a link for dragging that
   *    it itself cannot access. This prevents a source document from tricking
   *    the user into a dragging a chrome url, for example.
   *  - aDisallowInherit is true, and the URI being dropped would inherit the
   *    current document's security context (URI_INHERITS_SECURITY_CONTEXT).
   * aName is filled in with the link title if it exists, or an empty string
   * otherwise.
  AString dropLink(in nsIDOMDragEvent aEvent, out AString aName,
                   [optional] in boolean aDisallowInherit);