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: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "nsISupports.idl"
9 interface nsIWebBrowser;
10 interface nsIDocShellTreeItem;
12 /**
13 * nsIWebBrowserChrome corresponds to the top-level, outermost window
14 * containing an embedded Gecko web browser.
15 */
17 [scriptable, uuid(E8C414C4-DC38-4BA3-AB4E-EC4CBBE22907)]
18 interface nsIWebBrowserChrome : nsISupports
19 {
20 const unsigned long STATUS_SCRIPT = 0x00000001;
21 const unsigned long STATUS_LINK = 0x00000003;
23 /**
24 * Called when the status text in the chrome needs to be updated.
25 * @param statusType indicates what is setting the text
26 * @param status status string. null is an acceptable value meaning
27 * no status.
28 */
29 void setStatus(in unsigned long statusType, in wstring status);
31 /**
32 * The currently loaded WebBrowser. The browser chrome may be
33 * told to set the WebBrowser object to a new object by setting this
34 * attribute. In this case the implementer is responsible for taking the
35 * new WebBrowser object and doing any necessary initialization or setup
36 * as if it had created the WebBrowser itself. This includes positioning
37 * setting up listeners etc.
38 */
39 attribute nsIWebBrowser webBrowser;
41 /**
42 * Definitions for the chrome flags
43 */
44 const unsigned long CHROME_DEFAULT = 0x00000001;
45 const unsigned long CHROME_WINDOW_BORDERS = 0x00000002;
46 const unsigned long CHROME_WINDOW_CLOSE = 0x00000004;
47 const unsigned long CHROME_WINDOW_RESIZE = 0x00000008;
48 const unsigned long CHROME_MENUBAR = 0x00000010;
49 const unsigned long CHROME_TOOLBAR = 0x00000020;
50 const unsigned long CHROME_LOCATIONBAR = 0x00000040;
51 const unsigned long CHROME_STATUSBAR = 0x00000080;
52 const unsigned long CHROME_PERSONAL_TOOLBAR = 0x00000100;
53 const unsigned long CHROME_SCROLLBARS = 0x00000200;
54 const unsigned long CHROME_TITLEBAR = 0x00000400;
55 const unsigned long CHROME_EXTRA = 0x00000800;
57 // createBrowserWindow specific flags
58 const unsigned long CHROME_WITH_SIZE = 0x00001000;
59 const unsigned long CHROME_WITH_POSITION = 0x00002000;
61 // special cases
62 const unsigned long CHROME_WINDOW_MIN = 0x00004000;
63 const unsigned long CHROME_WINDOW_POPUP = 0x00008000;
65 // whether to open a new private window. CHROME_NON_PRIVATE_WINDOW
66 // forces the opened window to be non-private, and overrides
67 // CHROME_PRIVATE_WINDOW if it's set. CHROME_PRIVATE_WINDOW
68 // forces the opened window to be private. If neither of these
69 // flags are specified, the opened window will inherit the privacy
70 // status of its opener. If there is no opener window, the new
71 // window will be non-private.
72 //
73 // CHROME_PRIVATE_LIFETIME causes the docshell to affect private-browsing
74 // session lifetime. This flag is currently respected only for remote
75 // docshells.
76 const unsigned long CHROME_PRIVATE_WINDOW = 0x00010000;
77 const unsigned long CHROME_NON_PRIVATE_WINDOW = 0x00020000;
78 const unsigned long CHROME_PRIVATE_LIFETIME = 0x00040000;
80 // Whether this was opened by nsGlobalWindow::ShowModalDialog.
81 const unsigned long CHROME_MODAL_CONTENT_WINDOW = 0x00080000;
83 // Whether this window should use remote (out-of-process) tabs.
84 const unsigned long CHROME_REMOTE_WINDOW = 0x00100000;
86 // Prevents new window animations on Mac OS X Lion. Ignored on other
87 // platforms.
88 const unsigned long CHROME_MAC_SUPPRESS_ANIMATION = 0x01000000;
90 const unsigned long CHROME_WINDOW_RAISED = 0x02000000;
91 const unsigned long CHROME_WINDOW_LOWERED = 0x04000000;
92 const unsigned long CHROME_CENTER_SCREEN = 0x08000000;
94 // Make the new window dependent on the parent. This flag is only
95 // meaningful if CHROME_OPENAS_CHROME is set; content windows should not be
96 // dependent.
97 const unsigned long CHROME_DEPENDENT = 0x10000000;
99 // Note: The modal style bit just affects the way the window looks and does
100 // mean it's actually modal.
101 const unsigned long CHROME_MODAL = 0x20000000;
102 const unsigned long CHROME_OPENAS_DIALOG = 0x40000000;
103 const unsigned long CHROME_OPENAS_CHROME = 0x80000000;
105 const unsigned long CHROME_ALL = 0x00000ffe;
107 /**
108 * The chrome flags for this browser chrome. The implementation should
109 * reflect the value of this attribute by hiding or showing its chrome
110 * appropriately.
111 */
112 attribute unsigned long chromeFlags;
114 /**
115 * Asks the implementer to destroy the window associated with this
116 * WebBrowser object.
117 */
118 void destroyBrowserWindow();
120 /**
121 * Tells the chrome to size itself such that the browser will be the
122 * specified size.
123 * @param aCX new width of the browser
124 * @param aCY new height of the browser
125 */
126 void sizeBrowserTo(in long aCX, in long aCY);
128 /**
129 * Shows the window as a modal window.
130 * @return (the function error code) the status value specified by
131 * in exitModalEventLoop.
132 */
133 void showAsModal();
135 /**
136 * Is the window modal (that is, currently executing a modal loop)?
137 * @return true if it's a modal window
138 */
139 boolean isWindowModal();
141 /**
142 * Exit a modal event loop if we're in one. The implementation
143 * should also exit out of the loop if the window is destroyed.
144 * @param aStatus - the result code to return from showAsModal
145 */
146 void exitModalEventLoop(in nsresult aStatus);
147 };