mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-29 18:18:27 +00:00
fe0509a62e
- Bug 904479 - Added createPromiseWithId() that returns id of resolver r=kanru,nsm (2ac672d882) - Bug 1166580 - Disable mozHasPendingMessage tests on non-browser platform. r=me (03c689964b) - Bug 1162281 - Invalid system message handler in an App Manifest can break the entire system. r=fabrice (e192a95f9c) - Bug 1198988 - Turn off some useless dump() calls r=ferjm (34fc83b236) - Bug 1164498: Remove |DispatchBluetoothReply|, r=btian (6143335efa) - Bug 1001757 - Add ability to store core apps outside of profile on desktop b2g; r=fabrice (f6b605e7aa) - Bug 1155245 - Set the app status correctly for hosted certified apps in developer mode. r=fabrice (131178b80e) - Bug 1179052 - Add some raptor markers to b2g gecko startup r=gwagner (222256fad8) - Bug 1163904 - handle -url command line argument. r=fabrice (ee61af1ff9) - Bug 1167275 - JS error in shell.js handleCmdLine() r=me (32e75c604f) - Bug 1167197 - Fix GMPProvider on Android r=cpearce Bug 1181209 - Make changes to Gecko needed for b2gdroid to boot. r=fabrice (b35d3a372f) - Bug 1158544 - Remove FTPChannelChild::mWasOpened and make the base class mWasOpened protected; r=mcmanus (9111e1bc00) - Bug 1171716 - Part 2: Use NS_ReleaseOnMainThread in nsBaseChannel. r=froydnj (f138124f14) - partial of Bug 1177175 - Add a UITour target inside the TP panel. (603cc719b3) - Bug 1175545 - Dont process alt-svc on 421 r=hurley (ad0f2f6e91) - Bug 1191291 - convert nsHttpChannel::RetargetDeliveryTo warning to log r=michal.novotny (b9c6003df8) - Bug 1182487 - Don't try to write to HTTP cache entry in nsHttpChannel when entry is open for reading only. r=michal (b36d7014a0) - Bug 1173069 - Don't accumulate the cache hit telemetry for intercepted channels; r=mayhemer,jdm (aaed79183d) - Bug 1208755 HttpBaseChannel::ShouldIntercept() should not assume every channel has a LoadInfo. r=ckerschb (d55be94901) - Bug 1201229 - Return an empty string for a header when an error occurs; r=dragana (256d0462c8) - Bug 1048048 - add preload content policy types - web platform test updates (r=dveditz) (baa1004dd6) - Bug 1048048 - add preload content policy types - csp changes (r=dveditz) (17914dadba) - Bug 1048048 - add preload content policy types for stylesheets (r=cam) (29af13263a) - Bug 1048048 - add preload content policy types (r=ehsan) (f58a32d51b) - Bug 1201747 - Don't inspect the subject principal in StorageAllowedForPrincipal. r=mystor (4f2c100882) - Bug 1176829 - Remove custom elements base element queue. r=smaug (03a520c13d) - Bug 1176829 follow-up, finish removing unused member to fix bustage. CLOSED TREE (29c6150af8) - Bug 1179909: Build fix. r=me CLOSED TREE (40e3bdb971) - Bug 1188932 - Allow the User-Agent header to be explicitly set by requests, r=bkelly, r=jgraham (37aacbd37d)
132 lines
6.3 KiB
C++
132 lines
6.3 KiB
C++
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* vim: set ft=cpp tw=78 sw=2 et ts=8 : */
|
|
/* 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 "nsIContentPolicyBase.idl"
|
|
|
|
interface nsIURI;
|
|
interface nsIDOMNode;
|
|
interface nsIPrincipal;
|
|
|
|
/**
|
|
* Interface for content policy mechanism. Implementations of this
|
|
* interface can be used to control loading of various types of out-of-line
|
|
* content, or processing of certain types of in-line content.
|
|
*
|
|
* WARNING: do not block the caller from shouldLoad or shouldProcess (e.g.,
|
|
* by launching a dialog to prompt the user for something).
|
|
*/
|
|
|
|
[scriptable,uuid(caad4f1f-d047-46ac-ae9d-dc598e4fb91b)]
|
|
interface nsIContentPolicy : nsIContentPolicyBase
|
|
{
|
|
/**
|
|
* Should the resource at this location be loaded?
|
|
* ShouldLoad will be called before loading the resource at aContentLocation
|
|
* to determine whether to start the load at all.
|
|
*
|
|
* @param aContentType the type of content being tested. This will be one
|
|
* one of the TYPE_* constants.
|
|
*
|
|
* @param aContentLocation the location of the content being checked; must
|
|
* not be null
|
|
*
|
|
* @param aRequestOrigin OPTIONAL. the location of the resource that
|
|
* initiated this load request; can be null if
|
|
* inapplicable
|
|
*
|
|
* @param aContext OPTIONAL. the nsIDOMNode or nsIDOMWindow that
|
|
* initiated the request, or something that can QI
|
|
* to one of those; can be null if inapplicable.
|
|
* Note that for navigation events (new windows and
|
|
* link clicks), this is the NEW window.
|
|
*
|
|
* @param aMimeTypeGuess OPTIONAL. a guess for the requested content's
|
|
* MIME type, based on information available to
|
|
* the request initiator (e.g., an OBJECT's type
|
|
* attribute); does not reliably reflect the
|
|
* actual MIME type of the requested content
|
|
*
|
|
* @param aExtra an OPTIONAL argument, pass-through for non-Gecko
|
|
* callers to pass extra data to callees.
|
|
*
|
|
* @param aRequestPrincipal an OPTIONAL argument, defines the principal that
|
|
* caused the load. This is optional only for
|
|
* non-gecko code: all gecko code should set this
|
|
* argument. For navigation events, this is
|
|
* the principal of the page that caused this load.
|
|
*
|
|
* @return ACCEPT or REJECT_*
|
|
*
|
|
* @note shouldLoad can be called while the DOM and layout of the document
|
|
* involved is in an inconsistent state. This means that implementors of
|
|
* this method MUST NOT do any of the following:
|
|
* 1) Modify the DOM in any way (e.g. setting attributes is a no-no).
|
|
* 2) Query any DOM properties that depend on layout (e.g. offset*
|
|
* properties).
|
|
* 3) Query any DOM properties that depend on style (e.g. computed style).
|
|
* 4) Query any DOM properties that depend on the current state of the DOM
|
|
* outside the "context" node (e.g. lengths of node lists).
|
|
* 5) [JavaScript implementations only] Access properties of any sort on any
|
|
* object without using XPCNativeWrapper (either explicitly or
|
|
* implicitly). Due to various DOM0 things, this leads to item 4.
|
|
* If you do any of these things in your shouldLoad implementation, expect
|
|
* unpredictable behavior, possibly including crashes, content not showing
|
|
* up, content showing up doubled, etc. If you need to do any of the things
|
|
* above, do them off timeout or event.
|
|
*/
|
|
short shouldLoad(in nsContentPolicyType aContentType,
|
|
in nsIURI aContentLocation,
|
|
in nsIURI aRequestOrigin,
|
|
in nsISupports aContext,
|
|
in ACString aMimeTypeGuess,
|
|
in nsISupports aExtra,
|
|
[optional] in nsIPrincipal aRequestPrincipal);
|
|
|
|
/**
|
|
* Should the resource be processed?
|
|
* ShouldProcess will be called once all the information passed to it has
|
|
* been determined about the resource, typically after part of the resource
|
|
* has been loaded.
|
|
*
|
|
* @param aContentType the type of content being tested. This will be one
|
|
* one of the TYPE_* constants.
|
|
*
|
|
* @param aContentLocation OPTIONAL; the location of the resource being
|
|
* requested: MAY be, e.g., a post-redirection URI
|
|
* for the resource.
|
|
*
|
|
* @param aRequestOrigin OPTIONAL. the location of the resource that
|
|
* initiated this load request; can be null if
|
|
* inapplicable
|
|
*
|
|
* @param aContext OPTIONAL. the nsIDOMNode or nsIDOMWindow that
|
|
* initiated the request, or something that can QI
|
|
* to one of those; can be null if inapplicable.
|
|
*
|
|
* @param aMimeType the MIME type of the requested resource (e.g.,
|
|
* image/png), as reported by the networking library,
|
|
* if available (may be empty if inappropriate for
|
|
* the type, e.g., TYPE_REFRESH).
|
|
*
|
|
* @param aExtra an OPTIONAL argument, pass-through for non-Gecko
|
|
* callers to pass extra data to callees.
|
|
*
|
|
* @return ACCEPT or REJECT_*
|
|
*
|
|
* @note shouldProcess can be called while the DOM and layout of the document
|
|
* involved is in an inconsistent state. See the note on shouldLoad to see
|
|
* what this means for implementors of this method.
|
|
*/
|
|
short shouldProcess(in nsContentPolicyType aContentType,
|
|
in nsIURI aContentLocation,
|
|
in nsIURI aRequestOrigin,
|
|
in nsISupports aContext,
|
|
in ACString aMimeType,
|
|
in nsISupports aExtra,
|
|
[optional] in nsIPrincipal aRequestPrincipal);
|
|
};
|