Sat, 03 Jan 2015 20:18:00 +0100
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.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 /********************************* #includes *********************************/
9 #include "domstubs.idl" // nsIDOMElement, nsIDOMWindow
10 #include "nsISupports.idl" // nsISupports
13 /******************************** Declarations *******************************/
15 interface nsIDocShell;
18 /****************************** nsTypeAheadFind ******************************/
20 [scriptable, uuid(0749a445-19d3-4eb9-9d66-78eca8c6f604)]
21 interface nsITypeAheadFind : nsISupports
22 {
23 /****************************** Initializer ******************************/
25 /* Necessary initialization that can't happen in the constructor, either
26 * because function calls here may fail, or because the docShell is
27 * required. */
28 void init(in nsIDocShell aDocShell);
31 /***************************** Core functions ****************************/
33 /* Find aSearchString in page. If aLinksOnly is true, only search the page's
34 * hyperlinks for the string. */
35 unsigned short find(in AString aSearchString, in boolean aLinksOnly);
37 /* Find another match in the page. */
38 unsigned short findAgain(in boolean findBackwards, in boolean aLinksOnly);
41 /**************************** Helper functions ***************************/
43 /* Change searched docShell. This happens when e.g. we use the same
44 * nsITypeAheadFind object to search different tabs. */
45 void setDocShell(in nsIDocShell aDocShell);
47 /* Change the look of the the "found match" selection to aToggle, and repaint
48 * the selection. */
49 void setSelectionModeAndRepaint(in short toggle);
51 /* Collapse the "found match" selection to its start. Because not all
52 * matches are owned by the same selection controller, this doesn't
53 * necessarily happen automatically. */
54 void collapseSelection();
57 /******************************* Attributes ******************************/
59 readonly attribute AString searchString;
60 // Most recent search string
61 attribute boolean caseSensitive; // Searches are case sensitive
62 readonly attribute nsIDOMElement foundLink;
63 // Most recent elem found, if a link
64 readonly attribute nsIDOMElement foundEditable;
65 // Most recent elem found, if editable
66 readonly attribute nsIDOMWindow currentWindow;
67 // Window of most recent match
70 /******************************* Constants *******************************/
72 /* Find return codes */
73 const unsigned short FIND_FOUND = 0;
74 // Successful find
75 const unsigned short FIND_NOTFOUND = 1;
76 // Unsuccessful find
77 const unsigned short FIND_WRAPPED = 2;
78 // Successful find, but wrapped around
79 const unsigned short FIND_PENDING = 3;
80 // Unknown status, find has not finished
83 /*************************************************************************/
85 };
88 /*****************************************************************************/