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.
michael@0 | 1 | /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- |
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 | /** |
michael@0 | 10 | * The nsIWebBrowserSetup interface lets you set properties on a browser |
michael@0 | 11 | * object; you can do so at any time during the life cycle of the browser. |
michael@0 | 12 | * |
michael@0 | 13 | * @note Unless stated otherwise, settings are presumed to be enabled by |
michael@0 | 14 | * default. |
michael@0 | 15 | */ |
michael@0 | 16 | [scriptable, uuid(F15398A0-8018-11d3-AF70-00A024FFC08C)] |
michael@0 | 17 | interface nsIWebBrowserSetup : nsISupports |
michael@0 | 18 | { |
michael@0 | 19 | /** |
michael@0 | 20 | * Boolean. Enables/disables plugin support for this browser. |
michael@0 | 21 | * |
michael@0 | 22 | * @see setProperty |
michael@0 | 23 | */ |
michael@0 | 24 | const unsigned long SETUP_ALLOW_PLUGINS = 1; |
michael@0 | 25 | |
michael@0 | 26 | /** |
michael@0 | 27 | * Boolean. Enables/disables Javascript support for this browser. |
michael@0 | 28 | * |
michael@0 | 29 | * @see setProperty |
michael@0 | 30 | */ |
michael@0 | 31 | const unsigned long SETUP_ALLOW_JAVASCRIPT = 2; |
michael@0 | 32 | |
michael@0 | 33 | /** |
michael@0 | 34 | * Boolean. Enables/disables meta redirect support for this browser. |
michael@0 | 35 | * Meta redirect timers will be ignored if this option is disabled. |
michael@0 | 36 | * |
michael@0 | 37 | * @see setProperty |
michael@0 | 38 | */ |
michael@0 | 39 | const unsigned long SETUP_ALLOW_META_REDIRECTS = 3; |
michael@0 | 40 | |
michael@0 | 41 | /** |
michael@0 | 42 | * Boolean. Enables/disables subframes within the browser |
michael@0 | 43 | * |
michael@0 | 44 | * @see setProperty |
michael@0 | 45 | */ |
michael@0 | 46 | const unsigned long SETUP_ALLOW_SUBFRAMES = 4; |
michael@0 | 47 | |
michael@0 | 48 | /** |
michael@0 | 49 | * Boolean. Enables/disables image loading for this browser |
michael@0 | 50 | * window. If you disable the images, load a page, then enable the images, |
michael@0 | 51 | * the page will *not* automatically load the images for the previously |
michael@0 | 52 | * loaded page. This flag controls the state of a webBrowser at load time |
michael@0 | 53 | * and does not automatically re-load a page when the state is toggled. |
michael@0 | 54 | * Reloading must be done by hand, or by walking through the DOM tree and |
michael@0 | 55 | * re-setting the src attributes. |
michael@0 | 56 | * |
michael@0 | 57 | * @see setProperty |
michael@0 | 58 | */ |
michael@0 | 59 | const unsigned long SETUP_ALLOW_IMAGES = 5; |
michael@0 | 60 | |
michael@0 | 61 | /** |
michael@0 | 62 | * Boolean. Enables/disables whether the document as a whole gets focus before |
michael@0 | 63 | * traversing the document's content, or after traversing its content. |
michael@0 | 64 | * |
michael@0 | 65 | * NOTE: this property is obsolete and now has no effect |
michael@0 | 66 | * |
michael@0 | 67 | * @see setProperty |
michael@0 | 68 | */ |
michael@0 | 69 | const unsigned long SETUP_FOCUS_DOC_BEFORE_CONTENT = 6; |
michael@0 | 70 | |
michael@0 | 71 | /** |
michael@0 | 72 | * Boolean. Enables/disables the use of global history in the browser. Visited |
michael@0 | 73 | * URLs will not be recorded in the global history when it is disabled. |
michael@0 | 74 | * |
michael@0 | 75 | * @see setProperty |
michael@0 | 76 | */ |
michael@0 | 77 | const unsigned long SETUP_USE_GLOBAL_HISTORY = 256; |
michael@0 | 78 | |
michael@0 | 79 | /** |
michael@0 | 80 | * Boolean. A value of PR_TRUE makes the browser a chrome wrapper. |
michael@0 | 81 | * Default is PR_FALSE. |
michael@0 | 82 | * |
michael@0 | 83 | * @since mozilla1.0 |
michael@0 | 84 | * |
michael@0 | 85 | * @see setProperty |
michael@0 | 86 | */ |
michael@0 | 87 | const unsigned long SETUP_IS_CHROME_WRAPPER = 7; |
michael@0 | 88 | |
michael@0 | 89 | |
michael@0 | 90 | /** |
michael@0 | 91 | * Boolean. Enables/disables DNS prefetch for HTML anchors in this browser. |
michael@0 | 92 | * This takes effect starting with the next pageload after the property is |
michael@0 | 93 | * set. The default is to not allow DNS prefetch, for backwards |
michael@0 | 94 | * compatibility. |
michael@0 | 95 | * |
michael@0 | 96 | * @see setProperty |
michael@0 | 97 | */ |
michael@0 | 98 | const unsigned long SETUP_ALLOW_DNS_PREFETCH = 8; |
michael@0 | 99 | |
michael@0 | 100 | /** |
michael@0 | 101 | * Sets an integer or boolean property on the new web browser object. |
michael@0 | 102 | * Only PR_TRUE and PR_FALSE are legal boolean values. |
michael@0 | 103 | * |
michael@0 | 104 | * @param aId The identifier of the property to be set. |
michael@0 | 105 | * @param aValue The value of the property. |
michael@0 | 106 | */ |
michael@0 | 107 | void setProperty(in unsigned long aId, in unsigned long aValue); |
michael@0 | 108 | }; |
michael@0 | 109 |