2005-02-08 09:55:00 +03:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04: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/. */
|
2005-02-08 09:55:00 +03:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
2013-03-22 04:05:20 +04:00
|
|
|
interface nsFrameLoader;
|
2005-02-08 09:55:00 +03:00
|
|
|
interface nsIDocShell;
|
2005-09-21 23:14:30 +04:00
|
|
|
interface nsIURI;
|
2009-10-05 15:52:19 +04:00
|
|
|
interface nsIFrame;
|
2013-01-10 11:23:55 +04:00
|
|
|
interface nsSubDocumentFrame;
|
2012-08-27 18:13:02 +04:00
|
|
|
interface nsIMessageSender;
|
2009-11-06 23:43:39 +03:00
|
|
|
interface nsIVariant;
|
2012-05-08 20:20:35 +04:00
|
|
|
interface nsIDOMElement;
|
2013-04-26 04:53:26 +04:00
|
|
|
interface nsITabParent;
|
2014-01-11 05:10:57 +04:00
|
|
|
interface nsILoadContext;
|
2016-05-16 12:40:54 +03:00
|
|
|
interface nsIPrintSettings;
|
|
|
|
interface nsIWebProgressListener;
|
2016-10-14 10:31:02 +03:00
|
|
|
interface nsIGroupedSHistory;
|
|
|
|
interface nsIPartialSHistory;
|
2005-02-08 09:55:00 +03:00
|
|
|
|
2015-10-22 06:44:00 +03:00
|
|
|
[scriptable, builtinclass, uuid(1645af04-1bc7-4363-8f2c-eb9679220ab1)]
|
2005-02-08 09:55:00 +03:00
|
|
|
interface nsIFrameLoader : nsISupports
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Get the docshell from the frame loader.
|
|
|
|
*/
|
|
|
|
readonly attribute nsIDocShell docShell;
|
|
|
|
|
2013-04-26 04:53:26 +04:00
|
|
|
/**
|
|
|
|
* Get this frame loader's TabParent, if it has a remote frame. Otherwise,
|
|
|
|
* returns null.
|
|
|
|
*/
|
|
|
|
readonly attribute nsITabParent tabParent;
|
|
|
|
|
2014-01-11 05:10:57 +04: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 nsILoadContext loadContext;
|
|
|
|
|
2005-02-08 09:55:00 +03:00
|
|
|
/**
|
|
|
|
* Start loading the frame. This method figures out what to load
|
|
|
|
* from the owner content in the frame loader.
|
|
|
|
*/
|
|
|
|
void loadFrame();
|
|
|
|
|
2005-09-21 23:14:30 +04:00
|
|
|
/**
|
|
|
|
* Loads the specified URI in this frame. Behaves identically to loadFrame,
|
|
|
|
* except that this method allows specifying the URI to load.
|
|
|
|
*/
|
|
|
|
void loadURI(in nsIURI aURI);
|
|
|
|
|
2015-01-05 22:16:09 +03:00
|
|
|
/**
|
|
|
|
* Puts the frameloader in prerendering mode.
|
|
|
|
*/
|
|
|
|
void setIsPrerendered();
|
|
|
|
|
2016-05-20 06:36:27 +03:00
|
|
|
/**
|
|
|
|
* Make the prerendered frameloader being active (and clear isPrerendered flag).
|
|
|
|
*/
|
|
|
|
void makePrerenderedLoaderActive();
|
|
|
|
|
2016-10-14 10:31:02 +03:00
|
|
|
/**
|
|
|
|
* Append partial session history from another frame loader.
|
2016-11-09 22:51:02 +03:00
|
|
|
*
|
|
|
|
* @return A promise which will be resolved when the navigation is complete.
|
2016-10-14 10:31:02 +03:00
|
|
|
*/
|
2016-12-22 11:06:50 +03:00
|
|
|
nsISupports appendPartialSHistoryAndSwap(in nsIFrameLoader aOther);
|
2016-10-14 10:31:02 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* If grouped session history is applied, use this function to navigate to
|
|
|
|
* an entry of session history object of another frameloader.
|
2016-11-09 22:51:02 +03:00
|
|
|
*
|
|
|
|
* @return A promise which will be resolved when the navigation is complete.
|
2016-10-14 10:31:02 +03:00
|
|
|
*/
|
2016-11-09 22:51:02 +03:00
|
|
|
nsISupports requestGroupedHistoryNavigation(in unsigned long aGlobalIndex);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Adds a blocking promise for the current cross process navigation.
|
|
|
|
* This method can only be called while the "BrowserWillChangeProcess" event
|
|
|
|
* is being fired.
|
|
|
|
*/
|
|
|
|
[implicit_jscontext]
|
|
|
|
void addProcessChangeBlockingPromise(in jsval aPromise);
|
2016-10-14 10:31:02 +03:00
|
|
|
|
2005-02-08 09:55:00 +03:00
|
|
|
/**
|
|
|
|
* Destroy the frame loader and everything inside it. This will
|
|
|
|
* clear the weak owner content reference.
|
|
|
|
*/
|
|
|
|
void destroy();
|
2005-08-22 19:44:49 +04: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.
|
|
|
|
*/
|
|
|
|
readonly attribute boolean depthTooGreat;
|
2009-10-05 15:52:19 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Updates the position and size of the subdocument loaded by this frameloader.
|
|
|
|
*
|
|
|
|
* @param aIFrame The nsIFrame for the content node that owns this frameloader
|
|
|
|
*/
|
2013-01-10 11:23:55 +04:00
|
|
|
[noscript] void updatePositionAndSize(in nsSubDocumentFrame aIFrame);
|
2009-11-05 21:14:22 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Activate remote frame.
|
|
|
|
* Throws an exception with non-remote frames.
|
|
|
|
*/
|
|
|
|
void activateRemoteFrame();
|
2009-11-05 21:21:09 +03:00
|
|
|
|
2011-06-18 04:08:32 +04:00
|
|
|
/**
|
|
|
|
* Deactivate remote frame.
|
|
|
|
* Throws an exception with non-remote frames.
|
|
|
|
*/
|
|
|
|
void deactivateRemoteFrame();
|
|
|
|
|
2009-11-05 21:21:09 +03:00
|
|
|
/**
|
|
|
|
* @see nsIDOMWindowUtils sendMouseEvent.
|
|
|
|
*/
|
|
|
|
void sendCrossProcessMouseEvent(in AString aType,
|
|
|
|
in float aX,
|
|
|
|
in float aY,
|
|
|
|
in long aButton,
|
|
|
|
in long aClickCount,
|
|
|
|
in long aModifiers,
|
|
|
|
[optional] in boolean aIgnoreRootScrollFrame);
|
|
|
|
|
2009-11-17 17:22:23 +03:00
|
|
|
/**
|
|
|
|
* Activate event forwarding from client (remote frame) to parent.
|
|
|
|
*/
|
|
|
|
void activateFrameEvent(in AString aType, in boolean capture);
|
2010-02-20 20:05:20 +03:00
|
|
|
|
2010-05-18 16:28:37 +04:00
|
|
|
// Note, when frameloaders are swapped, also messageManagers are swapped.
|
2012-08-27 18:13:02 +04:00
|
|
|
readonly attribute nsIMessageSender messageManager;
|
2010-03-19 09:52:18 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @see nsIDOMWindowUtils sendKeyEvent.
|
|
|
|
*/
|
|
|
|
void sendCrossProcessKeyEvent(in AString aType,
|
|
|
|
in long aKeyCode,
|
|
|
|
in long aCharCode,
|
|
|
|
in long aModifiers,
|
|
|
|
[optional] in boolean aPreventDefault);
|
|
|
|
|
2014-05-23 22:19:00 +04: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();
|
|
|
|
|
2016-10-14 10:31:02 +03:00
|
|
|
/**
|
|
|
|
* Close the window through the ownerElement.
|
|
|
|
*/
|
|
|
|
void requestFrameLoaderClose();
|
|
|
|
|
2016-05-16 12:40:54 +03:00
|
|
|
/**
|
|
|
|
* Print the current document.
|
|
|
|
*
|
2016-05-25 09:41:54 +03:00
|
|
|
* @param aOuterWindowID the ID of the outer window to print
|
2016-05-16 12:40:54 +03:00
|
|
|
* @param aPrintSettings optional print settings to use; printSilent can be
|
|
|
|
* set to prevent prompting.
|
|
|
|
* @param aProgressListener optional print progress listener.
|
|
|
|
*/
|
2016-05-25 09:41:54 +03:00
|
|
|
void print(in unsigned long long aOuterWindowID,
|
|
|
|
in nsIPrintSettings aPrintSettings,
|
2016-05-16 12:40:54 +03:00
|
|
|
in nsIWebProgressListener aProgressListener);
|
|
|
|
|
2016-12-19 10:03:17 +03:00
|
|
|
/**
|
|
|
|
* Ensure that the current nsIFrameLoader has a GroupedSHistory.
|
|
|
|
*/
|
|
|
|
nsIGroupedSHistory ensureGroupedSHistory();
|
|
|
|
|
2011-06-22 04:32:43 +04:00
|
|
|
/**
|
|
|
|
* The default event mode automatically forwards the events
|
2014-04-01 08:09:23 +04:00
|
|
|
* handled in EventStateManager::HandleCrossProcessEvent to
|
2011-06-22 04:32:43 +04:00
|
|
|
* the child content process when these events are targeted to
|
|
|
|
* the remote browser element.
|
|
|
|
*
|
|
|
|
* Used primarly for input events (mouse, keyboard)
|
|
|
|
*/
|
|
|
|
const unsigned long EVENT_MODE_NORMAL_DISPATCH = 0x00000000;
|
|
|
|
|
|
|
|
/**
|
2016-02-18 06:31:29 +03:00
|
|
|
* With this event mode, it's the application's responsability to
|
2011-06-22 04:32:43 +04:00
|
|
|
* convert and forward events to the content process
|
|
|
|
*/
|
|
|
|
const unsigned long EVENT_MODE_DONT_FORWARD_TO_CHILD = 0x00000001;
|
|
|
|
|
|
|
|
attribute unsigned long eventMode;
|
2011-12-05 16:38:46 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* If false, then the subdocument is not clipped to its CSS viewport, and the
|
|
|
|
* subdocument's viewport scrollbar(s) are not rendered.
|
|
|
|
* Defaults to true.
|
|
|
|
*/
|
|
|
|
attribute boolean clipSubdocument;
|
2012-02-18 03:41:13 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* If false, then the subdocument's scroll coordinates will not be clamped
|
|
|
|
* to their scroll boundaries.
|
|
|
|
* Defaults to true.
|
|
|
|
*/
|
|
|
|
attribute boolean clampScrollPosition;
|
2012-05-08 20:20:35 +04: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.
|
|
|
|
*/
|
|
|
|
readonly attribute nsIDOMElement ownerElement;
|
2013-04-26 04:53:26 +04:00
|
|
|
|
2013-09-12 23:24:10 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Cached childID of the ContentParent owning the TabParent in this frame
|
|
|
|
* loader. This can be used to obtain the childID after the TabParent died.
|
|
|
|
*/
|
|
|
|
readonly attribute unsigned long long childID;
|
|
|
|
|
2014-02-21 02:19:18 +04:00
|
|
|
/**
|
2016-10-15 04:46:26 +03:00
|
|
|
* Find out whether the owner content really is a mozbrowser. <xul:browser>
|
|
|
|
* is not considered to be a mozbrowser frame.
|
2014-02-21 02:19:18 +04:00
|
|
|
*/
|
2016-10-15 04:46:26 +03:00
|
|
|
readonly attribute boolean ownerIsMozBrowserFrame;
|
2014-08-19 18:14:22 +04:00
|
|
|
|
2016-04-08 03:04:57 +03:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
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.
|
|
|
|
*/
|
|
|
|
readonly attribute unsigned long lazyHeight;
|
2016-10-14 10:31:02 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The partial session history.
|
|
|
|
*/
|
2016-12-22 11:06:50 +03:00
|
|
|
readonly attribute nsIPartialSHistory partialSHistory;
|
2016-10-14 10:31:02 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The grouped session history composed of multiple session history objects
|
|
|
|
* across root docshells.
|
|
|
|
*/
|
2016-12-22 11:06:50 +03:00
|
|
|
readonly attribute nsIGroupedSHistory groupedSHistory;
|
2016-12-13 11:32:54 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Is `true` if the frameloader is dead (destroy has been called on it)
|
|
|
|
*/
|
|
|
|
[infallible] readonly attribute boolean isDead;
|
2005-02-08 09:55:00 +03:00
|
|
|
};
|
|
|
|
|
2013-03-17 11:55:15 +04:00
|
|
|
%{C++
|
|
|
|
class nsFrameLoader;
|
|
|
|
%}
|
|
|
|
|
2009-10-21 01:33:59 +04:00
|
|
|
native alreadyAddRefed_nsFrameLoader(already_AddRefed<nsFrameLoader>);
|
|
|
|
|
2015-12-11 19:17:33 +03:00
|
|
|
[scriptable, uuid(adc1b3ba-8deb-4943-8045-e6de0044f2ce)]
|
2005-02-08 09:55:00 +03:00
|
|
|
interface nsIFrameLoaderOwner : nsISupports
|
|
|
|
{
|
2008-08-08 03:15:40 +04:00
|
|
|
/**
|
|
|
|
* The frame loader owned by this nsIFrameLoaderOwner
|
|
|
|
*/
|
2016-08-11 19:09:22 +03:00
|
|
|
[binaryname(FrameLoaderXPCOM)] readonly attribute nsIFrameLoader frameLoader;
|
2009-10-21 01:33:59 +04:00
|
|
|
[noscript, notxpcom] alreadyAddRefed_nsFrameLoader GetFrameLoader();
|
2008-08-08 03:15:40 +04:00
|
|
|
|
2015-01-05 22:16:09 +03:00
|
|
|
/**
|
|
|
|
* Puts the FrameLoaderOwner in prerendering mode.
|
|
|
|
*/
|
|
|
|
void setIsPrerendered();
|
2016-10-17 17:37:50 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This method is used internally by SwapFrameLoaders to set the frame loader
|
|
|
|
* on the target nsFrameLoader.
|
|
|
|
*
|
|
|
|
* Avoid using this method outside of that context, and instead prefer using
|
|
|
|
* SwapFrameLoaders.
|
|
|
|
*/
|
|
|
|
[noscript, notxpcom] void
|
|
|
|
internalSetFrameLoader(in nsIFrameLoader aNewFrameLoader);
|
2005-02-08 09:55:00 +03:00
|
|
|
};
|