Bug 803765 - Documentation for aRequestPrincipal r=bz
authorDevdatta Akhawe <dakhawe@mozilla.com>
Tue, 23 Oct 2012 21:44:11 -0700
changeset 111363 dff2047ef68ef7d24b456e37d0217003adef01ae
parent 111362 496d1304440c37e3fbd25b8969354de742b009d2
child 111364 e9109dc7da37eb9c14a7a1017d41237670c11788
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersbz
bugs803765
milestone19.0a1
Bug 803765 - Documentation for aRequestPrincipal r=bz
content/base/public/nsIContentPolicy.idl
--- a/content/base/public/nsIContentPolicy.idl
+++ b/content/base/public/nsIContentPolicy.idl
@@ -171,26 +171,34 @@ interface nsIContentPolicy : nsISupports
    *
    * @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).