2018-09-13 23:04:55 +03:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2018-08-29 05:00:00 +03:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
2018-10-18 09:52:30 +03:00
|
|
|
interface nsIDocShell;
|
|
|
|
|
2020-04-26 03:53:01 +03:00
|
|
|
interface mixin LoadContextMixin {
|
|
|
|
readonly attribute WindowProxy? associatedWindow;
|
|
|
|
|
|
|
|
readonly attribute WindowProxy? topWindow;
|
|
|
|
|
|
|
|
readonly attribute Element? topFrameElement;
|
|
|
|
|
|
|
|
readonly attribute boolean isContent;
|
2020-05-04 17:26:34 +03:00
|
|
|
|
|
|
|
[SetterThrows]
|
2020-04-26 03:53:01 +03:00
|
|
|
attribute boolean usePrivateBrowsing;
|
|
|
|
|
|
|
|
readonly attribute boolean useRemoteTabs;
|
|
|
|
|
|
|
|
readonly attribute boolean useRemoteSubframes;
|
|
|
|
|
|
|
|
[BinaryName="useTrackingProtectionWebIDL"]
|
|
|
|
attribute boolean useTrackingProtection;
|
|
|
|
|
|
|
|
[NewObject, Throws]
|
|
|
|
readonly attribute any originAttributes;
|
|
|
|
};
|
|
|
|
|
2018-10-21 03:02:53 +03:00
|
|
|
[Exposed=Window, ChromeOnly]
|
2018-08-29 05:00:00 +03:00
|
|
|
interface BrowsingContext {
|
2019-01-30 19:07:21 +03:00
|
|
|
static BrowsingContext? get(unsigned long long aId);
|
|
|
|
|
2019-06-19 23:06:32 +03:00
|
|
|
static BrowsingContext? getFromWindow(WindowProxy window);
|
|
|
|
|
2019-07-31 03:30:55 +03:00
|
|
|
BrowsingContext? findChildWithName(DOMString name, BrowsingContext accessor);
|
2019-10-24 17:53:07 +03:00
|
|
|
BrowsingContext? findWithName(DOMString name);
|
2019-02-15 12:59:21 +03:00
|
|
|
|
|
|
|
readonly attribute DOMString name;
|
|
|
|
|
2018-08-29 05:00:00 +03:00
|
|
|
readonly attribute BrowsingContext? parent;
|
|
|
|
|
2019-04-09 09:19:24 +03:00
|
|
|
readonly attribute BrowsingContext top;
|
|
|
|
|
2020-02-26 01:33:53 +03:00
|
|
|
[Cached, Frozen, Pure]
|
|
|
|
readonly attribute sequence<BrowsingContext> children;
|
2018-08-29 05:00:00 +03:00
|
|
|
|
2018-10-18 09:52:30 +03:00
|
|
|
readonly attribute nsIDocShell? docShell;
|
|
|
|
|
2019-04-17 03:51:36 +03:00
|
|
|
readonly attribute Element? embedderElement;
|
|
|
|
|
2018-08-29 05:00:00 +03:00
|
|
|
readonly attribute unsigned long long id;
|
2018-11-09 11:53:53 +03:00
|
|
|
|
|
|
|
readonly attribute BrowsingContext? opener;
|
2019-01-30 19:07:21 +03:00
|
|
|
|
|
|
|
readonly attribute BrowsingContextGroup group;
|
2019-10-05 00:50:34 +03:00
|
|
|
|
|
|
|
readonly attribute WindowProxy? window;
|
2019-10-11 05:27:14 +03:00
|
|
|
|
2020-04-01 15:54:28 +03:00
|
|
|
readonly attribute WindowContext? currentWindowContext;
|
|
|
|
|
2020-05-04 17:26:34 +03:00
|
|
|
readonly attribute WindowContext? parentWindowContext;
|
|
|
|
|
|
|
|
readonly attribute WindowContext? topWindowContext;
|
|
|
|
|
2020-02-24 05:15:03 +03:00
|
|
|
attribute [TreatNullAs=EmptyString] DOMString customUserAgent;
|
|
|
|
|
2019-10-28 14:48:30 +03:00
|
|
|
/**
|
|
|
|
* The sandbox flags on the browsing context. These reflect the value of the
|
|
|
|
* sandbox attribute of the associated IFRAME or CSP-protectable content, if
|
|
|
|
* existent. See the HTML5 spec for more details.
|
|
|
|
* These flags on the browsing context reflect the current state of the
|
|
|
|
* sandbox attribute, which is modifiable. They are only used when loading new
|
|
|
|
* content, sandbox flags are also immutably set on the document when it is
|
|
|
|
* loaded.
|
|
|
|
* The sandbox flags of a document depend on the sandbox flags on its
|
|
|
|
* browsing context and of its parent document, if any.
|
|
|
|
* See nsSandboxFlags.h for the possible flags.
|
|
|
|
*/
|
|
|
|
attribute unsigned long sandboxFlags;
|
2019-11-15 01:54:56 +03:00
|
|
|
|
|
|
|
// The inRDMPane flag indicates whether or not Responsive Design Mode is
|
|
|
|
// active for the browsing context.
|
|
|
|
attribute boolean inRDMPane;
|
2019-12-04 03:44:27 +03:00
|
|
|
|
2020-04-22 22:32:52 +03:00
|
|
|
attribute float fullZoom;
|
|
|
|
|
|
|
|
attribute float textZoom;
|
|
|
|
|
2019-12-04 03:44:27 +03:00
|
|
|
// Extension to give chrome JS the ability to set the window screen
|
|
|
|
// orientation while in RDM.
|
|
|
|
void setRDMPaneOrientation(OrientationType type, float rotationAngle);
|
2020-04-14 16:41:33 +03:00
|
|
|
|
|
|
|
// Extension to give chrome JS the ability to set a maxTouchPoints override
|
|
|
|
// while in RDM.
|
|
|
|
void setRDMPaneMaxTouchPoints(octet maxTouchPoints);
|
2018-08-29 05:00:00 +03:00
|
|
|
};
|
2018-10-20 02:02:56 +03:00
|
|
|
|
2020-04-26 03:53:01 +03:00
|
|
|
BrowsingContext includes LoadContextMixin;
|
|
|
|
|
2018-10-20 02:02:56 +03:00
|
|
|
[Exposed=Window, ChromeOnly]
|
2019-01-29 20:32:28 +03:00
|
|
|
interface CanonicalBrowsingContext : BrowsingContext {
|
2018-10-20 02:02:56 +03:00
|
|
|
sequence<WindowGlobalParent> getWindowGlobals();
|
2018-11-27 23:03:05 +03:00
|
|
|
|
|
|
|
readonly attribute WindowGlobalParent? currentWindowGlobal;
|
2019-03-20 06:15:36 +03:00
|
|
|
|
2019-04-08 19:29:08 +03:00
|
|
|
// XXX(nika): This feels kinda hacky, but will do for now while we don't
|
|
|
|
// synchronously create WindowGlobalParent. It can throw if somehow the
|
|
|
|
// content process has died.
|
|
|
|
[Throws]
|
|
|
|
readonly attribute DOMString? currentRemoteType;
|
|
|
|
|
2019-04-17 03:51:36 +03:00
|
|
|
readonly attribute WindowGlobalParent? embedderWindowGlobal;
|
|
|
|
|
2019-03-20 06:15:36 +03:00
|
|
|
void notifyStartDelayedAutoplayMedia();
|
2019-05-22 15:19:49 +03:00
|
|
|
void notifyMediaMutedChanged(boolean muted);
|
2019-10-15 19:19:16 +03:00
|
|
|
|
2019-12-06 02:13:24 +03:00
|
|
|
static unsigned long countSiteOrigins(sequence<BrowsingContext> roots);
|
|
|
|
|
2019-11-04 18:05:47 +03:00
|
|
|
/**
|
|
|
|
* Loads a given URI. This will give priority to loading the requested URI
|
|
|
|
* in the object implementing this interface. If it can't be loaded here
|
|
|
|
* however, the URI dispatcher will go through its normal process of content
|
|
|
|
* loading.
|
|
|
|
*
|
|
|
|
* @param aURI
|
|
|
|
* The URI string to load. For HTTP and FTP URLs and possibly others,
|
|
|
|
* characters above U+007F will be converted to UTF-8 and then URL-
|
|
|
|
* escaped per the rules of RFC 2396.
|
|
|
|
* @param aLoadURIOptions
|
|
|
|
* A JSObject defined in LoadURIOptions.webidl holding info like e.g.
|
|
|
|
* the triggeringPrincipal, the referrer info.
|
|
|
|
*/
|
|
|
|
[Throws]
|
|
|
|
void loadURI(DOMString aURI, optional LoadURIOptions aOptions = {});
|
|
|
|
|
2019-06-19 22:09:28 +03:00
|
|
|
readonly attribute nsISHistory? sessionHistory;
|
2018-10-20 02:02:56 +03:00
|
|
|
};
|
2019-01-30 19:07:21 +03:00
|
|
|
|
|
|
|
[Exposed=Window, ChromeOnly]
|
|
|
|
interface BrowsingContextGroup {
|
|
|
|
sequence<BrowsingContext> getToplevels();
|
|
|
|
};
|