embedding/browser/webBrowser/nsIContextMenuListener.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 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #include "nsISupports.idl"
michael@0 7
michael@0 8 interface nsIDOMEvent;
michael@0 9 interface nsIDOMNode;
michael@0 10
michael@0 11 /**
michael@0 12 * An optional interface for embedding clients wishing to receive
michael@0 13 * notifications for context menu events (e.g. generated by
michael@0 14 * a user right-mouse clicking on a link). The embedder implements
michael@0 15 * this interface on the web browser chrome object associated
michael@0 16 * with the window that notifications are required for. When a context
michael@0 17 * menu event, the browser will call this interface if present.
michael@0 18 *
michael@0 19 * @see nsIDOMNode
michael@0 20 * @see nsIDOMEvent
michael@0 21 */
michael@0 22 [scriptable, uuid(3478b6b0-3875-11d4-94ef-0020183bf181)]
michael@0 23 interface nsIContextMenuListener : nsISupports
michael@0 24 {
michael@0 25 /** Flag. No context. */
michael@0 26 const unsigned long CONTEXT_NONE = 0;
michael@0 27 /** Flag. Context is a link element. */
michael@0 28 const unsigned long CONTEXT_LINK = 1;
michael@0 29 /** Flag. Context is an image element. */
michael@0 30 const unsigned long CONTEXT_IMAGE = 2;
michael@0 31 /** Flag. Context is the whole document. */
michael@0 32 const unsigned long CONTEXT_DOCUMENT = 4;
michael@0 33 /** Flag. Context is a text area element. */
michael@0 34 const unsigned long CONTEXT_TEXT = 8;
michael@0 35 /** Flag. Context is an input element. */
michael@0 36 const unsigned long CONTEXT_INPUT = 16;
michael@0 37
michael@0 38 /**
michael@0 39 * Called when the browser receives a context menu event (e.g. user is right-mouse
michael@0 40 * clicking somewhere on the document). The combination of flags, event and node
michael@0 41 * provided in the call indicate where and what was clicked on.
michael@0 42 *
michael@0 43 * The following table describes what context flags and node combinations are
michael@0 44 * possible.
michael@0 45 *
michael@0 46 * <TABLE>
michael@0 47 * <TR><TD><B>aContextFlag</B></TD><TD>aNode</TD></TR>
michael@0 48 * <TR><TD>CONTEXT_LINK</TD><TD>&lt;A&gt;</TD></TR>
michael@0 49 * <TR><TD>CONTEXT_IMAGE</TD><TD>&lt;IMG&gt;</TD></TR>
michael@0 50 * <TR><TD>CONTEXT_IMAGE | CONTEXT_LINK</TD><TD>&lt;IMG&gt;
michael@0 51 * with an &lt;A&gt; as an ancestor</TD></TR>
michael@0 52 * <TR><TD>CONTEXT_INPUT</TD><TD>&lt;INPUT&gt;</TD></TR>
michael@0 53 * <TR><TD>CONTEXT_TEXT</TD><TD>&lt;TEXTAREA&gt;</TD></TR>
michael@0 54 * <TR><TD>CONTEXT_DOCUMENT</TD><TD>&lt;HTML&gt;</TD></TR>
michael@0 55 * </TABLE>
michael@0 56 *
michael@0 57 * @param aContextFlags Flags indicating the kind of context.
michael@0 58 * @param aEvent The DOM context menu event.
michael@0 59 * @param aNode The DOM node most relevant to the context.
michael@0 60 *
michael@0 61 * @return <CODE>NS_OK</CODE> always.
michael@0 62 */
michael@0 63 void onShowContextMenu(in unsigned long aContextFlags, in nsIDOMEvent aEvent, in nsIDOMNode aNode);
michael@0 64 };
michael@0 65

mercurial