Files
roytam1 c8732098b3 import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1246851 (Part 1) - Add a new SurfacePipe API for writing to image surfaces in a safe and composable manner. r=njn (2e3353a6a7)
- Bug 1246851 (Part 2) - Add SurfaceFilter implementations for basic surface output operations. r=njn (fa30948a3f)
- Bug 1246851 (Part 3) - Add a factory for constructing SurfacePipes. r=njn (7a746d3ec8)
- Bug 1191347 - Explicitly release surfaces on the main thread in TestDecodeToSurface. r=me (fa1a68dc9a)
- Bug 1246851 (Part 4) - Add a test suite for SurfacePipes and SurfaceFilters. r=njn (380dc94c08)
- Bug 1247152 (Part 1) - Use SurfacePipe in the GIF decoder. r=njn (8b3d76f017)
- Bug 1247152 (Part 2) - Remove even more code from the GIF decoder. r=edwin (80c8cc5e1c)
- side effects Bug 1247152 (Part 1) (5b6cbf0ad5)
- Bug 1237232 - Properly check the result of Vector append() calls in security/. r=keeler (b06dce061f)
- Bug 1235308 - Fix -Wimplicit-fallthrough warnings in security/. r=keeler (ac5c3bf540)
- Bug 1235188 - Fix -Wformat warnings in security/certverifier/. r=keeler (25ee7ee77c)
- Bug 1004149 - Remove some dead code. r=keeler (59fedcb6a6)
- Bug 1004149 - Return mozilla::pkix::Result values in nsNSSHttpInterface functions. r=keeler (76933c7d94)
- Bug 1187173 - Disable warning C4623 on security/certverifier. r=briansmith (c1353b0577)
- Bug 1256484 - Disable C4456 and C4458 to unblock compilation on VS2015; r=keeler (b51ac368ba)
- Bug 1251009 - Remove unused nsICertificateDialogs.notifyCACertExists() method. r=keeler, r=mfinkle (9ca9aee3d0)
- Bug 1249224 - window.open() should open a new window in the same container, r=bz (c57c76ec2f)
- Bug 1245451 - add default nullptr value to mChrome. r=bsmedberg (3236ea34df)
- Bug 1255849. Add some documentation for AutoJSAPI instances that seem to be used just for cxpushing. r=bholley (60a81652de)
- Bug 1189554 - Make Saved Passwords dialog resizable on Windows again. r=smaug (a367796251)
- Bug 1252974 - Convert screen's available dimensions to CSS-pixel units in nsWindowWatcher. r=emk (5524055ab0)
- Bug 1233328 - Part 1: Ignore SHA-1 pins in PublicKeyPinningService.cpp. r=keeler (e5fe732a4b)
- Bug 1233328 - Part 2: Use SHA-256 StaticFingerprints directly instead창 of StaticPinset since the SHA-1 StaticFingerprints entry will always be null. r=keeler (50f88c76da)
- Bug 1256089 - Fix Mutex support for tier-3 platforms; r=froydnj (76ab483843)
- Bug 1257019 - Add move construction to js::Mutex<T>. r=terrence (383ad474ba)
- No bug, Automated HPKP preload list update from host bld-linux64-spot-309 - a=hpkp-update (0a6d3b9c40)
- No bug, Automated HPKP preload list update from host bld-linux64-spot-223 - a=hpkp-update (7b3dbac6f8)
- Bug 1255655 - Const-ify kPinset_* arrays. r=cykesiopka. (ddbaad40a0)
- No bug, Automated HPKP preload list update from host bld-linux64-spot-543 - a=hpkp-update (f5c37e366a)
- bug 1233853 - make nsSyncJPAKE aware of NSS shutdown r=jcj (9f74b5a46f)
- Bug 1215734 - Expand GeckoMediaPlugin sandbox policy for Clang 3.7 ASan. r=kang (a96e0429e5)
- part Bug 1154738 - Fixed WMFUtils.cpp compilation on mingw (9ba8bd1481)
- Bug 1256498. Explicitly convert to float. r=bas (ce97ef100e)
- Bug 1223736 - Part 1: Set correct effective transform on mask layers. r=thinker (a87514ac4f)
- Bug 1249813 - part 1 - revise nsShmImage to allow draw targets anywhere inside its bounds. r=jrmuizel (cba4cdf8c9)
- Bug 1249813 - part 2 - make Cairo mark a surface as clear if clip covers entire surface. r=jrmuizel (45ccfcfc15)
- Bug 1249813 - part 3 - tell the compositor if the root layer has opaque content so it can skip clears. r=mattwoodrow (2abaa0cf8b)
- Bug 1255303 - Use SurfaceFormat::B8G8R8X8 as back buffer if possible r=jrmuizel (5f81a83123)
- Bug 1253860 - Don't update the scrollbar unless we're actually painting. r=mstange (d3a2482408)
- Bug 1253860 - Add a flag on scroll frames indicating if they have an APZ counterpart. r=mstange (2aef746ee1)
- Bug 1253860 - Skip paints for main thread scrolls if we can ask APZ to handle the scrolling for us. r=mstange (4483da1f16)
- Bug 1244116 - Telemetry for mixed content requests by plugins. r=smaug, p=ally (fd5f87f666)
- Bug 1252829 - CSP Telemetry. r=ckerschb, p=bsmedberg (8d340fa824)
- Bug 1246464: Add 'const' to some stylesheet args in nsDocument methods. r=heycam (4e744d81d2)
- Bug 1255705 - Add some useful logging that can be enabled at compile time. r=botond (80f0202160)
- Bug 1255856 - Don't allow paint-skipping if there are windowed plugins on the page. r=mstange,jimm (25e6d8ed22)
- Bug 1256727 - Don't allow paint-skipping on pages with scroll-linked effects. r=mstange (a8bace52ff)
- Bug 1247098 - Take document resolution into account when computing root composition bounds for displayport base. r=tnikkel (1b7b61c82e)
- Bug 1250550 - Ensure a scroll event posted during a refresh driver tick fires during that same tick. r=mats (d5bfc24524)
- Bug 1253739 - Fix incorrect namespace on forward declaration. r=botond (dfc7aac51e)
- Bug 1253489 - Update SendFenceHandleIfPresent() r=nical (798c209dff)
- Bug 1253860 - Stop APZC from reprocessing stale metrics on unrelated layer tree updates. r=botond (1013df0068)
- Bug 1253860 - Add machinery to update APZ's scroll offset without a main-thread paint. r=botond (cb95baf9c6)
- Bug 1239564 - Post translate maskSurface to renderTarget. r=roc (66c56d227d)
- Bug 1223736 - Part 2: Draw masks in the correct coordinate space when doing 3d transforms in BasicCompositor. r=lsalzman (2d62616534)
- Bug 1223736 - Part 3: Remove the distinction between 2d and 3d masks since it only adds complexity. r=Bas (61c2306875)
- Bug 1137561 - Follow up VS2015 build error. r=masayuki (f12716a1ab)
- Bug 1217275 Fix missing \n in IMMHandler::HandleDocumentFeed(), it was replaced to empty string accidentally r=m_kato (3315b1c270)
- Bug 1243268 - Adjust ATOK workaround. r=masayuki (13af7184d1)
- Bug 1242690 - If a drag block is interrupted by something else, have it create a new drag block when it resumes. r=rbarker (fe3dc8deac)
- Bug 1242690 - Add untransforming of mouse events not in a drag block. r=rbarker (a39e715efe)
- Bug 1241991 - Switch mTreeLock from a Monitor to a Mutex. r=kats (0eca284591)
- Bug 1242690 - Further refine the mouse event untransformation code to only apply to events directed at a scrollbar. r=rbarker (5c92ca2807)
- Bug 1251608 - Add a root-content annotation to the APZ test data structure. r=botond (a1ee8e496a)
- Bug 1249748 - Ensure the mHandledByAPZ flag is set on WidgetTouchEvents that are handled by APZ. r=botond (11bdfae896)
- Bug 1242690 - Don't apply the main-thread callback transform for events in a drag block. r=rbarker (3db1405b68)
- Bug 1243589 - Use SingleTiledContentClient even for scrollable layers if the layer is smaller than a single tile. r=mattwoodrow (56bb664de1)
- Bug 1250517 - Differentiate between no critical display port and empty critical display port in ClientTiledPaintedLayer; r=kats (1b809fac8e)
- Bug 1255448 - Call ClientMultiTiledLayerBuffer::PaintThebes even when region to paint is empty. r=mattwoodrow (31ac878dc0)
- Bug 1255907 - Fix unification build issues in APZ & Layers. r=kats (9829525402)
- Bug 1256344 - If a long-press is interrupted by a non-touch block, don't dispatch the long-press event. r=botond (b3bdd0e58e)
- Bug 1256341 - Guard against scenarios where GenerateSingleTap is called without an active touch block. r=botond (d4ec208407)
- Bug 1230552 - Minor follow-up to add an assertion. rs=kats (6f9eec7bd4)
- Bug 1247964 - Allow InputBlockState::SetScrolledApzc to accept new APZC when it is an ancestor of the current APZC r=kats # Please enter the commit message for your changes. Lines starting (08ce9cfa98)
- Bug 1257264 - When apz.allow_immediate_handoff=false, APZ handoff should not occur when panning changes direction r=botond (6ec9ec22e6)
- Bug 1250213 - Ensure the scroll offset does not go outside the page bounds when going full screen r=kats (ace8e8a80c)
- Bug 1241332 - part 1, Request content repaint at end of APZ animation r=kats (74f7e249f2)
- Bug 1255705 - Generalize the NotifyLayersUpdated short-circuit codepath to trigger on empty transactions as well. r=botond (0344d44844)
- Bug 1250614 - Repeated zooming in bug on mobile Wikipedia site r=botond (459f02b8d3)
- Bug 1251001 - Input fields at the bottom of a page do not pan into view when gaining focus. r=botond (770102bf9f)
- Bug 1190093 (Comment Tweak) - Add better comments for nsIDocument::mIsShowing and mVisible. r=me DONTBUILD (e3822ef086)
- Bug 1217226: P1. Use VideoInfo display size data rather than attempt to detect value in stream. r=cpearce (a4a7e9b19a)
- Bug 1217226: P2. Implement WMFMediaDataDecoder::ConfigurationChanged. r=cpearce (52177525c5)
- fix misspatch (61a694fe3d)
- Bug 1249706: Added telemetry for the proportion of frames dropped keyed by several details. r=jya (cb459d971c)
- Bug 1202296 - Recreate the MFTDecoder when we want to disable DXVA. r=cpearce (d82999e94f)
- Bug 1176071 - Handle WMF MFTDecoder returning success but no output, with telemetry. r=mattwoodrow,r=vladan (da8017c92b)
- align, cleanup (9a86d51dfd)
- no bug - fix case of nsIDocShell.h in WindowsUIUtils.cpp (0ccabaa445)
- Bug 1187724 Don't dispatch KeyboardEvents when the target of WM_APPCOMMAND is a windowed plug-in for preventing deadlock r=jimm (7b6d83559c)
- Bug 1187178 - Use MOZ_WINSDK_MAXVER instead of #ifndef. r=jimm (06c949ddb9)
- bits of Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel (7beaa2dcc4)
- Bug 1257791: Return correct DPI and printing scale from nsDeviceContextSpecWin when printing to PDF. r=jimm (87360301ea)
- Bug 1242295 - Fix compile error in nsDeviceContextSpecWin. r=jimm (d1d4680319)
- Bug 1229881 - fix off-by-one error in nsPrinterEnumeratorWin::GetPrinterNameList; r=dbaron; a=KWierso (439061ba50)
- Bug 1239683 - Replace NS_UNCONSTRAINEDSIZE with NS_MAXSIZE in windows/nsWindow.cpp. r=mats (4135189bec)
- Bug 1033488 - Send RTL information to child process by WM_INPUTLANGCHANGE. r=masayuki (eaf8f70d34)
- Bug 1238137 - Telemetry pings for main thread touch scrolling (Windows only). r=kats (f2194a2965)
- Bug 1156182 - Ensure nsWindow::Destroy() is called before destroying mPresentLock to avoid a race with the compositor thread. r=Bas (0452ffc641)
- Bug 1173617. Don't cache titlebar caption sizes unless the widget has a titlebar. r=jimm (b29e190504)
- Bug 580165 - Clean up dead code related to missing screen managers in widget. r=jimm (bf83f21ddc)
- Bug 1256501: Fix warning C4312 with 64-bit VS2015 in widget/windows/nsWindow.cpp; r=jimm (635151964e)
- Bug 1242690 - Squash together DispatchAPZAwareEvent and DispatchInputEvent. r=dvander (d7b4fea361)
- Bug 1242616: Add break in nsWindow.cpp WM_GETOBJECT handling. r=tbsaunde (eb516d4119)
- Bug 1239353 - Don't try to change DPI on the fly for popup windows, they remain connected to their parent's presShell and therefore need to share its resolution. r=emk (1491b84fd1)
- Bug 1246389 - Resize window appropriately on WM_DPICHANGED messages for dynamic resolution changes. r=emk (f3dbfcdbb1)
- Bug 1254019 - Don't attempt to resize a maximized window on DPI change; and when handling a DPI change, constrain the resized window to the screen bounds. r=emk (2047c2dcb5)
- Bug 1252191 - use UniquePtr instead of ScopedFreePtr in PoisonIOInterposerMac.cpp; r=aklotz (7c26e55b76)
- Bug 1233208: Disable IOInterposer on Beta and Release; r=froydnj (04a6f8b07c)
- crashreporter (377572bbb1)
- Bug 1055322 - The realloc for libnestegg should free with size 0. r=froydnj (ea624646ca)
- Bug 1236789. Avoid creating an unnecessary thread pool thread for tail-dispatch in TaskQueue. r=bholley (e7fb9e4373)
- Bug 1255655 - Const-ify named CIDs. r=froydnj. (03b414d92b)
- Bug 1250396 (part 1) - Document a subtle contraint on nsIAtom. r=froydnj. (ff279149ac)
- Bug 1250396 (part 2) - Remove nsStaticAtomStringType. r=froydnj. (5520507680)
- Bug 1255343 - Stop returning nsresult from NS_RegisterStaticAtoms; r=ehsan (de1d387937)
- Bug 1251495 - remove unnecessary Logging.h include from nsStaticAtom.h; r=erahm (5226a840fa)
2024-03-20 23:36:16 +08:00

