embedding/browser/webBrowser/nsIWebBrowser.idl

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
michael@0 2 *
michael@0 3 * This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 6
michael@0 7 #include "nsISupports.idl"
michael@0 8
michael@0 9 interface nsIInterfaceRequestor;
michael@0 10 interface nsIWebBrowserChrome;
michael@0 11 interface nsIURIContentListener;
michael@0 12 interface nsIDOMWindow;
michael@0 13 interface nsIWeakReference;
michael@0 14
michael@0 15 /**
michael@0 16 * The nsIWebBrowser interface is implemented by web browser objects.
michael@0 17 * Embedders use this interface during initialisation to associate
michael@0 18 * the new web browser instance with the embedders chrome and
michael@0 19 * to register any listeners. The interface may also be used at runtime
michael@0 20 * to obtain the content DOM window and from that the rest of the DOM.
michael@0 21 */
michael@0 22 [scriptable, uuid(33e9d001-caab-4ba9-8961-54902f197202)]
michael@0 23 interface nsIWebBrowser : nsISupports
michael@0 24 {
michael@0 25 /**
michael@0 26 * Registers a listener of the type specified by the iid to receive
michael@0 27 * callbacks. The browser stores a weak reference to the listener
michael@0 28 * to avoid any circular dependencies.
michael@0 29 * Typically this method will be called to register an object
michael@0 30 * to receive <CODE>nsIWebProgressListener</CODE> or
michael@0 31 * <CODE>nsISHistoryListener</CODE> notifications in which case the
michael@0 32 * the IID is that of the interface.
michael@0 33 *
michael@0 34 * @param aListener The listener to be added.
michael@0 35 * @param aIID The IID of the interface that will be called
michael@0 36 * on the listener as appropriate.
michael@0 37 * @return <CODE>NS_OK</CODE> for successful registration;
michael@0 38 * <CODE>NS_ERROR_INVALID_ARG</CODE> if aIID is not
michael@0 39 * supposed to be registered using this method;
michael@0 40 * <CODE>NS_ERROR_FAILURE</CODE> either aListener did not
michael@0 41 * expose the interface specified by the IID, or some
michael@0 42 * other internal error occurred.
michael@0 43 *
michael@0 44 * @see removeWebBrowserListener
michael@0 45 * @see nsIWeakReference
michael@0 46 * @see nsIWebProgressListener
michael@0 47 * @see nsISHistoryListener
michael@0 48 *
michael@0 49 * @return <CODE>NS_OK</CODE>, listener was successfully added;
michael@0 50 * <CODE>NS_ERROR_INVALID_ARG</CODE>, one of the arguments was
michael@0 51 * invalid or the object did not implement the interface
michael@0 52 * specified by the IID.
michael@0 53 */
michael@0 54 void addWebBrowserListener(in nsIWeakReference aListener, in nsIIDRef aIID);
michael@0 55
michael@0 56 /**
michael@0 57 * Removes a previously registered listener.
michael@0 58 *
michael@0 59 * @param aListener The listener to be removed.
michael@0 60 * @param aIID The IID of the interface on the listener that will
michael@0 61 * no longer be called.
michael@0 62 *
michael@0 63 * @return <CODE>NS_OK</CODE>, listener was successfully removed;
michael@0 64 * <CODE>NS_ERROR_INVALID_ARG</CODE> arguments was invalid or
michael@0 65 * the object did not implement the interface specified by the IID.
michael@0 66 *
michael@0 67 * @see addWebBrowserListener
michael@0 68 * @see nsIWeakReference
michael@0 69 */
michael@0 70 void removeWebBrowserListener(in nsIWeakReference aListener, in nsIIDRef aIID);
michael@0 71
michael@0 72 /**
michael@0 73 * The chrome object associated with the browser instance. The embedder
michael@0 74 * must create one chrome object for <I>each</I> browser object
michael@0 75 * that is instantiated. The embedder must associate the two by setting
michael@0 76 * this property to point to the chrome object before creating the browser
michael@0 77 * window via the browser's <CODE>nsIBaseWindow</CODE> interface.
michael@0 78 *
michael@0 79 * The chrome object must also implement <CODE>nsIEmbeddingSiteWindow</CODE>.
michael@0 80 *
michael@0 81 * The chrome may optionally implement <CODE>nsIInterfaceRequestor</CODE>,
michael@0 82 * <CODE>nsIWebBrowserChromeFocus</CODE>,
michael@0 83 * <CODE>nsIContextMenuListener</CODE> and
michael@0 84 * <CODE>nsITooltipListener</CODE> to receive additional notifications
michael@0 85 * from the browser object.
michael@0 86 *
michael@0 87 * The chrome object may optionally implement <CODE>nsIWebProgressListener</CODE>
michael@0 88 * instead of explicitly calling <CODE>addWebBrowserListener</CODE> and
michael@0 89 * <CODE>removeWebBrowserListener</CODE> to register a progress listener
michael@0 90 * object. If the implementation does this, it must also implement
michael@0 91 * <CODE>nsIWeakReference</CODE>.
michael@0 92 *
michael@0 93 * @note The implementation should not refcount the supplied chrome
michael@0 94 * object; it should assume that a non <CODE>nullptr</CODE> value is
michael@0 95 * always valid. The embedder must explicitly set this value back
michael@0 96 * to nullptr if the chrome object is destroyed before the browser
michael@0 97 * object.
michael@0 98 *
michael@0 99 * @see nsIBaseWindow
michael@0 100 * @see nsIWebBrowserChrome
michael@0 101 * @see nsIEmbeddingSiteWindow
michael@0 102 * @see nsIInterfaceRequestor
michael@0 103 * @see nsIWebBrowserChromeFocus
michael@0 104 * @see nsIContextMenuListener
michael@0 105 * @see nsITooltipListener
michael@0 106 * @see nsIWeakReference
michael@0 107 * @see nsIWebProgressListener
michael@0 108 */
michael@0 109 attribute nsIWebBrowserChrome containerWindow;
michael@0 110
michael@0 111 /**
michael@0 112 * URI content listener parent. The embedder may set this property to
michael@0 113 * their own implementation if they intend to override or prevent
michael@0 114 * how certain kinds of content are loaded.
michael@0 115 *
michael@0 116 * @note If this attribute is set to an object that implements
michael@0 117 * nsISupportsWeakReference, the implementation should get the
michael@0 118 * nsIWeakReference and hold that. Otherwise, the implementation
michael@0 119 * should not refcount this interface; it should assume that a non
michael@0 120 * null value is always valid. In that case, the embedder should
michael@0 121 * explicitly set this value back to null if the parent content
michael@0 122 * listener is destroyed before the browser object.
michael@0 123 *
michael@0 124 * @see nsIURIContentListener
michael@0 125 */
michael@0 126 attribute nsIURIContentListener parentURIContentListener;
michael@0 127
michael@0 128 /**
michael@0 129 * The top-level DOM window. The embedder may walk the entire
michael@0 130 * DOM starting from this value.
michael@0 131 *
michael@0 132 * @see nsIDOMWindow
michael@0 133 */
michael@0 134 readonly attribute nsIDOMWindow contentDOMWindow;
michael@0 135
michael@0 136 /**
michael@0 137 * Whether this web browser is active. Active means that it's visible
michael@0 138 * enough that we want to avoid certain optimizations like discarding
michael@0 139 * decoded image data and throttling the refresh driver. In Firefox,
michael@0 140 * this corresponds to the visible tab.
michael@0 141 *
michael@0 142 * Defaults to true. For optimal performance, set it to false when
michael@0 143 * appropriate.
michael@0 144 */
michael@0 145 attribute boolean isActive;
michael@0 146 };

mercurial