caps/nsIAddonPolicyService.idl
author J. Ryan Stinnett <jryans@gmail.com>
Fri, 16 Oct 2015 00:38:43 -0500
changeset 301213 34fb2f92a8ce1614ceeeca51d438e8248476f29d
parent 280066 689fd01b7b3ce084c1372cfd55869479dc128dbb
child 351733 c737f5009c93f2fc32aaae999142e5e10c1ff496
permissions -rw-r--r--
Bug 1203159 - Update each product's DevTools inclusion. r=glandium A new configure option --with-devtools (which sets MOZ_DEVTOOLS) is added to control whether all DevTools, just the server, or no DevTools are included. This defaults to just the server. Applications should also include /devtools within their moz.build tree, so that DIST_SUBDIR is in effect for all DevTools files if it is used by the app.

/* -*- 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);
};