mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-31 22:25:30 +00:00
29e62c0155
--HG-- rename : xpfe/appshell/public/nsAppShellCID.h => xpfe/appshell/nsAppShellCID.h rename : xpfe/appshell/src/nsAppShellFactory.cpp => xpfe/appshell/nsAppShellFactory.cpp rename : xpfe/appshell/src/nsAppShellService.cpp => xpfe/appshell/nsAppShellService.cpp rename : xpfe/appshell/src/nsAppShellService.h => xpfe/appshell/nsAppShellService.h rename : xpfe/appshell/src/nsAppShellWindowEnumerator.cpp => xpfe/appshell/nsAppShellWindowEnumerator.cpp rename : xpfe/appshell/src/nsAppShellWindowEnumerator.h => xpfe/appshell/nsAppShellWindowEnumerator.h rename : xpfe/appshell/src/nsChromeTreeOwner.cpp => xpfe/appshell/nsChromeTreeOwner.cpp rename : xpfe/appshell/src/nsChromeTreeOwner.h => xpfe/appshell/nsChromeTreeOwner.h rename : xpfe/appshell/src/nsContentTreeOwner.cpp => xpfe/appshell/nsContentTreeOwner.cpp rename : xpfe/appshell/src/nsContentTreeOwner.h => xpfe/appshell/nsContentTreeOwner.h rename : xpfe/appshell/public/nsIAppShellService.idl => xpfe/appshell/nsIAppShellService.idl rename : xpfe/appshell/public/nsIPopupWindowManager.idl => xpfe/appshell/nsIPopupWindowManager.idl rename : xpfe/appshell/public/nsIWindowMediator.idl => xpfe/appshell/nsIWindowMediator.idl rename : xpfe/appshell/public/nsIWindowMediatorListener.idl => xpfe/appshell/nsIWindowMediatorListener.idl rename : xpfe/appshell/public/nsIXULBrowserWindow.idl => xpfe/appshell/nsIXULBrowserWindow.idl rename : xpfe/appshell/public/nsIXULWindow.idl => xpfe/appshell/nsIXULWindow.idl rename : xpfe/appshell/src/nsWebShellWindow.cpp => xpfe/appshell/nsWebShellWindow.cpp rename : xpfe/appshell/src/nsWebShellWindow.h => xpfe/appshell/nsWebShellWindow.h rename : xpfe/appshell/src/nsWindowMediator.cpp => xpfe/appshell/nsWindowMediator.cpp rename : xpfe/appshell/src/nsWindowMediator.h => xpfe/appshell/nsWindowMediator.h rename : xpfe/appshell/src/nsXULWindow.cpp => xpfe/appshell/nsXULWindow.cpp rename : xpfe/appshell/src/nsXULWindow.h => xpfe/appshell/nsXULWindow.h rename : xpfe/appshell/src/test/chrome.ini => xpfe/appshell/test/chrome.ini rename : xpfe/appshell/src/test/test_hiddenPrivateWindow.xul => xpfe/appshell/test/test_hiddenPrivateWindow.xul
149 lines
5.7 KiB
Plaintext
149 lines
5.7 KiB
Plaintext
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* 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/. */
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
interface nsIXULWindow;
|
|
interface nsIWebNavigation;
|
|
interface nsIURI;
|
|
interface nsIDOMWindow;
|
|
interface nsIAppShell;
|
|
interface nsITabParent;
|
|
|
|
[ptr] native JSContext(JSContext);
|
|
|
|
%{C++
|
|
#include "js/TypeDecls.h"
|
|
%}
|
|
|
|
[scriptable, uuid(41a2f0c6-3ca1-44f9-8efa-744a43aa399d)]
|
|
interface nsIAppShellService : nsISupports
|
|
{
|
|
/**
|
|
* Create a window, which will be initially invisible.
|
|
* @param aParent the parent window. Can be null.
|
|
* @param aUrl the contents of the new window.
|
|
* @param aChromeMask chrome flags affecting the kind of OS border
|
|
* given to the window. see nsIBrowserWindow for
|
|
* bit/flag definitions.
|
|
* @param aCallbacks interface providing C++ hooks for window initialization
|
|
* before the window is made visible. Can be null.
|
|
* Deprecated.
|
|
* @param aInitialWidth width, in pixels, of the window. Width of window
|
|
* at creation. Can be overridden by the "width"
|
|
* tag in the XUL. Set to NS_SIZETOCONTENT to force
|
|
* the window to wrap to its contents.
|
|
* @param aInitialHeight like aInitialWidth, but subtly different.
|
|
* @param aOpeningTab The TabParent that requested that this window be opened.
|
|
* Can be left null.
|
|
*/
|
|
const long SIZE_TO_CONTENT = -1;
|
|
nsIXULWindow createTopLevelWindow(in nsIXULWindow aParent,
|
|
in nsIURI aUrl,
|
|
in uint32_t aChromeMask,
|
|
in long aInitialWidth,
|
|
in long aInitialHeight,
|
|
in nsITabParent aOpeningTab);
|
|
|
|
/**
|
|
* This is the constructor for creating an invisible DocShell.
|
|
* It is used to simulate DOM windows without an actual physical
|
|
* representation.
|
|
* @param aIsChrome Set true if you want to use it for chrome content.
|
|
*/
|
|
nsIWebNavigation createWindowlessBrowser([optional] in bool aIsChrome);
|
|
|
|
[noscript]
|
|
void createHiddenWindow();
|
|
|
|
void destroyHiddenWindow();
|
|
|
|
/**
|
|
* Return the (singleton) application hidden window, automatically created
|
|
* and maintained by this AppShellService.
|
|
* @param aResult the hidden window. Do not unhide hidden window.
|
|
* Do not taunt hidden window.
|
|
*/
|
|
readonly attribute nsIXULWindow hiddenWindow;
|
|
|
|
/**
|
|
* Return the (singleton) application hidden window, automatically created
|
|
* and maintained by this AppShellService.
|
|
* @param aResult the hidden window. Do not unhide hidden window.
|
|
* Do not taunt hidden window.
|
|
*/
|
|
readonly attribute nsIDOMWindow hiddenDOMWindow;
|
|
|
|
/**
|
|
* Return the (singleton) application hidden private window, automatically
|
|
* created and maintained by this AppShellService. This window is created
|
|
* in private browsing mode.
|
|
* @param aResult the hidden private window. Do not unhide hidden window.
|
|
* Do not taunt hidden window.
|
|
*/
|
|
readonly attribute nsIXULWindow hiddenPrivateWindow;
|
|
|
|
/**
|
|
* Return the (singleton) application hidden private window, automatically
|
|
* created and maintained by this AppShellService. This window is created
|
|
* in private browsing mode.
|
|
* @param aResult the hidden private window. Do not unhide hidden window.
|
|
* Do not taunt hidden window.
|
|
*/
|
|
readonly attribute nsIDOMWindow hiddenPrivateDOMWindow;
|
|
|
|
/**
|
|
* Return the (singleton) application hidden window as an nsIDOMWindow,
|
|
* and, the corresponding JavaScript context pointer. This is useful
|
|
* if you'd like to subsequently call OpenDialog on the hidden window.
|
|
* @aHiddenDOMWindow the hidden window QI'd to type nsIDOMWindow
|
|
* @aJSContext the corresponding JavaScript context
|
|
*/
|
|
[noscript]
|
|
void getHiddenWindowAndJSContext(out nsIDOMWindow aHiddenDOMWindow,
|
|
out JSContext aJSContext);
|
|
|
|
/**
|
|
* Return true if the application hidden window was provided by the
|
|
* application. If it wasn't, the default hidden window was used. This will
|
|
* usually be false on all non-mac platforms.
|
|
*/
|
|
readonly attribute boolean applicationProvidedHiddenWindow;
|
|
|
|
/**
|
|
* Add a window to the application's registry of windows. These windows
|
|
* are generally shown in the Windows taskbar, and the application
|
|
* knows it can't quit until it's out of registered windows.
|
|
* @param aWindow the window to register
|
|
* @note When this method is successful, it fires the global notification
|
|
* "xul-window-registered"
|
|
*/
|
|
void registerTopLevelWindow(in nsIXULWindow aWindow);
|
|
|
|
/**
|
|
* Remove a window from the application's window registry. Note that
|
|
* this method won't automatically attempt to quit the app when
|
|
* the last window is unregistered. For that, see Quit().
|
|
* @param aWindow you see the pattern
|
|
*/
|
|
void unregisterTopLevelWindow(in nsIXULWindow aWindow);
|
|
|
|
/**
|
|
* Whether the hidden private window has been lazily created.
|
|
*/
|
|
[noscript]
|
|
readonly attribute boolean hasHiddenPrivateWindow;
|
|
|
|
/**
|
|
* Start/stop tracking lags in the event loop.
|
|
* If the event loop gets unresponsive, a "event-loop-lag" notification
|
|
* is sent. Note that calling `startEventLoopLagTracking` when tracking
|
|
* is already enabled has no effect.
|
|
* @return true if tracking succeeded.
|
|
*/
|
|
bool startEventLoopLagTracking();
|
|
void stopEventLoopLagTracking();
|
|
};
|