485 lines
15 KiB
C++

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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/. */
#ifndef _nsXULAppAPI_h__
#define _nsXULAppAPI_h__
#include "nsID.h"
#include "xrecore.h"
#include "nsXPCOM.h"
#include "nsISupports.h"
#include "mozilla/Logging.h"
#include "nsXREAppData.h"
#include "js/TypeDecls.h"
#include "mozilla/ArrayUtils.h"
#include "mozilla/Assertions.h"
#include "mozilla/Vector.h"
#include "mozilla/TimeStamp.h"
/**
* A directory service key which provides the platform-correct "application
* data" directory as follows, where $name and $vendor are as defined above and
* $vendor is optional:
*
* Windows:
* HOME = Documents and Settings\$USER\Application Data
* UAppData = $HOME[\$vendor]\$name
*
* Unix:
* HOME = ~
* UAppData = $HOME/.[$vendor/]$name
*
* Mac:
* HOME = ~
* UAppData = $HOME/Library/Application Support/$name
*
* Note that the "profile" member above will change the value of UAppData as
* follows:
*
* Windows:
* UAppData = $HOME\$profile
*
* Unix:
* UAppData = $HOME/.$profile
*
* Mac:
* UAppData = $HOME/Library/Application Support/$profile
*/
#define XRE_USER_APP_DATA_DIR "UAppData"
/**
* A directory service key which provides a list of all enabled extension
* directories and files (packed XPIs). The list includes compatible
* platform-specific extension subdirectories.
*
* @note The directory list will have no members when the application is
* launched in safe mode.
*/
#define XRE_EXTENSIONS_DIR_LIST "XREExtDL"
/**
* A directory service key which provides the executable file used to
* launch the current process. This is the same value returned by the
* XRE_GetBinaryPath function defined below.
*/
#define XRE_EXECUTABLE_FILE "XREExeF"
/**
* A directory service key which specifies the profile
* directory. Unlike the NS_APP_USER_PROFILE_50_DIR key, this key may
* be available when the profile hasn't been "started", or after is
* has been shut down. If the application is running without a
* profile, such as when showing the profile manager UI, this key will
* not be available. This key is provided by the XUL apprunner or by
* the aAppDirProvider object passed to XRE_InitEmbedding.
*/
#define NS_APP_PROFILE_DIR_STARTUP "ProfDS"
/**
* A directory service key which specifies the profile
* directory. Unlike the NS_APP_USER_PROFILE_LOCAL_50_DIR key, this key may
* be available when the profile hasn't been "started", or after is
* has been shut down. If the application is running without a
* profile, such as when showing the profile manager UI, this key will
* not be available. This key is provided by the XUL apprunner or by
* the aAppDirProvider object passed to XRE_InitEmbedding.
*/
#define NS_APP_PROFILE_LOCAL_DIR_STARTUP "ProfLDS"
/**
* A directory service key which specifies the system extension
* parent directory containing platform-specific extensions.
* This key may not be available on all platforms.
*/
#define XRE_SYS_LOCAL_EXTENSION_PARENT_DIR "XRESysLExtPD"
/**
* A directory service key which specifies the system extension
* parent directory containing platform-independent extensions.
* This key may not be available on all platforms.
* Additionally, the directory may be equal to that returned by
* XRE_SYS_LOCAL_EXTENSION_PARENT_DIR on some platforms.
*/
#define XRE_SYS_SHARE_EXTENSION_PARENT_DIR "XRESysSExtPD"
/**
* A directory service key which specifies the user system extension
* parent directory.
*/
#define XRE_USER_SYS_EXTENSION_DIR "XREUSysExt"
/**
* A directory service key which specifies the distribution specific files for
* the application.
*/
#define XRE_APP_DISTRIBUTION_DIR "XREAppDist"
/**
* A directory service key which specifies the location for app dir add-ons.
* Should be a synonym for XCurProcD everywhere except in tests.
*/
#define XRE_ADDON_APP_DIR "XREAddonAppDir"
/**
* A directory service key which provides the update directory.
* At present this is supported only on Windows.
* Windows: Documents and Settings\<User>\Local Settings\Application Data\
* <Vendor>\<Application>\<relative path to app dir from Program Files>
* If appDir is not under the Program Files, directory service will fail.
* Callers should fallback to appDir.
*/
#define XRE_UPDATE_ROOT_DIR "UpdRootD"
/**
* A directory service key which provides an alternate location
* to UpdRootD to to store large files. This key is currently
* only implemented in the Gonk directory service provider.
*/
#define XRE_UPDATE_ARCHIVE_DIR "UpdArchD"
/**
* A directory service key which provides the directory where an OS update is
* applied.
* At present this is supported only in Gonk.
*/
#define XRE_OS_UPDATE_APPLY_TO_DIR "OSUpdApplyToD"
/**
* Begin an XUL application. Does not return until the user exits the
* application.
*
* @param argc/argv Command-line parameters to pass to the application. On
* Windows, these should be in UTF8. On unix-like platforms
* these are in the "native" character set.
*
* @param aAppData Information about the application to be run.
*
* @param aFlags Platform specific flags.
*
* @return A native result code suitable for returning from main().
*
* @note If the binary is linked against the standalone XPCOM glue,
* XPCOMGlueStartup() should be called before this method.
*/
XRE_API(int,
XRE_main, (int argc, char* argv[], const nsXREAppData* aAppData,
uint32_t aFlags))
/**
* Given a path relative to the current working directory (or an absolute
* path), return an appropriate nsIFile object.
*
* @note Pass UTF8 strings on Windows... native charset on other platforms.
*/
XRE_API(nsresult,
XRE_GetFileFromPath, (const char* aPath, nsIFile** aResult))
/**
* Get the path of the running application binary and store it in aResult.
* @param aArgv0 The value passed as argv[0] of main(). This value is only
* used on *nix, and only when other methods of determining
* the binary path have failed.
*/
XRE_API(nsresult,
XRE_GetBinaryPath, (const char* aArgv0, nsIFile** aResult))
/**
* Get the static module built in to libxul.
*/
XRE_API(const mozilla::Module*,
XRE_GetStaticModule, ())
/**
* Lock a profile directory using platform-specific semantics.
*
* @param aDirectory The profile directory to lock.
* @param aLockObject An opaque lock object. The directory will remain locked
* as long as the XPCOM reference is held.
*/
XRE_API(nsresult,
XRE_LockProfileDirectory, (nsIFile* aDirectory,
nsISupports** aLockObject))
/**
* Initialize libXUL for embedding purposes.
*
* @param aLibXULDirectory The directory in which the libXUL shared library
* was found.
* @param aAppDirectory The directory in which the application components
* and resources can be found. This will map to
* the NS_OS_CURRENT_PROCESS_DIR directory service
* key.
* @param aAppDirProvider A directory provider for the application. This
* provider will be aggregated by a libxul provider
* which will provide the base required GRE keys.
*
* @note This function must be called from the "main" thread.
*
* @note At the present time, this function may only be called once in
* a given process. Use XRE_TermEmbedding to clean up and free
* resources allocated by XRE_InitEmbedding.
*/
XRE_API(nsresult,
XRE_InitEmbedding2, (nsIFile* aLibXULDirectory,
nsIFile* aAppDirectory,
nsIDirectoryServiceProvider* aAppDirProvider))
/**
* Register static XPCOM component information.
* This method may be called at any time before or after XRE_main or
* XRE_InitEmbedding.
*/
XRE_API(nsresult,
XRE_AddStaticComponent, (const mozilla::Module* aComponent))
/**
* Register XPCOM components found in an array of files/directories.
* This method may be called at any time before or after XRE_main or
* XRE_InitEmbedding.
*
* @param aFiles An array of files or directories.
* @param aFileCount the number of items in the aFiles array.
* @note appdir/components is registered automatically.
*
* NS_COMPONENT_LOCATION specifies a location to search for binary XPCOM
* components as well as component/chrome manifest files.
*
* NS_SKIN_LOCATION specifies a location to search for chrome manifest files
* which are only allowed to register only skin packages and style overlays.
*/
enum NSLocationType
{
NS_COMPONENT_LOCATION,
NS_SKIN_LOCATION,
NS_BOOTSTRAPPED_LOCATION
};
XRE_API(nsresult,
XRE_AddManifestLocation, (NSLocationType aType,
nsIFile* aLocation))
/**
* Register XPCOM components found in a JAR.
* This is similar to XRE_AddManifestLocation except the file specified
* must be a zip archive with a manifest named chrome.manifest
* This method may be called at any time before or after XRE_main or
* XRE_InitEmbedding.
*
* @param aFiles An array of files or directories.
* @param aFileCount the number of items in the aFiles array.
* @note appdir/components is registered automatically.
*
* NS_COMPONENT_LOCATION specifies a location to search for binary XPCOM
* components as well as component/chrome manifest files.
*
* NS_SKIN_LOCATION specifies a location to search for chrome manifest files
* which are only allowed to register only skin packages and style overlays.
*/
XRE_API(nsresult,
XRE_AddJarManifestLocation, (NSLocationType aType,
nsIFile* aLocation))
/**
* Fire notifications to inform the toolkit about a new profile. This
* method should be called after XRE_InitEmbedding if the embedder
* wishes to run with a profile. Normally the embedder should call
* XRE_LockProfileDirectory to lock the directory before calling this
* method.
*
* @note There are two possibilities for selecting a profile:
*
* 1) Select the profile before calling XRE_InitEmbedding. The aAppDirProvider
* object passed to XRE_InitEmbedding should provide the
* NS_APP_USER_PROFILE_50_DIR key, and may also provide the following keys:
* - NS_APP_USER_PROFILE_LOCAL_50_DIR
* - NS_APP_PROFILE_DIR_STARTUP
* - NS_APP_PROFILE_LOCAL_DIR_STARTUP
* In this scenario XRE_NotifyProfile should be called immediately after
* XRE_InitEmbedding. Component registration information will be stored in
* the profile and JS components may be stored in the fastload cache.
*
* 2) Select a profile some time after calling XRE_InitEmbedding. In this case
* the embedder must install a directory service provider which provides
* NS_APP_USER_PROFILE_50_DIR and optionally
* NS_APP_USER_PROFILE_LOCAL_50_DIR. Component registration information
* will be stored in the application directory and JS components will not
* fastload.
*/
XRE_API(void,
XRE_NotifyProfile, ())
/**
* Terminate embedding started with XRE_InitEmbedding or XRE_InitEmbedding2
*/
XRE_API(void,
XRE_TermEmbedding, ())
/**
* Create a new nsXREAppData structure from an application.ini file.
*
* @param aINIFile The application.ini file to parse.
* @param aAppData A newly-allocated nsXREAppData structure. The caller is
* responsible for freeing this structure using
* XRE_FreeAppData.
*/
XRE_API(nsresult,
XRE_CreateAppData, (nsIFile* aINIFile,
nsXREAppData** aAppData))
/**
* Parse an INI file (application.ini or override.ini) into an existing
* nsXREAppData structure.
*
* @param aINIFile The INI file to parse
* @param aAppData The nsXREAppData structure to fill.
*/
XRE_API(nsresult,
XRE_ParseAppData, (nsIFile* aINIFile,
nsXREAppData* aAppData))
/**
* Free a nsXREAppData structure that was allocated with XRE_CreateAppData.
*/
XRE_API(void,
XRE_FreeAppData, (nsXREAppData* aAppData))
enum GeckoProcessType
{
GeckoProcessType_Default = 0,
GeckoProcessType_Plugin,
GeckoProcessType_Content,
GeckoProcessType_IPDLUnitTest,
GeckoProcessType_GMPlugin, // Gecko Media Plugin
GeckoProcessType_End,
GeckoProcessType_Invalid = GeckoProcessType_End
};
static const char* const kGeckoProcessTypeString[] = {
"default",
"plugin",
"tab",
"ipdlunittest",
"geckomediaplugin"
};
static_assert(MOZ_ARRAY_LENGTH(kGeckoProcessTypeString) ==
GeckoProcessType_End,
"Array length mismatch");
XRE_API(const char*,
XRE_ChildProcessTypeToString, (GeckoProcessType aProcessType))
XRE_API(void,
XRE_SetProcessType, (const char* aProcessTypeString))
#if defined(MOZ_CRASHREPORTER)
// Used in the "master" parent process hosting the crash server
XRE_API(bool,
XRE_TakeMinidumpForChild, (uint32_t aChildPid, nsIFile** aDump,
uint32_t* aSequence))
// Used in child processes.
XRE_API(bool,
XRE_SetRemoteExceptionHandler, (const char* aPipe))
#endif
namespace mozilla {
namespace gmp {
class GMPLoader;
} // namespace gmp
} // namespace mozilla
XRE_API(nsresult,
XRE_InitChildProcess, (int aArgc,
char* aArgv[],
mozilla::gmp::GMPLoader* aGMPLoader))
XRE_API(GeckoProcessType,
XRE_GetProcessType, ())
XRE_API(bool,
XRE_IsParentProcess, ())
XRE_API(bool,
XRE_IsContentProcess, ())
typedef void (*MainFunction)(void* aData);
XRE_API(nsresult,
XRE_InitParentProcess, (int aArgc,
char* aArgv[],
MainFunction aMainFunction,
void* aMainFunctionExtraData))
XRE_API(int,
XRE_RunIPDLTest, (int aArgc,
char* aArgv[]))
XRE_API(nsresult,
XRE_RunAppShell, ())
XRE_API(nsresult,
XRE_InitCommandLine, (int aArgc, char* aArgv[]))
XRE_API(nsresult,
XRE_DeinitCommandLine, ())
class MessageLoop;
XRE_API(void,
XRE_ShutdownChildProcess, ())
XRE_API(MessageLoop*,
XRE_GetIOMessageLoop, ())
XRE_API(bool,
XRE_SendTestShellCommand, (JSContext* aCx,
JSString* aCommand,
void* aCallback))
XRE_API(bool,
XRE_ShutdownTestShell, ())
XRE_API(void,
XRE_InstallX11ErrorHandler, ())
XRE_API(void,
XRE_StartupTimelineRecord, (int aEvent, mozilla::TimeStamp aWhen))
XRE_API(void,
XRE_InitOmnijar, (nsIFile* aGreOmni,
nsIFile* aAppOmni))
XRE_API(void,
XRE_StopLateWriteChecks, (void))
#ifdef MOZ_B2G_LOADER
XRE_API(int,
XRE_ProcLoaderServiceRun, (pid_t, int, int argc, const char* argv[],
mozilla::Vector<int>& aReservedFds));
XRE_API(void,
XRE_ProcLoaderClientInit, (pid_t, int,
mozilla::Vector<int>& aReservedFds));
XRE_API(void,
XRE_ProcLoaderPreload, (const char* aProgramDir,
const nsXREAppData* aAppData));
#endif // MOZ_B2G_LOADER
XRE_API(int,
XRE_XPCShellMain, (int argc, char** argv, char** envp))
#if MOZ_WIDGET_GTK == 2
XRE_API(void,
XRE_GlibInit, ())
#endif
#endif // _nsXULAppAPI_h__