caps/nsIAddonPolicyService.idl
author Bob Owen <bobowencode@gmail.com>
Mon, 21 Dec 2015 20:33:12 +0000
changeset 314195 79733166f05ef2e5c2fecf2a041410345497aac4
parent 287323 689fd01b7b3ce084c1372cfd55869479dc128dbb
child 334561 58fc5fb221e0eb4dfb23779215873fb870e980c4
permissions -rw-r--r--
Bug 1156742 Part 1: Change Moz2D recording, so that it can be used in isolation. r=bas These are mainly changes to make sure we have recorded relevant dependencies to each draw operation. Where we can't record them on the fly like this, it makes sure the object has originated from our DrawTarget.

/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 *
 * 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 "nsISupports.idl"
#include "nsIURI.idl"

/**
 * This interface allows the security manager to query custom per-addon security
 * policy.
 */
[scriptable,uuid(8a034ef9-9d14-4c5d-8319-06c1ab574baa)]
interface nsIAddonPolicyService : nsISupports
{
  /**
   * Returns true if unprivileged code associated with the given addon may load
   * data from |aURI|.
   */
  boolean addonMayLoadURI(in AString aAddonId, in nsIURI aURI);

  /**
   * Returns true if a given extension:// URI is web-accessible.
   */
  boolean extensionURILoadableByAnyone(in nsIURI aURI);

  /**
   * Maps an extension URI to the ID of the addon it belongs to.
   */
  AString extensionURIToAddonId(in nsIURI aURI);
};