2018-09-13 23:04:55 +03:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2017-08-19 10:55: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/.
|
|
|
|
*/
|
|
|
|
|
|
|
|
interface LoadContext;
|
2019-04-09 23:59:37 +03:00
|
|
|
interface RemoteTab;
|
2017-08-19 10:55:00 +03:00
|
|
|
interface URI;
|
|
|
|
interface nsIDocShell;
|
|
|
|
interface nsIPrintSettings;
|
2017-08-20 00:16:16 +03:00
|
|
|
interface nsIWebBrowserPersistDocumentReceiver;
|
2017-08-19 10:55:00 +03:00
|
|
|
interface nsIWebProgressListener;
|
|
|
|
|
2019-09-27 18:26:14 +03:00
|
|
|
[ChromeOnly,
|
|
|
|
Exposed=Window]
|
2017-08-19 10:55:00 +03:00
|
|
|
interface FrameLoader {
|
|
|
|
/**
|
|
|
|
* Get the docshell from the frame loader.
|
|
|
|
*/
|
|
|
|
[GetterThrows]
|
|
|
|
readonly attribute nsIDocShell? docShell;
|
|
|
|
|
|
|
|
/**
|
2019-04-09 23:59:37 +03:00
|
|
|
* Get this frame loader's RemoteTab, if it has a remote frame. Otherwise,
|
2017-08-19 10:55:00 +03:00
|
|
|
* returns null.
|
|
|
|
*/
|
2019-04-09 23:59:37 +03:00
|
|
|
readonly attribute RemoteTab? remoteTab;
|
2017-08-19 10:55:00 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get an nsILoadContext for the top-level docshell. For remote
|
|
|
|
* frames, a shim is returned that contains private browsing and app
|
|
|
|
* information.
|
|
|
|
*/
|
|
|
|
readonly attribute LoadContext loadContext;
|
|
|
|
|
2018-10-20 03:02:37 +03:00
|
|
|
/**
|
|
|
|
* Get the root BrowsingContext within the frame.
|
|
|
|
* This may be null immediately after creating a remote frame.
|
|
|
|
*/
|
|
|
|
readonly attribute BrowsingContext? browsingContext;
|
|
|
|
|
2017-08-19 10:55:00 +03:00
|
|
|
/**
|
|
|
|
* Find out whether the loader's frame is at too great a depth in
|
|
|
|
* the frame tree. This can be used to decide what operations may
|
|
|
|
* or may not be allowed on the loader's docshell.
|
|
|
|
*/
|
|
|
|
[Pure]
|
|
|
|
readonly attribute boolean depthTooGreat;
|
|
|
|
|
2019-12-18 21:27:47 +03:00
|
|
|
/**
|
|
|
|
* Find out whether the loader's frame is a remote frame.
|
|
|
|
*/
|
|
|
|
readonly attribute boolean isRemoteFrame;
|
|
|
|
|
2017-08-19 10:55:00 +03:00
|
|
|
/**
|
|
|
|
* Activate remote frame.
|
|
|
|
* Throws an exception with non-remote frames.
|
|
|
|
*/
|
|
|
|
[Throws]
|
|
|
|
void activateRemoteFrame();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Deactivate remote frame.
|
|
|
|
* Throws an exception with non-remote frames.
|
|
|
|
*/
|
|
|
|
[Throws]
|
|
|
|
void deactivateRemoteFrame();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @see nsIDOMWindowUtils sendMouseEvent.
|
|
|
|
*/
|
|
|
|
[Throws]
|
|
|
|
void sendCrossProcessMouseEvent(DOMString aType,
|
|
|
|
float aX,
|
|
|
|
float aY,
|
|
|
|
long aButton,
|
|
|
|
long aClickCount,
|
2020-05-18 06:05:32 +03:00
|
|
|
long aModifiers);
|
2017-08-19 10:55:00 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Activate event forwarding from client (remote frame) to parent.
|
|
|
|
*/
|
|
|
|
[Throws]
|
|
|
|
void activateFrameEvent(DOMString aType, boolean capture);
|
|
|
|
|
|
|
|
// Note, when frameloaders are swapped, also messageManagers are swapped.
|
2017-06-20 12:09:50 +03:00
|
|
|
readonly attribute MessageSender? messageManager;
|
2017-08-19 10:55:00 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Request that the next time a remote layer transaction has been
|
|
|
|
* received by the Compositor, a MozAfterRemoteFrame event be sent
|
|
|
|
* to the window.
|
|
|
|
*/
|
|
|
|
void requestNotifyAfterRemotePaint();
|
|
|
|
|
2017-09-20 21:03:58 +03:00
|
|
|
/**
|
|
|
|
* Force a remote browser to recompute its dimension and screen position.
|
|
|
|
*/
|
|
|
|
[Throws]
|
|
|
|
void requestUpdatePosition();
|
|
|
|
|
2019-05-04 13:42:52 +03:00
|
|
|
/**
|
|
|
|
* Force a TabStateFlush from native sessionStoreListeners.
|
|
|
|
* Return true if the flush requires async ipc call.
|
|
|
|
*/
|
|
|
|
boolean requestTabStateFlush(unsigned long aFlushId);
|
|
|
|
|
2019-07-11 12:46:14 +03:00
|
|
|
/**
|
|
|
|
* Force Epoch update in native sessionStoreListeners.
|
|
|
|
*/
|
|
|
|
void requestEpochUpdate(unsigned long aEpoch);
|
|
|
|
|
2020-03-19 17:31:52 +03:00
|
|
|
/**
|
|
|
|
* Request a session history update in native sessionStoreListeners.
|
|
|
|
*/
|
|
|
|
void requestSHistoryUpdate(boolean aImmediately);
|
|
|
|
|
2017-08-19 10:55:00 +03:00
|
|
|
/**
|
|
|
|
* Print the current document.
|
|
|
|
*
|
|
|
|
* @param aOuterWindowID the ID of the outer window to print
|
|
|
|
* @param aPrintSettings optional print settings to use; printSilent can be
|
|
|
|
* set to prevent prompting.
|
2020-07-23 02:17:45 +03:00
|
|
|
* @return A Promise that resolves once printing is finished.
|
2017-08-19 10:55:00 +03:00
|
|
|
*/
|
|
|
|
[Throws]
|
2020-07-23 02:17:45 +03:00
|
|
|
Promise<void> print(unsigned long long aOuterWindowID,
|
|
|
|
nsIPrintSettings aPrintSettings);
|
2017-08-19 10:55:00 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The element which owns this frame loader.
|
|
|
|
*
|
|
|
|
* For example, if this is a frame loader for an <iframe>, this attribute
|
|
|
|
* returns the iframe element.
|
|
|
|
*/
|
|
|
|
[Pure]
|
|
|
|
readonly attribute Element? ownerElement;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2019-04-09 23:59:37 +03:00
|
|
|
* Cached childID of the ContentParent owning the RemoteTab in this frame
|
|
|
|
* loader. This can be used to obtain the childID after the RemoteTab died.
|
2017-08-19 10:55:00 +03:00
|
|
|
*/
|
|
|
|
[Pure]
|
|
|
|
readonly attribute unsigned long long childID;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Find out whether the owner content really is a mozbrowser. <xul:browser>
|
|
|
|
* is not considered to be a mozbrowser frame.
|
|
|
|
*/
|
|
|
|
[Pure]
|
|
|
|
readonly attribute boolean ownerIsMozBrowserFrame;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The last known width of the frame. Reading this property will not trigger
|
|
|
|
* a reflow, and therefore may not reflect the current state of things. It
|
|
|
|
* should only be used in asynchronous APIs where values are not guaranteed
|
|
|
|
* to be up-to-date when received.
|
|
|
|
*/
|
|
|
|
[Pure]
|
|
|
|
readonly attribute unsigned long lazyWidth;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The last known height of the frame. Reading this property will not trigger
|
|
|
|
* a reflow, and therefore may not reflect the current state of things. It
|
|
|
|
* should only be used in asynchronous APIs where values are not guaranteed
|
|
|
|
* to be up-to-date when received.
|
|
|
|
*/
|
|
|
|
[Pure]
|
|
|
|
readonly attribute unsigned long lazyHeight;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Is `true` if the frameloader is dead (destroy has been called on it)
|
|
|
|
*/
|
|
|
|
[Pure]
|
|
|
|
readonly attribute boolean isDead;
|
|
|
|
};
|
2017-08-20 00:16:16 +03:00
|
|
|
|
2018-04-09 23:30:33 +03:00
|
|
|
/**
|
|
|
|
* Interface for objects which represent a document that can be
|
|
|
|
* serialized with nsIWebBrowserPersist. This interface is
|
|
|
|
* asynchronous because the actual document can be in another process
|
|
|
|
* (e.g., if this object is a FrameLoader for an out-of-process
|
|
|
|
* frame).
|
|
|
|
*
|
|
|
|
* @see nsIWebBrowserPersistDocumentReceiver
|
|
|
|
* @see nsIWebBrowserPersistDocument
|
|
|
|
* @see nsIWebBrowserPersist
|
|
|
|
*
|
2020-05-13 17:44:03 +03:00
|
|
|
* @param aContext
|
|
|
|
* The browsing context of the subframe we'd like to persist.
|
|
|
|
* If set to nullptr, WebBrowserPersistable will attempt to persist
|
|
|
|
* the top-level document. If the browsing context is for a subframe
|
|
|
|
* that is not held beneath the WebBrowserPersistable, aRecv's onError
|
|
|
|
* method will be called with NS_ERROR_NO_CONTENT.
|
2018-04-09 23:30:33 +03:00
|
|
|
* @param aRecv
|
|
|
|
* The nsIWebBrowserPersistDocumentReceiver is a callback that
|
|
|
|
* will be fired once the document is ready for persisting.
|
|
|
|
*/
|
2019-09-24 18:22:26 +03:00
|
|
|
interface mixin WebBrowserPersistable
|
2017-08-20 00:16:16 +03:00
|
|
|
{
|
|
|
|
[Throws]
|
2020-05-13 17:44:03 +03:00
|
|
|
void startPersistence(BrowsingContext? aContext,
|
2017-08-20 00:16:16 +03:00
|
|
|
nsIWebBrowserPersistDocumentReceiver aRecv);
|
|
|
|
};
|
|
|
|
|
2019-09-24 18:22:26 +03:00
|
|
|
FrameLoader includes WebBrowserPersistable;
|