2009-09-10 02:00:14 +04:00
|
|
|
/* -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 8 -*- */
|
2009-08-18 23:05:15 +04:00
|
|
|
/* vim: set sw=4 ts=8 et tw=80 ft=cpp : */
|
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/. */
|
2009-07-11 10:33:10 +04:00
|
|
|
|
2013-11-27 11:59:41 +04:00
|
|
|
include protocol PBackground;
|
2010-07-19 22:33:33 +04:00
|
|
|
include protocol PBrowser;
|
2017-11-01 20:19:38 +03:00
|
|
|
include protocol PClientOpenWindowOp;
|
2017-06-14 18:39:59 +03:00
|
|
|
include protocol PCompositorManager;
|
2015-04-14 04:08:00 +03:00
|
|
|
include protocol PContentPermissionRequest;
|
2014-05-13 21:13:00 +04:00
|
|
|
include protocol PCycleCollectWithLogs;
|
2015-04-22 22:55:23 +03:00
|
|
|
include protocol PPSMContentDownloader;
|
2010-09-16 02:55:08 +04:00
|
|
|
include protocol PExternalHelperApp;
|
2015-08-26 02:42:21 +03:00
|
|
|
include protocol PHandlerService;
|
2014-03-25 22:37:13 +04:00
|
|
|
include protocol PFileDescriptorSet;
|
2011-10-06 02:15:45 +04:00
|
|
|
include protocol PHal;
|
2015-09-22 22:09:42 +03:00
|
|
|
include protocol PHeapSnapshotTempFileHelper;
|
2015-01-17 05:34:47 +03:00
|
|
|
include protocol PProcessHangMonitor;
|
2012-08-29 16:24:48 +04:00
|
|
|
include protocol PImageBridge;
|
Bug 1353629 - PBlob refactoring - part 4 - IPCBlobInputStream, r=smaug
IPCBlobInputStream is a new type of nsIInputStream that is used only in content
process when a Blob is sent from parent to child. This inputStream is for now,
just cloneable.
When the parent process sends a Blob to a content process, it has the Blob and
its inputStream. With its inputStream it creates a IPCBlobInputStreamParent
actor. This actor keeps the inputStream alive for following uses (not part of
this patch).
On the child side we will have, of course, a IPCBlobInputStreamChild actor.
This actor is able to create a IPCBlobInputStream when CreateStream() is
called. This means that 1 IPCBlobInputStreamChild can manage multiple
IPCBlobInputStreams each time one of them is cloned. When the last one of this
stream is released, the child actor sends a __delete__ request to the parent
side; the parent will be deleted, and the original inputStream, on the parent
side, will be released as well.
IPCBlobInputStream is a special inputStream because each method, except for
Available() fails. Basically, this inputStream cannot be used on the content
process for nothing else than knowing the size of the original stream.
In the following patches, I'll introduce an async way to use it.
2017-04-24 13:09:40 +03:00
|
|
|
include protocol PIPCBlobInputStream;
|
2017-12-07 11:32:52 +03:00
|
|
|
include protocol PLoginReputation;
|
2015-06-18 18:46:36 +03:00
|
|
|
include protocol PMedia;
|
2011-10-06 02:15:45 +04:00
|
|
|
include protocol PNecko;
|
2017-09-08 03:28:27 +03:00
|
|
|
include protocol PStreamFilter;
|
2015-02-10 13:49:03 +03:00
|
|
|
include protocol PGMPContent;
|
|
|
|
include protocol PGMPService;
|
2014-10-29 18:05:36 +03:00
|
|
|
include protocol PPluginModule;
|
2015-02-10 13:49:03 +03:00
|
|
|
include protocol PGMP;
|
2014-10-28 18:59:08 +03:00
|
|
|
include protocol PPrinting;
|
2017-03-14 14:28:58 +03:00
|
|
|
include protocol PChildToParentStream;
|
2017-03-14 14:29:43 +03:00
|
|
|
include protocol PParentToChildStream;
|
2014-11-13 03:31:00 +03:00
|
|
|
include protocol POfflineCacheUpdate;
|
2013-04-04 02:13:17 +04:00
|
|
|
include protocol PSpeechSynthesis;
|
2011-10-06 02:15:45 +04:00
|
|
|
include protocol PTestShell;
|
2013-07-03 11:24:32 +04:00
|
|
|
include protocol PJavaScript;
|
2014-07-02 02:24:27 +04:00
|
|
|
include protocol PRemoteSpellcheckEngine;
|
2015-09-21 15:54:00 +03:00
|
|
|
include protocol PWebBrowserPersistDocument;
|
2015-04-22 01:29:18 +03:00
|
|
|
include protocol PWebrtcGlobal;
|
2019-08-08 19:07:05 +03:00
|
|
|
include protocol PWindowGlobal;
|
2015-03-26 06:16:21 +03:00
|
|
|
include protocol PPresentation;
|
2016-11-19 00:54:57 +03:00
|
|
|
include protocol PURLClassifier;
|
2017-04-07 09:15:16 +03:00
|
|
|
include protocol PURLClassifierLocal;
|
2015-09-18 00:23:13 +03:00
|
|
|
include protocol PVRManager;
|
2018-11-14 21:07:28 +03:00
|
|
|
include protocol PRemoteDecoderManager;
|
2017-05-30 22:06:14 +03:00
|
|
|
include protocol PProfiler;
|
2017-05-03 03:17:52 +03:00
|
|
|
include protocol PScriptCache;
|
2019-02-06 08:09:57 +03:00
|
|
|
include protocol PSessionStorageObserver;
|
2019-03-05 17:46:10 +03:00
|
|
|
include protocol PSHEntry;
|
|
|
|
include protocol PSHistory;
|
2019-08-06 12:24:34 +03:00
|
|
|
include protocol PBenchmarkStorage;
|
2012-08-23 23:33:46 +04:00
|
|
|
include DOMTypes;
|
2013-07-11 02:05:39 +04:00
|
|
|
include JavaScriptTypes;
|
2017-04-24 13:16:49 +03:00
|
|
|
include IPCBlob;
|
2019-05-31 18:13:33 +03:00
|
|
|
include IPCStream;
|
2013-07-10 21:07:50 +04:00
|
|
|
include PTabContext;
|
2012-08-23 23:33:46 +04:00
|
|
|
include URIParams;
|
2014-10-29 18:05:36 +03:00
|
|
|
include PluginTypes;
|
2013-06-03 14:14:40 +04:00
|
|
|
include ProtocolTypes;
|
2015-10-02 19:13:52 +03:00
|
|
|
include PBackgroundSharedTypes;
|
2015-04-14 04:08:00 +03:00
|
|
|
include PContentPermission;
|
2016-07-11 17:04:04 +03:00
|
|
|
include ServiceWorkerConfiguration;
|
2015-08-02 23:59:33 +03:00
|
|
|
include GraphicsMessages;
|
2017-01-27 03:35:54 +03:00
|
|
|
include MemoryReportTypes;
|
2017-11-01 20:19:38 +03:00
|
|
|
include ClientIPCTypes;
|
2018-01-11 01:27:18 +03:00
|
|
|
include HangTypes;
|
2019-01-11 21:57:23 +03:00
|
|
|
include PrefsTypes;
|
2019-01-24 00:27:44 +03:00
|
|
|
include NeckoChannelParams;
|
2019-03-05 17:46:10 +03:00
|
|
|
include NewPSHEntry;
|
2009-09-10 02:00:14 +04:00
|
|
|
|
2019-10-14 18:08:47 +03:00
|
|
|
#if defined(MOZ_SANDBOX) && defined(MOZ_DEBUG) && defined(ENABLE_TESTS)
|
|
|
|
include protocol PSandboxTesting;
|
|
|
|
#endif
|
|
|
|
|
Bug 1443954 - Part 3: Add support for RefCounted types to IPDL, r=bz,froydnj,baku
This patch was reviewed in parts, however the intermediate states would not build:
Bug 1443954 - Part 3A: Strip pointers from the argument to WriteParam and WriteIPDLParam before selecting the ParamTraits impl, r=froydnj
Bug 1443954 - Part 3B: Move nsIAlertNotification serialization to the refcounted system, r=bz
Bug 1443954 - Part 3C: Move geolocation serialization to the refcounted system, r=bz
Bug 1443954 - Part 3D: Move nsIInputStream serialization to the refcounted system, r=baku
Bug 1443954 - Part 3E: Move BlobImpl serialization to the refcounted system, r=baku
Bug 1443954 - Part 3F: Correctly implement ParamTraits for actors after the ParamTraits changes, r=froydnj
2018-03-07 04:14:59 +03:00
|
|
|
using refcounted class nsIDOMGeoPosition from "nsGeoPositionIPCSerialiser.h";
|
|
|
|
using refcounted class nsIAlertNotification from "mozilla/AlertNotificationIPCSerializer.h";
|
2010-09-21 08:16:37 +04:00
|
|
|
|
2013-10-01 23:25:07 +04:00
|
|
|
using struct ChromePackage from "mozilla/chrome/RegistryMessageUtils.h";
|
2015-07-17 01:50:07 +03:00
|
|
|
using struct SubstitutionMapping from "mozilla/chrome/RegistryMessageUtils.h";
|
2013-10-01 23:25:07 +04:00
|
|
|
using struct OverrideMapping from "mozilla/chrome/RegistryMessageUtils.h";
|
2014-12-30 02:13:54 +03:00
|
|
|
using base::ProcessId from "base/process.h";
|
2013-10-01 23:25:07 +04:00
|
|
|
using struct IPC::Permission from "mozilla/net/NeckoMessageUtils.h";
|
|
|
|
using class IPC::Principal from "mozilla/dom/PermissionMessageUtils.h";
|
Bug 1303060: Changes to a11y to enable the serving of a COM handler; r=tbsaunde
MozReview-Commit-ID: GTQF3x1pBtX
A general outline of the COM handler (a.k.a. the "smart proxy"):
COM handlers are pieces of code that are loaded by the COM runtime along with
a proxy and are layered above that proxy. This enables the COM handler to
interpose itself between the caller and the proxy, thus providing the
opportunity for the handler to manipulate an interface's method calls before
those calls reach the proxy.
Handlers are regular COM components that live in DLLs and are declared in the
Windows registry. In order to allow for the specifying of a handler (and an
optional payload to be sent with the proxy), the mscom library allows its
clients to specify an implementation of the IHandlerProvider interface.
IHandlerProvider consists of 5 functions:
* GetHandler returns the CLSID of the component that should be loaded into
the COM client's process. If GetHandler returns a failure code, then no
handler is loaded.
* GetHandlerPayloadSize and WriteHandlerPayload are for obtaining the payload
data. These calls are made on a background thread but need to do their work
on the main thread. We declare the payload struct in IDL. MIDL generates two
functions, IA2Payload_Encode and IA2Payload_Decode, which are used by
mscom::StructToStream to read and write that struct to and from buffers.
* The a11y payload struct also includes an interface, IGeckoBackChannel, that
allows the handler to communicate directly with Gecko. IGeckoBackChannel
currently provides two methods: one to allow the handler to request fresh
cache information, and the other to provide Gecko with its IHandlerControl
interface.
* MarshalAs accepts an IID that specifies the interface that is about to be
proxied. We may want to send a more sophisticated proxy than the one that
is requested. The desired IID is returned by this function. In the case of
a11y interfaces, we should always return IAccessible2_3 if we are asked for
one of its parent interfaces. This allows us to eliminate round trips to
resolve more sophisticated interfaces later on.
* NewInstance, which is needed to ensure that all descendent proxies are also
imbued with the same handler code.
The main focus of this patch is as follows:
1. Provide an implementation of the IHandlerProvider interface;
2. Populate the handler payload (ie, the cache) with data;
3. Modify CreateHolderFromAccessible to specify the HandlerPayload object;
4. Receive the IHandlerControl interface from the handler DLL and move it
into the chrome process.
Some more information about IHandlerControl:
There is one IHandlerControl per handler DLL instance. It is the interface that
we call in Gecko when we need to dispatch an event to the handler. In order to
ensure that events are dispatched in the correct order, we need to dispatch
those events from the chrome main thread so that they occur in sequential order
with calls to NotifyWinEvent.
--HG--
extra : rebase_source : acb44dead7cc5488424720e1bf58862b7b30374f
2017-04-05 00:23:55 +03:00
|
|
|
using mozilla::a11y::IHandlerControlHolder from "mozilla/a11y/IPCTypes.h";
|
2013-10-01 23:25:07 +04:00
|
|
|
using mozilla::dom::NativeThreadId from "mozilla/dom/TabMessageUtils.h";
|
|
|
|
using mozilla::hal::ProcessPriority from "mozilla/HalTypes.h";
|
2015-09-23 21:49:05 +03:00
|
|
|
using mozilla::gfx::IntSize from "mozilla/gfx/2D.h";
|
2014-10-29 21:11:00 +03:00
|
|
|
using mozilla::dom::TabId from "mozilla/dom/ipc/IdType.h";
|
2014-10-24 04:28:00 +04:00
|
|
|
using mozilla::dom::ContentParentId from "mozilla/dom/ipc/IdType.h";
|
2016-05-19 00:17:34 +03:00
|
|
|
using mozilla::LayoutDeviceIntPoint from "Units.h";
|
2015-04-22 17:58:15 +03:00
|
|
|
using struct LookAndFeelInt from "mozilla/widget/WidgetMessageUtils.h";
|
2016-08-10 09:18:29 +03:00
|
|
|
using class mozilla::dom::MessagePort from "mozilla/dom/MessagePort.h";
|
|
|
|
using class mozilla::dom::ipc::StructuredCloneData from "mozilla/dom/ipc/StructuredCloneData.h";
|
2015-10-30 22:30:00 +03:00
|
|
|
using mozilla::DataStorageType from "ipc/DataStorageIPCUtils.h";
|
2017-01-12 19:38:48 +03:00
|
|
|
using mozilla::OriginAttributes from "mozilla/ipc/BackgroundUtils.h";
|
2016-03-29 21:32:41 +03:00
|
|
|
using struct mozilla::layers::TextureFactoryIdentifier from "mozilla/layers/CompositorTypes.h";
|
2017-04-10 00:30:27 +03:00
|
|
|
using mozilla::layers::CompositorOptions from "mozilla/layers/CompositorOptions.h";
|
2018-03-25 02:06:01 +03:00
|
|
|
using mozilla::layers::LayersId from "mozilla/layers/LayersTypes.h";
|
2017-09-13 12:20:36 +03:00
|
|
|
using mozilla::Telemetry::HistogramAccumulation from "mozilla/TelemetryComms.h";
|
|
|
|
using mozilla::Telemetry::KeyedHistogramAccumulation from "mozilla/TelemetryComms.h";
|
2017-01-16 07:12:00 +03:00
|
|
|
using mozilla::Telemetry::ScalarAction from "mozilla/TelemetryComms.h";
|
|
|
|
using mozilla::Telemetry::KeyedScalarAction from "mozilla/TelemetryComms.h";
|
2017-08-29 14:05:40 +03:00
|
|
|
using mozilla::Telemetry::DynamicScalarDefinition from "mozilla/TelemetryComms.h";
|
2017-02-14 16:43:51 +03:00
|
|
|
using mozilla::Telemetry::ChildEventData from "mozilla/TelemetryComms.h";
|
2017-06-09 16:53:42 +03:00
|
|
|
using mozilla::Telemetry::DiscardedData from "mozilla/TelemetryComms.h";
|
2017-06-14 11:50:44 +03:00
|
|
|
using mozilla::CrossProcessMutexHandle from "mozilla/ipc/CrossProcessMutex.h";
|
2019-02-14 00:02:55 +03:00
|
|
|
using refcounted class mozilla::dom::BrowsingContext from "mozilla/dom/BrowsingContext.h";
|
2019-02-21 23:14:28 +03:00
|
|
|
using mozilla::dom::BrowsingContextTransaction from "mozilla/dom/BrowsingContext.h";
|
2019-03-14 21:51:09 +03:00
|
|
|
using mozilla::dom::BrowsingContextInitializer from "mozilla/dom/BrowsingContext.h";
|
2019-03-30 03:23:49 +03:00
|
|
|
using base::SharedMemoryHandle from "base/shared_memory.h";
|
2019-04-27 18:37:29 +03:00
|
|
|
using mozilla::ipc::SharedMemoryBasic::Handle from "mozilla/ipc/SharedMemoryBasic.h";
|
|
|
|
using mozilla::fontlist::Pointer from "SharedFontList.h";
|
|
|
|
using gfxSparseBitSet from "gfxFontUtils.h";
|
2019-08-07 04:46:03 +03:00
|
|
|
using mozilla::dom::MediaControlActions from "ipc/MediaControlIPC.h";
|
2009-09-10 02:00:14 +04:00
|
|
|
|
2014-07-26 00:17:36 +04:00
|
|
|
union ChromeRegistryItem
|
|
|
|
{
|
|
|
|
ChromePackage;
|
|
|
|
OverrideMapping;
|
2015-07-17 01:50:07 +03:00
|
|
|
SubstitutionMapping;
|
2014-07-26 00:17:36 +04:00
|
|
|
};
|
|
|
|
|
2009-07-11 10:33:10 +04:00
|
|
|
namespace mozilla {
|
2009-09-10 02:00:14 +04:00
|
|
|
namespace dom {
|
2009-07-11 10:33:10 +04:00
|
|
|
|
2016-11-15 16:58:29 +03:00
|
|
|
// Used on Android/B2G to pass the list of fonts on the device
|
|
|
|
// to the child process
|
2011-01-13 07:04:42 +03:00
|
|
|
struct FontListEntry {
|
2018-09-12 22:34:57 +03:00
|
|
|
nsCString familyName;
|
|
|
|
nsCString faceName;
|
2011-01-13 07:04:42 +03:00
|
|
|
nsCString filepath;
|
2018-04-25 09:18:23 +03:00
|
|
|
uint32_t weightRange;
|
|
|
|
uint32_t stretchRange;
|
|
|
|
uint32_t styleRange;
|
2012-08-22 19:56:38 +04:00
|
|
|
uint8_t index;
|
2011-01-13 07:04:42 +03:00
|
|
|
};
|
|
|
|
|
2016-11-15 16:58:29 +03:00
|
|
|
// Used on Mac OS X to pass the list of font families (not faces)
|
|
|
|
// from chrome to content processes.
|
|
|
|
// The entryType field distinguishes several types of font family
|
|
|
|
// record; see gfxMacPlatformFontList.h for values and meaning.
|
|
|
|
struct FontFamilyListEntry {
|
2018-09-12 22:34:57 +03:00
|
|
|
nsCString familyName;
|
|
|
|
uint8_t entryType;
|
2016-11-15 16:58:29 +03:00
|
|
|
};
|
|
|
|
|
2017-11-02 20:23:16 +03:00
|
|
|
// Used on Linux to pass list of font patterns from chrome to content.
|
|
|
|
struct FontPatternListEntry {
|
|
|
|
nsCString pattern;
|
|
|
|
bool appFontFamily;
|
|
|
|
};
|
|
|
|
|
|
|
|
// Wrap the Font*ListEntry records in a union so the SetXPCOMProcessAttributes
|
|
|
|
// message can pass an array of either type.
|
|
|
|
union SystemFontListEntry {
|
|
|
|
FontFamilyListEntry;
|
|
|
|
FontPatternListEntry;
|
|
|
|
};
|
|
|
|
|
2015-10-30 22:30:00 +03:00
|
|
|
struct DataStorageItem {
|
|
|
|
nsCString key;
|
|
|
|
nsCString value;
|
|
|
|
DataStorageType type;
|
|
|
|
};
|
|
|
|
|
2017-02-25 19:14:04 +03:00
|
|
|
struct DataStorageEntry {
|
|
|
|
DataStorageItem[] items;
|
|
|
|
nsString filename;
|
|
|
|
};
|
|
|
|
|
2014-10-22 13:50:00 +04:00
|
|
|
struct ClipboardCapabilities {
|
|
|
|
bool supportsSelectionClipboard;
|
|
|
|
bool supportsFindClipboard;
|
|
|
|
};
|
|
|
|
|
2015-03-10 12:32:00 +03:00
|
|
|
union FileDescOrError {
|
|
|
|
FileDescriptor;
|
|
|
|
nsresult;
|
|
|
|
};
|
|
|
|
|
2015-03-24 17:29:16 +03:00
|
|
|
struct DomainPolicyClone
|
|
|
|
{
|
|
|
|
bool active;
|
2018-10-31 20:56:43 +03:00
|
|
|
URIParams[] blocklist;
|
|
|
|
URIParams[] allowlist;
|
|
|
|
URIParams[] superBlocklist;
|
|
|
|
URIParams[] superAllowlist;
|
2015-03-24 17:29:16 +03:00
|
|
|
};
|
|
|
|
|
2015-11-04 22:08:14 +03:00
|
|
|
struct AndroidSystemInfo
|
|
|
|
{
|
|
|
|
nsString device;
|
|
|
|
nsString manufacturer;
|
|
|
|
nsString release_version;
|
|
|
|
nsString hardware;
|
|
|
|
uint32_t sdk_version;
|
|
|
|
bool isTablet;
|
|
|
|
};
|
|
|
|
|
2016-07-14 10:04:21 +03:00
|
|
|
struct GetFilesResponseSuccess
|
|
|
|
{
|
2017-04-24 13:16:49 +03:00
|
|
|
IPCBlob[] blobs;
|
2016-07-14 10:04:21 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct GetFilesResponseFailure
|
|
|
|
{
|
|
|
|
nsresult errorCode;
|
|
|
|
};
|
|
|
|
|
|
|
|
union GetFilesResponseResult
|
|
|
|
{
|
|
|
|
GetFilesResponseSuccess;
|
|
|
|
GetFilesResponseFailure;
|
|
|
|
};
|
|
|
|
|
2016-07-17 17:50:50 +03:00
|
|
|
struct BlobURLRegistrationData
|
|
|
|
{
|
2017-11-29 11:40:16 +03:00
|
|
|
nsCString url;
|
|
|
|
IPCBlob blob;
|
|
|
|
Principal principal;
|
|
|
|
bool revoked;
|
2016-07-17 17:50:50 +03:00
|
|
|
};
|
|
|
|
|
2019-02-22 22:28:50 +03:00
|
|
|
struct JSWindowActorEventDecl
|
|
|
|
{
|
|
|
|
nsString name;
|
|
|
|
bool capture;
|
|
|
|
bool systemGroup;
|
|
|
|
bool allowUntrusted;
|
2019-03-07 18:11:32 +03:00
|
|
|
bool? passive;
|
2019-02-22 22:28:50 +03:00
|
|
|
};
|
|
|
|
|
2019-01-28 22:02:02 +03:00
|
|
|
struct JSWindowActorInfo
|
|
|
|
{
|
|
|
|
nsString name;
|
2019-03-01 20:25:44 +03:00
|
|
|
bool allFrames;
|
2019-05-22 19:56:19 +03:00
|
|
|
nsCString? url;
|
2019-02-22 22:28:50 +03:00
|
|
|
|
|
|
|
JSWindowActorEventDecl[] events;
|
2019-03-01 21:24:55 +03:00
|
|
|
nsCString[] observers;
|
2019-03-26 18:19:47 +03:00
|
|
|
nsString[] matches;
|
2019-03-27 17:54:02 +03:00
|
|
|
nsString[] remoteTypes;
|
2019-01-28 22:02:02 +03:00
|
|
|
};
|
|
|
|
|
2016-11-01 06:25:19 +03:00
|
|
|
struct GMPAPITags
|
|
|
|
{
|
|
|
|
nsCString api;
|
|
|
|
nsCString[] tags;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct GMPCapabilityData
|
|
|
|
{
|
|
|
|
nsCString name;
|
|
|
|
nsCString version;
|
|
|
|
GMPAPITags[] capabilities;
|
|
|
|
};
|
|
|
|
|
2017-02-11 02:46:59 +03:00
|
|
|
struct GfxInfoFeatureStatus
|
|
|
|
{
|
|
|
|
int32_t feature;
|
|
|
|
int32_t status;
|
|
|
|
nsCString failureId;
|
|
|
|
};
|
|
|
|
|
2017-02-05 08:52:38 +03:00
|
|
|
struct XPCOMInitData
|
|
|
|
{
|
|
|
|
bool isOffline;
|
|
|
|
bool isConnected;
|
|
|
|
int32_t captivePortalState;
|
|
|
|
bool isLangRTL;
|
|
|
|
bool haveBidiKeyboards;
|
|
|
|
nsString[] dictionaries;
|
|
|
|
ClipboardCapabilities clipboardCaps;
|
|
|
|
DomainPolicyClone domainPolicy;
|
2019-03-06 17:05:50 +03:00
|
|
|
URIParams? userContentSheetURL;
|
2017-06-28 00:04:17 +03:00
|
|
|
GfxVarUpdate[] gfxNonDefaultVarUpdates;
|
2017-06-22 20:45:48 +03:00
|
|
|
ContentDeviceData contentDeviceData;
|
2017-02-11 02:46:59 +03:00
|
|
|
GfxInfoFeatureStatus[] gfxFeatureStatus;
|
2017-02-25 19:14:04 +03:00
|
|
|
DataStorageEntry[] dataStorage;
|
Bug 1348042 - Refactor LocaleService to operate in server-client mode. r=Ehsan,qdot
LocaleService serves two main functions. It is a central place for all code in the
engine to learn about locales, but it also does the language negotiation and selection.
The former is relevant in all processes, but the latter should only be performed
by the "main" process. In case of current Desktop Firefox, the parent process
is the one performing all the language negotiation, and content processes should
operate in the "client" mode.
In Fennec, there's a Java app on top of Gecko which should work as a "server"
and then all processes, including parent process of Gecko is merely a "client" for that.
This refactor finalizes this duality making it easily configurable to define in
which mode a given LocaleService operates.
The server-client model allows all clients to stay in sync with the server,
but operate transparently for all callers just returning the right values.
In order to initialize LocaleService in the client mode in child process with the
right locales I'm adding the list of app locales to the XPCOMInitData,
and then fire LocaleService::SetAppLocales in the child process initialization.
In order to keep the list up to date, I'm adding intl:app-locales-changed to
the list of observed topics, and when triggered, I send the updated list
to the child process, which updates LocaleService::SetAppLocales with the new
list.
MozReview-Commit-ID: K9X6berF3IO
--HG--
extra : rebase_source : ca5e502d064023fddfd63fe6fe5eccefce8dee52
2017-03-26 08:09:45 +03:00
|
|
|
nsCString[] appLocales;
|
|
|
|
nsCString[] requestedLocales;
|
2017-08-29 14:05:40 +03:00
|
|
|
DynamicScalarDefinition[] dynamicScalarDefs;
|
2017-01-17 07:05:46 +03:00
|
|
|
};
|
|
|
|
|
2019-11-04 16:28:58 +03:00
|
|
|
struct VisitedQueryResult
|
|
|
|
{
|
|
|
|
URIParams uri;
|
|
|
|
bool visited;
|
|
|
|
};
|
|
|
|
|
2018-06-30 08:53:12 +03:00
|
|
|
struct StringBundleDescriptor
|
|
|
|
{
|
|
|
|
nsCString bundleURL;
|
|
|
|
FileDescriptor mapFile;
|
|
|
|
uint32_t mapSize;
|
|
|
|
};
|
|
|
|
|
2018-12-14 14:40:17 +03:00
|
|
|
struct IPCURLClassifierFeature
|
|
|
|
{
|
|
|
|
nsCString featureName;
|
|
|
|
nsCString[] tables;
|
|
|
|
nsCString skipHostList;
|
|
|
|
};
|
|
|
|
|
2018-12-18 03:42:53 +03:00
|
|
|
// Transport structure for Notifications API notifications
|
|
|
|
// (https://developer.mozilla.org/en-US/docs/Web/API/notification) instances
|
|
|
|
// used exclusively by the NotificationEvent PContent method.
|
|
|
|
struct NotificationEventData
|
|
|
|
{
|
|
|
|
nsCString originSuffix;
|
|
|
|
nsCString scope;
|
|
|
|
nsString ID;
|
|
|
|
nsString title;
|
|
|
|
nsString dir;
|
|
|
|
nsString lang;
|
|
|
|
nsString body;
|
|
|
|
nsString tag;
|
|
|
|
nsString icon;
|
|
|
|
nsString data;
|
|
|
|
nsString behavior;
|
|
|
|
};
|
|
|
|
|
2019-01-02 16:29:18 +03:00
|
|
|
struct PostMessageData
|
|
|
|
{
|
2019-02-14 00:02:55 +03:00
|
|
|
BrowsingContext source;
|
2019-01-02 16:29:18 +03:00
|
|
|
nsString origin;
|
|
|
|
nsString targetOrigin;
|
|
|
|
nsIURI targetOriginURI;
|
|
|
|
nsIPrincipal callerPrincipal;
|
|
|
|
nsIPrincipal subjectPrincipal;
|
|
|
|
nsIURI callerDocumentURI;
|
|
|
|
bool isFromPrivateWindow;
|
|
|
|
};
|
|
|
|
|
2017-01-16 18:51:43 +03:00
|
|
|
/**
|
|
|
|
* The PContent protocol is a top-level protocol between the UI process
|
|
|
|
* and a content process. There is exactly one PContentParent/PContentChild pair
|
|
|
|
* for each content process.
|
|
|
|
*/
|
2016-10-01 02:20:50 +03:00
|
|
|
nested(upto inside_cpow) sync protocol PContent
|
2009-07-11 10:33:10 +04:00
|
|
|
{
|
2010-07-19 22:33:33 +04:00
|
|
|
manages PBrowser;
|
2017-11-01 20:19:38 +03:00
|
|
|
manages PClientOpenWindowOp;
|
2015-04-14 04:08:00 +03:00
|
|
|
manages PContentPermissionRequest;
|
2014-05-13 21:13:00 +04:00
|
|
|
manages PCycleCollectWithLogs;
|
2015-04-22 22:55:23 +03:00
|
|
|
manages PPSMContentDownloader;
|
2010-09-16 02:55:08 +04:00
|
|
|
manages PExternalHelperApp;
|
2014-03-25 22:37:13 +04:00
|
|
|
manages PFileDescriptorSet;
|
2011-10-06 02:15:45 +04:00
|
|
|
manages PHal;
|
2015-08-26 02:42:21 +03:00
|
|
|
manages PHandlerService;
|
2015-09-22 22:09:42 +03:00
|
|
|
manages PHeapSnapshotTempFileHelper;
|
Bug 1353629 - PBlob refactoring - part 4 - IPCBlobInputStream, r=smaug
IPCBlobInputStream is a new type of nsIInputStream that is used only in content
process when a Blob is sent from parent to child. This inputStream is for now,
just cloneable.
When the parent process sends a Blob to a content process, it has the Blob and
its inputStream. With its inputStream it creates a IPCBlobInputStreamParent
actor. This actor keeps the inputStream alive for following uses (not part of
this patch).
On the child side we will have, of course, a IPCBlobInputStreamChild actor.
This actor is able to create a IPCBlobInputStream when CreateStream() is
called. This means that 1 IPCBlobInputStreamChild can manage multiple
IPCBlobInputStreams each time one of them is cloned. When the last one of this
stream is released, the child actor sends a __delete__ request to the parent
side; the parent will be deleted, and the original inputStream, on the parent
side, will be released as well.
IPCBlobInputStream is a special inputStream because each method, except for
Available() fails. Basically, this inputStream cannot be used on the content
process for nothing else than knowing the size of the original stream.
In the following patches, I'll introduce an async way to use it.
2017-04-24 13:09:40 +03:00
|
|
|
manages PIPCBlobInputStream;
|
2015-06-18 18:46:36 +03:00
|
|
|
manages PMedia;
|
2011-10-06 02:15:45 +04:00
|
|
|
manages PNecko;
|
2014-11-13 03:31:00 +03:00
|
|
|
manages POfflineCacheUpdate;
|
2014-10-28 18:59:08 +03:00
|
|
|
manages PPrinting;
|
2017-03-14 14:28:58 +03:00
|
|
|
manages PChildToParentStream;
|
2017-03-14 14:29:43 +03:00
|
|
|
manages PParentToChildStream;
|
2013-04-04 02:13:17 +04:00
|
|
|
manages PSpeechSynthesis;
|
2011-10-06 02:15:45 +04:00
|
|
|
manages PTestShell;
|
2013-07-03 11:24:32 +04:00
|
|
|
manages PJavaScript;
|
2014-07-02 02:24:27 +04:00
|
|
|
manages PRemoteSpellcheckEngine;
|
2015-09-21 15:54:00 +03:00
|
|
|
manages PWebBrowserPersistDocument;
|
2015-04-22 01:29:18 +03:00
|
|
|
manages PWebrtcGlobal;
|
2015-03-26 06:16:21 +03:00
|
|
|
manages PPresentation;
|
2016-11-19 00:54:57 +03:00
|
|
|
manages PURLClassifier;
|
2017-04-07 09:15:16 +03:00
|
|
|
manages PURLClassifierLocal;
|
2017-05-03 03:17:52 +03:00
|
|
|
manages PScriptCache;
|
2017-12-07 11:32:52 +03:00
|
|
|
manages PLoginReputation;
|
2019-02-06 08:09:57 +03:00
|
|
|
manages PSessionStorageObserver;
|
2019-03-05 17:46:10 +03:00
|
|
|
manages PSHEntry;
|
|
|
|
manages PSHistory;
|
2019-08-06 12:24:34 +03:00
|
|
|
manages PBenchmarkStorage;
|
2009-08-26 03:07:22 +04:00
|
|
|
|
2012-06-13 02:01:25 +04:00
|
|
|
// Depending on exactly how the new browser is being created, it might be
|
|
|
|
// created from either the child or parent process!
|
|
|
|
//
|
|
|
|
// The child creates the PBrowser as part of
|
2019-04-10 01:39:01 +03:00
|
|
|
// BrowserChild::BrowserFrameProvideWindow (which happens when the child's
|
Bug 802366 - The main event: Let a browser process inherit its app's id. r=bz,cjones
The main bug fixed here is that in half of our interfaces, we use "is browser frame/element" to mean "browser or app", and in the other half, we use it to mean "is browser not app".
There's a related, functional bug also fixed here, which is that a browser process doesn't inherit its parent's app-id. This causes problems e.g. for IndexedDB: If a browser inside an app uses IndexedDB, the DB should have the app's app-id.
I also modified Tab{Parent,Child} and nsFrameLoader to call "app" "ownOrContainingApp", to emphasize that we might have inherited the app from a parent process. I left nsIDocShell::appId alone, because changing that would have necessitated changing nsILoadGroup and therefore a /lot/ of users in Necko; it's also not clear it would have clarified anything in those cases.
2012-11-10 22:32:37 +04:00
|
|
|
// content calls window.open()), and the parent creates the PBrowser as part
|
2016-10-15 04:46:26 +03:00
|
|
|
// of ContentParent::CreateBrowser.
|
Bug 802366 - The main event: Let a browser process inherit its app's id. r=bz,cjones
The main bug fixed here is that in half of our interfaces, we use "is browser frame/element" to mean "browser or app", and in the other half, we use it to mean "is browser not app".
There's a related, functional bug also fixed here, which is that a browser process doesn't inherit its parent's app-id. This causes problems e.g. for IndexedDB: If a browser inside an app uses IndexedDB, the DB should have the app's app-id.
I also modified Tab{Parent,Child} and nsFrameLoader to call "app" "ownOrContainingApp", to emphasize that we might have inherited the app from a parent process. I left nsIDocShell::appId alone, because changing that would have necessitated changing nsILoadGroup and therefore a /lot/ of users in Necko; it's also not clear it would have clarified anything in those cases.
2012-11-10 22:32:37 +04:00
|
|
|
//
|
2016-10-15 04:46:26 +03:00
|
|
|
// When the parent constructs a PBrowser, the child trusts the attributes it
|
|
|
|
// receives from the parent. In that case, the context should be
|
|
|
|
// FrameIPCTabContext.
|
Bug 802366 - The main event: Let a browser process inherit its app's id. r=bz,cjones
The main bug fixed here is that in half of our interfaces, we use "is browser frame/element" to mean "browser or app", and in the other half, we use it to mean "is browser not app".
There's a related, functional bug also fixed here, which is that a browser process doesn't inherit its parent's app-id. This causes problems e.g. for IndexedDB: If a browser inside an app uses IndexedDB, the DB should have the app's app-id.
I also modified Tab{Parent,Child} and nsFrameLoader to call "app" "ownOrContainingApp", to emphasize that we might have inherited the app from a parent process. I left nsIDocShell::appId alone, because changing that would have necessitated changing nsILoadGroup and therefore a /lot/ of users in Necko; it's also not clear it would have clarified anything in those cases.
2012-11-10 22:32:37 +04:00
|
|
|
//
|
2016-10-15 04:46:26 +03:00
|
|
|
// When the child constructs a PBrowser, the parent doesn't trust the
|
|
|
|
// attributes it receives from the child. In this case, context must have
|
|
|
|
// type PopupIPCTabContext. The parent checks that if the opener is a
|
|
|
|
// browser element, the context is also for a browser element.
|
2014-06-04 01:15:27 +04:00
|
|
|
//
|
2017-04-07 02:46:18 +03:00
|
|
|
// If |sameTabGroupAs| is non-zero, the new tab should go in the same
|
|
|
|
// TabGroup as |sameTabGroupAs|. This parameter should always be zero
|
|
|
|
// for PBrowser messages sent from the child to the parent.
|
|
|
|
//
|
2019-04-17 03:51:38 +03:00
|
|
|
// Separate messages are used for the parent and child side constructors due
|
|
|
|
// to the differences in data and actor setup required.
|
|
|
|
//
|
2014-06-04 01:15:27 +04:00
|
|
|
// Keep the last 3 attributes in sync with GetProcessAttributes!
|
2019-04-17 03:51:38 +03:00
|
|
|
parent:
|
|
|
|
async ConstructPopupBrowser(ManagedEndpoint<PBrowserParent> browserEp,
|
2019-08-08 19:07:07 +03:00
|
|
|
ManagedEndpoint<PWindowGlobalParent> windowEp,
|
2019-04-17 03:51:38 +03:00
|
|
|
TabId tabId, IPCTabContext context,
|
2019-08-08 19:07:07 +03:00
|
|
|
WindowGlobalInit windowInit,
|
2019-04-17 03:51:38 +03:00
|
|
|
uint32_t chromeFlags);
|
|
|
|
|
|
|
|
child:
|
|
|
|
async ConstructBrowser(ManagedEndpoint<PBrowserChild> browserEp,
|
2019-08-08 19:07:05 +03:00
|
|
|
ManagedEndpoint<PWindowGlobalChild> windowEp,
|
2019-04-17 03:51:38 +03:00
|
|
|
TabId tabId, TabId sameTabGroupAs,
|
|
|
|
IPCTabContext context,
|
2019-08-08 19:07:05 +03:00
|
|
|
WindowGlobalInit windowInit,
|
2019-04-17 03:51:38 +03:00
|
|
|
uint32_t chromeFlags, ContentParentId cpId,
|
2019-05-29 19:35:37 +03:00
|
|
|
bool isForBrowser, bool isTopLevel);
|
2009-08-26 03:07:22 +04:00
|
|
|
|
2019-04-17 03:51:38 +03:00
|
|
|
both:
|
2016-01-27 00:51:53 +03:00
|
|
|
async PFileDescriptorSet(FileDescriptor fd);
|
2014-03-25 22:37:28 +04:00
|
|
|
|
2015-09-21 15:54:00 +03:00
|
|
|
// For parent->child, aBrowser must be non-null; aOuterWindowID can
|
|
|
|
// be 0 to indicate the browser's current root document, or nonzero
|
|
|
|
// to persist a subdocument. For child->parent, arguments are
|
|
|
|
// ignored and should be null/zero.
|
2016-01-27 00:51:53 +03:00
|
|
|
async PWebBrowserPersistDocument(nullable PBrowser aBrowser,
|
|
|
|
uint64_t aOuterWindowID);
|
2015-09-21 15:54:00 +03:00
|
|
|
|
2012-06-13 02:01:25 +04:00
|
|
|
child:
|
2017-01-05 23:55:57 +03:00
|
|
|
async InitGMPService(Endpoint<PGMPServiceChild> service);
|
2017-01-05 23:54:52 +03:00
|
|
|
async InitProcessHangMonitor(Endpoint<PProcessHangMonitorChild> hangMonitor);
|
2017-05-30 22:06:14 +03:00
|
|
|
async InitProfiler(Endpoint<PProfilerChild> aEndpoint);
|
2017-01-05 23:54:52 +03:00
|
|
|
|
2016-07-20 10:18:30 +03:00
|
|
|
// Give the content process its endpoints to the compositor.
|
2016-09-20 11:15:49 +03:00
|
|
|
async InitRendering(
|
2017-06-14 18:39:59 +03:00
|
|
|
Endpoint<PCompositorManagerChild> compositor,
|
2016-09-20 11:15:49 +03:00
|
|
|
Endpoint<PImageBridgeChild> imageBridge,
|
2016-11-08 05:21:35 +03:00
|
|
|
Endpoint<PVRManagerChild> vr,
|
2019-06-11 05:01:34 +03:00
|
|
|
Endpoint<PRemoteDecoderManagerChild> video,
|
2017-04-14 11:06:09 +03:00
|
|
|
uint32_t[] namespaces);
|
2016-07-18 07:24:28 +03:00
|
|
|
|
2016-09-20 11:18:50 +03:00
|
|
|
// Re-create the rendering stack using the given endpoints. This is sent
|
|
|
|
// after the compositor process has crashed. The new endpoints may be to a
|
|
|
|
// newly launched GPU process, or the compositor thread of the UI process.
|
|
|
|
async ReinitRendering(
|
2017-06-14 18:39:59 +03:00
|
|
|
Endpoint<PCompositorManagerChild> compositor,
|
2016-09-20 11:18:50 +03:00
|
|
|
Endpoint<PImageBridgeChild> bridge,
|
2016-11-08 05:21:35 +03:00
|
|
|
Endpoint<PVRManagerChild> vr,
|
2019-06-11 05:01:34 +03:00
|
|
|
Endpoint<PRemoteDecoderManagerChild> video,
|
2017-04-14 11:06:09 +03:00
|
|
|
uint32_t[] namespaces);
|
2016-09-20 11:18:50 +03:00
|
|
|
|
2017-07-18 05:42:59 +03:00
|
|
|
async AudioDefaultDeviceChange();
|
2019-05-07 01:41:25 +03:00
|
|
|
|
|
|
|
async NetworkLinkTypeChange(uint32_t type);
|
2017-07-18 05:42:59 +03:00
|
|
|
|
2017-05-12 08:44:27 +03:00
|
|
|
// Re-create the rendering stack for a device reset.
|
|
|
|
async ReinitRenderingForDeviceReset();
|
|
|
|
|
2013-01-18 00:06:36 +04:00
|
|
|
/**
|
2014-03-13 02:48:15 +04:00
|
|
|
* Enable system-level sandboxing features, if available. Can
|
|
|
|
* usually only be performed zero or one times. The child may
|
|
|
|
* abnormally exit if this fails; the details are OS-specific.
|
2013-01-18 00:06:36 +04:00
|
|
|
*/
|
2019-03-01 00:20:40 +03:00
|
|
|
async SetProcessSandbox(FileDescriptor? aBroker);
|
2013-01-18 00:06:36 +04:00
|
|
|
|
2017-01-27 03:35:54 +03:00
|
|
|
async RequestMemoryReport(uint32_t generation,
|
|
|
|
bool anonymize,
|
|
|
|
bool minimizeMemoryUsage,
|
2019-03-01 00:20:40 +03:00
|
|
|
FileDescriptor? DMDFile);
|
2018-07-05 17:32:03 +03:00
|
|
|
async RequestPerformanceMetrics(nsID aID);
|
2011-02-16 21:43:23 +03:00
|
|
|
|
2015-04-11 01:18:05 +03:00
|
|
|
/**
|
|
|
|
* Communication between the PuppetBidiKeyboard and the actual
|
|
|
|
* BidiKeyboard hosted by the parent
|
|
|
|
*/
|
2016-06-03 12:56:04 +03:00
|
|
|
async BidiKeyboardNotify(bool isLangRTL, bool haveBidiKeyboards);
|
2015-04-11 01:18:05 +03:00
|
|
|
|
2012-10-16 06:12:14 +04:00
|
|
|
/**
|
2014-05-13 21:13:00 +04:00
|
|
|
* Dump this process's GC and CC logs to the provided files.
|
2012-10-16 06:12:14 +04:00
|
|
|
*
|
2014-05-13 21:13:00 +04:00
|
|
|
* For documentation on the other args, see dumpGCAndCCLogsToFile in
|
2014-03-05 06:27:13 +04:00
|
|
|
* nsIMemoryInfoDumper.idl
|
2012-10-16 06:12:14 +04:00
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async PCycleCollectWithLogs(bool dumpAllTraces,
|
|
|
|
FileDescriptor gcLog,
|
|
|
|
FileDescriptor ccLog);
|
2012-10-16 06:12:14 +04:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async PTestShell();
|
2009-08-26 03:07:22 +04:00
|
|
|
|
2017-05-03 03:17:52 +03:00
|
|
|
async PScriptCache(FileDescOrError cacheFile, bool wantCacheData);
|
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async RegisterChrome(ChromePackage[] packages, SubstitutionMapping[] substitutions,
|
|
|
|
OverrideMapping[] overrides, nsCString locale, bool reset);
|
|
|
|
async RegisterChromeItem(ChromeRegistryItem item);
|
2010-03-11 08:33:00 +03:00
|
|
|
|
2016-06-07 01:23:43 +03:00
|
|
|
async ClearImageCache(bool privateLoader, bool chrome);
|
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
async SetOffline(bool offline);
|
2015-05-02 00:14:39 +03:00
|
|
|
async SetConnectivity(bool connectivity);
|
2016-11-17 19:35:24 +03:00
|
|
|
async SetCaptivePortalState(int32_t aState);
|
2010-05-11 16:44:12 +04:00
|
|
|
|
2019-11-04 16:28:58 +03:00
|
|
|
async NotifyVisited(VisitedQueryResult[] uri);
|
2010-07-02 19:50:41 +04:00
|
|
|
|
2017-11-22 13:21:19 +03:00
|
|
|
async PreferenceUpdate(Pref pref);
|
2016-08-04 21:33:42 +03:00
|
|
|
async VarUpdate(GfxVarUpdate var);
|
2010-05-26 04:13:47 +04:00
|
|
|
|
2019-05-21 22:01:31 +03:00
|
|
|
async UpdatePerfStatsCollectionMask(uint64_t aMask);
|
|
|
|
async CollectPerfStatsJSON() returns (nsCString aStats);
|
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async DataStoragePut(nsString aFilename, DataStorageItem aItem);
|
|
|
|
async DataStorageRemove(nsString aFilename, nsCString aKey, DataStorageType aType);
|
|
|
|
async DataStorageClear(nsString aFilename);
|
2015-10-30 22:30:00 +03:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async NotifyAlertsObserver(nsCString topic, nsString data);
|
2010-09-15 20:44:57 +04:00
|
|
|
|
Bug 1443954 - Part 3: Add support for RefCounted types to IPDL, r=bz,froydnj,baku
This patch was reviewed in parts, however the intermediate states would not build:
Bug 1443954 - Part 3A: Strip pointers from the argument to WriteParam and WriteIPDLParam before selecting the ParamTraits impl, r=froydnj
Bug 1443954 - Part 3B: Move nsIAlertNotification serialization to the refcounted system, r=bz
Bug 1443954 - Part 3C: Move geolocation serialization to the refcounted system, r=bz
Bug 1443954 - Part 3D: Move nsIInputStream serialization to the refcounted system, r=baku
Bug 1443954 - Part 3E: Move BlobImpl serialization to the refcounted system, r=baku
Bug 1443954 - Part 3F: Correctly implement ParamTraits for actors after the ParamTraits changes, r=froydnj
2018-03-07 04:14:59 +03:00
|
|
|
async GeolocationUpdate(nsIDOMGeoPosition aPosition);
|
2010-09-21 08:16:37 +04:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async GeolocationError(uint16_t errorCode);
|
2014-10-23 22:31:00 +04:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async UpdateDictionaryList(nsString[] dictionaries);
|
2014-10-03 18:52:37 +04:00
|
|
|
|
2017-11-02 23:29:33 +03:00
|
|
|
async UpdateFontList(SystemFontListEntry[] fontList);
|
|
|
|
|
2019-04-27 18:37:58 +03:00
|
|
|
/**
|
|
|
|
* The shared font list has been reinitialized by the parent;
|
|
|
|
* child processes must discard and recreate their mappings to it.
|
|
|
|
*/
|
|
|
|
async RebuildFontList();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The shared font list has been modified, potentially adding matches
|
|
|
|
* for src:local() names that were previously not known, so content
|
|
|
|
* may need to be reflowed.
|
|
|
|
*/
|
|
|
|
async FontListChanged();
|
|
|
|
|
Bug 1348042 - Refactor LocaleService to operate in server-client mode. r=Ehsan,qdot
LocaleService serves two main functions. It is a central place for all code in the
engine to learn about locales, but it also does the language negotiation and selection.
The former is relevant in all processes, but the latter should only be performed
by the "main" process. In case of current Desktop Firefox, the parent process
is the one performing all the language negotiation, and content processes should
operate in the "client" mode.
In Fennec, there's a Java app on top of Gecko which should work as a "server"
and then all processes, including parent process of Gecko is merely a "client" for that.
This refactor finalizes this duality making it easily configurable to define in
which mode a given LocaleService operates.
The server-client model allows all clients to stay in sync with the server,
but operate transparently for all callers just returning the right values.
In order to initialize LocaleService in the client mode in child process with the
right locales I'm adding the list of app locales to the XPCOMInitData,
and then fire LocaleService::SetAppLocales in the child process initialization.
In order to keep the list up to date, I'm adding intl:app-locales-changed to
the list of observed topics, and when triggered, I send the updated list
to the child process, which updates LocaleService::SetAppLocales with the new
list.
MozReview-Commit-ID: K9X6berF3IO
--HG--
extra : rebase_source : ca5e502d064023fddfd63fe6fe5eccefce8dee52
2017-03-26 08:09:45 +03:00
|
|
|
async UpdateAppLocales(nsCString[] appLocales);
|
|
|
|
async UpdateRequestedLocales(nsCString[] requestedLocales);
|
|
|
|
|
2018-06-30 08:53:12 +03:00
|
|
|
async RegisterStringBundles(StringBundleDescriptor[] stringBundles);
|
|
|
|
|
2018-06-23 06:35:49 +03:00
|
|
|
async UpdateSharedData(FileDescriptor mapFile, uint32_t aSize,
|
2018-06-28 02:35:53 +03:00
|
|
|
IPCBlob[] blobs,
|
2018-06-23 06:35:49 +03:00
|
|
|
nsCString[] changedKeys);
|
|
|
|
|
2010-10-09 22:07:38 +04:00
|
|
|
// nsIPermissionManager messages
|
2016-01-27 00:51:53 +03:00
|
|
|
async AddPermission(Permission permission);
|
2018-07-10 11:09:59 +03:00
|
|
|
async RemoveAllPermissions();
|
2010-10-09 22:07:38 +04:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async FlushMemory(nsString reason);
|
2010-12-12 01:36:08 +03:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async GarbageCollect();
|
|
|
|
async CycleCollect();
|
2018-01-12 01:14:09 +03:00
|
|
|
async UnlinkGhosts();
|
2014-10-03 18:52:37 +04:00
|
|
|
|
2011-07-21 08:37:32 +04:00
|
|
|
/**
|
|
|
|
* Start accessibility engine in content process.
|
2017-06-07 02:35:51 +03:00
|
|
|
* @param aTid is the thread ID of the chrome process main thread. Only used
|
|
|
|
* on Windows; pass 0 on other platforms.
|
2016-10-20 21:34:16 +03:00
|
|
|
* @param aMsaaID is an a11y-specific unique id for the content process
|
|
|
|
* that is generated by the chrome process. Only used on
|
|
|
|
* Windows; pass 0 on other platforms.
|
2011-07-21 08:37:32 +04:00
|
|
|
*/
|
2017-06-07 02:35:51 +03:00
|
|
|
async ActivateA11y(uint32_t aMainChromeTid, uint32_t aMsaaID);
|
2011-07-21 08:37:32 +04:00
|
|
|
|
2016-08-29 18:06:48 +03:00
|
|
|
/**
|
|
|
|
* Shutdown accessibility engine in content process (if not in use).
|
|
|
|
*/
|
|
|
|
async ShutdownA11y();
|
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async AppInfo(nsCString version, nsCString buildID, nsCString name, nsCString UAName,
|
2018-05-16 02:44:44 +03:00
|
|
|
nsCString ID, nsCString vendor, nsCString sourceURL);
|
2011-10-05 00:31:00 +04:00
|
|
|
|
2016-11-24 18:08:31 +03:00
|
|
|
/**
|
|
|
|
* Send the remote type associated with the content process.
|
|
|
|
*/
|
|
|
|
async RemoteType(nsString aRemoteType);
|
|
|
|
|
2016-07-13 11:34:24 +03:00
|
|
|
/**
|
|
|
|
* Send ServiceWorkerRegistrationData to child process.
|
|
|
|
*/
|
|
|
|
async InitServiceWorkers(ServiceWorkerConfiguration aConfig);
|
|
|
|
|
2016-07-17 17:50:50 +03:00
|
|
|
/**
|
|
|
|
* Send BlobURLRegistrationData to child process.
|
|
|
|
*/
|
|
|
|
async InitBlobURLs(BlobURLRegistrationData[] registrations);
|
|
|
|
|
2019-01-28 22:02:02 +03:00
|
|
|
/**
|
|
|
|
* Send JSWindowActorInfos to child process.
|
|
|
|
*/
|
|
|
|
async InitJSWindowActorInfos(JSWindowActorInfo[] aInfos);
|
|
|
|
|
2019-02-22 18:17:01 +03:00
|
|
|
/**
|
|
|
|
* Unregister a previously registered JSWindowActor in the child process.
|
|
|
|
*/
|
|
|
|
async UnregisterJSWindowActor(nsString name);
|
|
|
|
|
2017-09-15 00:15:27 +03:00
|
|
|
async SetXPCOMProcessAttributes(XPCOMInitData xpcomInit,
|
|
|
|
StructuredCloneData initialData,
|
|
|
|
LookAndFeelInt[] lookAndFeelIntCache,
|
2017-11-02 23:29:33 +03:00
|
|
|
/* used on MacOSX and Linux only: */
|
2019-03-30 03:23:49 +03:00
|
|
|
SystemFontListEntry[] systemFontList,
|
|
|
|
SharedMemoryHandle? sharedUASheetHandle,
|
|
|
|
uintptr_t sharedUASheetAddress);
|
2017-02-05 08:52:38 +03:00
|
|
|
|
2012-04-20 04:13:20 +04:00
|
|
|
// Notify child that last-pb-context-exited notification was observed
|
2016-01-27 00:51:53 +03:00
|
|
|
async LastPrivateDocShellDestroyed();
|
2012-04-20 04:13:20 +04:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async NotifyProcessPriorityChanged(ProcessPriority priority);
|
|
|
|
async MinimizeMemoryUsage();
|
2013-04-26 04:53:26 +04:00
|
|
|
|
2013-08-27 21:10:39 +04:00
|
|
|
/**
|
|
|
|
* Used to manage nsIStyleSheetService across processes.
|
|
|
|
*/
|
|
|
|
async LoadAndRegisterSheet(URIParams uri, uint32_t type);
|
|
|
|
async UnregisterSheet(URIParams uri, uint32_t type);
|
|
|
|
|
2013-12-13 20:28:46 +04:00
|
|
|
/**
|
|
|
|
* Notify idle observers in the child
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async NotifyIdleObserver(uint64_t observerId, nsCString topic, nsString str);
|
2014-08-29 04:20:27 +04:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async InvokeDragSession(IPCDataTransfer[] transfers, uint32_t action);
|
2015-04-08 21:48:11 +03:00
|
|
|
|
2016-05-19 00:17:34 +03:00
|
|
|
async EndDragSession(bool aDoneDrag, bool aUserCancelled,
|
2017-02-17 06:29:42 +03:00
|
|
|
LayoutDeviceIntPoint aDragEndPoint,
|
|
|
|
uint32_t aKeyModifiers);
|
2015-01-10 21:18:59 +03:00
|
|
|
|
2019-03-06 17:05:50 +03:00
|
|
|
async DomainSetChanged(uint32_t aSetType, uint32_t aChangeType, URIParams? aDomain);
|
2015-03-24 17:29:16 +03:00
|
|
|
|
2015-01-10 21:18:59 +03:00
|
|
|
/**
|
|
|
|
* Notify the child to shutdown. The child will in turn call FinishShutdown
|
|
|
|
* and let the parent close the channel.
|
|
|
|
*/
|
|
|
|
async Shutdown();
|
|
|
|
|
2015-02-20 04:13:02 +03:00
|
|
|
async LoadProcessScript(nsString url);
|
|
|
|
|
2015-04-07 16:17:27 +03:00
|
|
|
/**
|
|
|
|
* Requests a full native update of a native plugin child window. This is
|
|
|
|
* a Windows specific call.
|
|
|
|
*/
|
|
|
|
async UpdateWindow(uintptr_t aChildId);
|
|
|
|
|
2015-03-26 06:16:21 +03:00
|
|
|
/**
|
|
|
|
* Notify the child that presentation receiver has been launched with the
|
|
|
|
* correspondent iframe.
|
|
|
|
*/
|
|
|
|
async NotifyPresentationReceiverLaunched(PBrowser aIframe, nsString aSessionId);
|
|
|
|
|
2015-08-31 08:24:35 +03:00
|
|
|
/**
|
|
|
|
* Notify the child that the info about a presentation receiver needs to be
|
|
|
|
* cleaned up.
|
|
|
|
*/
|
|
|
|
async NotifyPresentationReceiverCleanUp(nsString aSessionId);
|
|
|
|
|
2016-08-08 06:04:55 +03:00
|
|
|
/**
|
|
|
|
* Notify the child that cache is emptied.
|
|
|
|
*/
|
|
|
|
async NotifyEmptyHTTPCache();
|
|
|
|
|
2016-01-14 08:19:51 +03:00
|
|
|
/**
|
|
|
|
* Send a `push` event without data to a service worker in the child.
|
|
|
|
*/
|
2016-03-28 21:50:39 +03:00
|
|
|
async Push(nsCString scope, Principal principal, nsString messageId);
|
2016-01-14 08:19:51 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Send a `push` event with data to a service worker in the child.
|
|
|
|
*/
|
2016-03-28 21:50:39 +03:00
|
|
|
async PushWithData(nsCString scope, Principal principal,
|
|
|
|
nsString messageId, uint8_t[] data);
|
2016-01-14 08:19:51 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Send a `pushsubscriptionchange` event to a service worker in the child.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async PushSubscriptionChange(nsCString scope, Principal principal);
|
2016-01-14 08:19:51 +03:00
|
|
|
|
2016-03-13 16:25:23 +03:00
|
|
|
/**
|
|
|
|
* Windows specific: associate this content process with the browsers
|
|
|
|
* audio session.
|
|
|
|
*/
|
|
|
|
async SetAudioSessionData(nsID aID,
|
|
|
|
nsString aDisplayName,
|
|
|
|
nsString aIconPath);
|
2016-07-14 10:04:21 +03:00
|
|
|
|
|
|
|
async GetFilesResponse(nsID aID, GetFilesResponseResult aResult);
|
|
|
|
|
2017-04-24 13:16:49 +03:00
|
|
|
async BlobURLRegistration(nsCString aURI, IPCBlob aBlob,
|
2016-07-17 17:50:50 +03:00
|
|
|
Principal aPrincipal);
|
|
|
|
|
|
|
|
async BlobURLUnregistration(nsCString aURI);
|
|
|
|
|
2016-11-01 06:25:19 +03:00
|
|
|
async GMPsChanged(GMPCapabilityData[] capabilities);
|
|
|
|
|
2017-01-21 07:11:35 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sending an activate message moves focus to the child.
|
|
|
|
*/
|
|
|
|
async Activate(PBrowser aTab);
|
|
|
|
|
|
|
|
async Deactivate(PBrowser aTab);
|
|
|
|
|
2017-03-14 14:29:43 +03:00
|
|
|
async PParentToChildStream();
|
|
|
|
|
2017-03-14 02:06:04 +03:00
|
|
|
async ProvideAnonymousTemporaryFile(uint64_t aID, FileDescOrError aFD);
|
|
|
|
|
2017-03-03 00:53:33 +03:00
|
|
|
async SetPermissionsWithKey(nsCString aPermissionKey, Permission[] aPermissions);
|
|
|
|
|
2017-03-09 14:30:26 +03:00
|
|
|
async RefreshScreens(ScreenDetails[] aScreens);
|
|
|
|
|
Bug 1353629 - PBlob refactoring - part 4 - IPCBlobInputStream, r=smaug
IPCBlobInputStream is a new type of nsIInputStream that is used only in content
process when a Blob is sent from parent to child. This inputStream is for now,
just cloneable.
When the parent process sends a Blob to a content process, it has the Blob and
its inputStream. With its inputStream it creates a IPCBlobInputStreamParent
actor. This actor keeps the inputStream alive for following uses (not part of
this patch).
On the child side we will have, of course, a IPCBlobInputStreamChild actor.
This actor is able to create a IPCBlobInputStream when CreateStream() is
called. This means that 1 IPCBlobInputStreamChild can manage multiple
IPCBlobInputStreams each time one of them is cloned. When the last one of this
stream is released, the child actor sends a __delete__ request to the parent
side; the parent will be deleted, and the original inputStream, on the parent
side, will be released as well.
IPCBlobInputStream is a special inputStream because each method, except for
Available() fails. Basically, this inputStream cannot be used on the content
process for nothing else than knowing the size of the original stream.
In the following patches, I'll introduce an async way to use it.
2017-04-24 13:09:40 +03:00
|
|
|
async PIPCBlobInputStream(nsID aID, uint64_t aSize);
|
|
|
|
|
2017-06-06 20:39:46 +03:00
|
|
|
/**
|
|
|
|
* This call takes the set of plugins loaded in the chrome process, and
|
|
|
|
* sends them to the content process. However, in many cases this set will
|
|
|
|
* not have changed since the last SetPluginList message. To keep track of
|
|
|
|
* this, the chrome process increments an epoch number every time the set of
|
|
|
|
* plugins changes. The chrome process sends up the last epoch it observed.
|
|
|
|
* If the epoch last seen by the content process is the same, the content
|
|
|
|
* process ignores the update. Otherwise the content process updates its
|
|
|
|
* list and reloads its plugins.
|
|
|
|
**/
|
|
|
|
async SetPluginList(uint32_t pluginEpoch, PluginTag[] plugins, FakePluginTag[] fakePlugins);
|
2017-06-14 11:50:44 +03:00
|
|
|
|
|
|
|
async ShareCodeCoverageMutex(CrossProcessMutexHandle handle);
|
2018-10-15 11:36:45 +03:00
|
|
|
async FlushCodeCoverageCounters() returns (bool unused);
|
2017-06-14 11:50:44 +03:00
|
|
|
|
2018-12-05 23:44:53 +03:00
|
|
|
async GetMemoryUniqueSetSize() returns (int64_t uss);
|
|
|
|
|
2017-07-28 10:14:54 +03:00
|
|
|
/*
|
|
|
|
* IPC message to enable the input event queue on the main thread of the
|
|
|
|
* content process.
|
|
|
|
*/
|
|
|
|
async SetInputEventQueueEnabled();
|
|
|
|
|
|
|
|
/*
|
|
|
|
* IPC message to flush the input event queue on the main thread of the
|
|
|
|
* content process.
|
|
|
|
*
|
|
|
|
* When the ContentParent stops sending the input event with input priority,
|
|
|
|
* there may be some pending events in the input event queue and normal
|
|
|
|
* event queue. Here is a possible scenario.
|
|
|
|
* R: Runnables.
|
|
|
|
* D: Enable the input priority event.
|
|
|
|
* E: Disable the input priority evnet.
|
|
|
|
*
|
|
|
|
* D E
|
|
|
|
* Normal Queue: R1 R2 R3
|
|
|
|
* Input Queue: II I2 I3
|
|
|
|
*
|
|
|
|
* To avoid the newly added normal events (e.g. R2, which may be an input
|
|
|
|
* event) preempt the pending input events (e.g. I1), or the newly added
|
|
|
|
* input events (e.g. I3) preempt the pending normal events (e.g. R2), we
|
|
|
|
* have to flush all pending events before enabling and disabling the input
|
|
|
|
* priority event.
|
|
|
|
*
|
|
|
|
* To flush the normal event queue and the input event queue, we use three
|
|
|
|
* IPC messages as the followings.
|
|
|
|
* FI: Flush the input queue.
|
|
|
|
* SI: Suspend the input queue.
|
|
|
|
* RI: Resume the input queue.
|
|
|
|
*
|
|
|
|
* Normal Queue: R1 FI RI R2 FI RI R3
|
|
|
|
* Input Queue: II SI I2 SI I3
|
|
|
|
*
|
|
|
|
* When the flush input request is processed before the other two requests,
|
|
|
|
* we consume all input events until the suspend request. After handling the
|
|
|
|
* suspend request, we stop consuming the input events until the resume
|
|
|
|
* request to make sure we consume all pending normal events.
|
|
|
|
*
|
|
|
|
* If we process the suspend request before the other two requests, we
|
|
|
|
* ignore the flush request and consume all pending normal events until the
|
|
|
|
* resume request.
|
|
|
|
*/
|
|
|
|
async FlushInputEventQueue();
|
|
|
|
|
|
|
|
/*
|
|
|
|
* IPC message to resume consuming the pending events in the input event
|
|
|
|
* queue.
|
|
|
|
*/
|
|
|
|
async ResumeInputEventQueue();
|
|
|
|
|
|
|
|
/*
|
|
|
|
* IPC message to suspend consuming the pending events in the input event
|
|
|
|
* queue.
|
|
|
|
*/
|
|
|
|
prio(input) async SuspendInputEventQueue();
|
|
|
|
|
2017-08-29 14:05:40 +03:00
|
|
|
/*
|
|
|
|
* IPC message to propagate dynamic scalar definitions, added after the
|
|
|
|
* content process is spawned, from the parent to the child.
|
|
|
|
* Dynamic scalar definitions added at the process startup are handled
|
|
|
|
* using the |TelemetryIPC::AddDynamicScalarDefinitions| functions.
|
|
|
|
*/
|
|
|
|
async AddDynamicScalars(DynamicScalarDefinition[] definitions);
|
|
|
|
|
2017-11-01 20:19:38 +03:00
|
|
|
/*
|
|
|
|
* Message to construct a PClientOpenWindowOp actor. This is used to
|
|
|
|
* open windows cross-process and receive notification when the operation
|
|
|
|
* has completed.
|
|
|
|
*/
|
|
|
|
async PClientOpenWindowOp(ClientOpenWindowArgs aArgs);
|
|
|
|
|
2018-07-22 14:52:42 +03:00
|
|
|
/* Save the execution up to the current point in a recording process. */
|
|
|
|
async SaveRecording(FileDescriptor file);
|
|
|
|
|
2019-01-24 00:27:44 +03:00
|
|
|
// This message is sent to content processes, and triggers the creation of a
|
|
|
|
// new HttpChannelChild that will be connected to the parent channel
|
|
|
|
// represented by registrarId.
|
|
|
|
// This is on PContent not PNecko, as PNecko may not be initialized yet.
|
2019-09-21 14:14:49 +03:00
|
|
|
// The returned loadInfo needs to be set on the channel - since the channel
|
|
|
|
// moved to a new process it now has different properties.
|
|
|
|
|
2019-01-24 00:27:44 +03:00
|
|
|
async CrossProcessRedirect(uint32_t aRegistrarId,
|
|
|
|
nsIURI aURI,
|
2019-08-06 09:11:58 +03:00
|
|
|
ReplacementChannelConfigInit config,
|
2019-03-04 09:30:00 +03:00
|
|
|
LoadInfoArgs? aLoadInfo,
|
2019-01-24 00:27:44 +03:00
|
|
|
uint64_t aChannelId,
|
|
|
|
nsIURI aOriginalURI,
|
2019-05-02 23:46:34 +03:00
|
|
|
uint64_t aIdentifier,
|
2019-09-21 14:14:49 +03:00
|
|
|
uint32_t aRedirectMode)
|
|
|
|
returns (nsresult rv, LoadInfoArgs? arg);
|
2019-01-24 00:27:44 +03:00
|
|
|
|
2019-03-20 06:15:36 +03:00
|
|
|
/**
|
|
|
|
* This method is used to notifty content process to start delayed autoplay
|
|
|
|
* media via browsing context.
|
|
|
|
*/
|
|
|
|
async StartDelayedAutoplayMediaComponents(BrowsingContext aContext);
|
|
|
|
|
2019-08-07 04:46:03 +03:00
|
|
|
/**
|
|
|
|
* This method is used to apply the media action to outer window in the
|
|
|
|
* content process, such as play, pause, stop ..e.t.c.
|
|
|
|
*/
|
|
|
|
async UpdateMediaAction(BrowsingContext aContext, MediaControlActions aAction);
|
|
|
|
|
2019-03-14 21:51:09 +03:00
|
|
|
// Begin subscribing to a new BrowsingContextGroup, sending down the current
|
|
|
|
// value for every individual BrowsingContext.
|
|
|
|
async RegisterBrowsingContextGroup(BrowsingContextInitializer[] aInits);
|
|
|
|
|
2019-10-14 18:08:47 +03:00
|
|
|
#if defined(MOZ_SANDBOX) && defined(MOZ_DEBUG) && defined(ENABLE_TESTS)
|
|
|
|
// Initialize top-level actor for testing content process sandbox.
|
|
|
|
async InitSandboxTesting(Endpoint<PSandboxTestingChild> aEndpoint);
|
|
|
|
#endif
|
|
|
|
|
2019-03-05 17:46:10 +03:00
|
|
|
async DestroySHEntrySharedState(uint64_t aID);
|
|
|
|
|
2009-08-18 23:05:15 +04:00
|
|
|
parent:
|
2017-01-24 22:49:13 +03:00
|
|
|
async InitBackground(Endpoint<PBackgroundParent> aEndpoint);
|
|
|
|
|
2018-07-22 14:52:42 +03:00
|
|
|
sync OpenRecordReplayChannel(uint32_t channelId)
|
|
|
|
returns (FileDescriptor connection);
|
|
|
|
async CreateReplayingProcess(uint32_t channelId);
|
2019-08-04 19:50:37 +03:00
|
|
|
async GenerateReplayCrashReport(uint32_t channelId);
|
2018-07-22 14:52:42 +03:00
|
|
|
|
2015-02-10 13:49:03 +03:00
|
|
|
async CreateGMPService();
|
|
|
|
|
2017-09-08 03:28:27 +03:00
|
|
|
async InitStreamFilter(uint64_t channelId, nsString addonId)
|
|
|
|
returns (Endpoint<PStreamFilterChild> aEndpoint);
|
|
|
|
|
2014-10-29 18:05:36 +03:00
|
|
|
/**
|
2017-01-26 01:17:17 +03:00
|
|
|
* This call connects the content process to a plugin process. This call
|
|
|
|
* returns an endpoint for a new PluginModuleParent. The corresponding
|
|
|
|
* PluginModuleChild will be started up in the plugin process.
|
2014-10-29 18:05:36 +03:00
|
|
|
*/
|
2017-01-26 01:17:17 +03:00
|
|
|
sync LoadPlugin(uint32_t aPluginId)
|
|
|
|
returns (nsresult aResult, uint32_t aRunID, Endpoint<PPluginModuleParent> aEndpoint);
|
2014-10-29 18:05:36 +03:00
|
|
|
|
2015-01-17 00:03:27 +03:00
|
|
|
/**
|
|
|
|
* This call is used by asynchronous plugin instantiation to notify the
|
|
|
|
* content parent that it is now safe to initiate the plugin bridge for
|
2017-01-26 01:17:17 +03:00
|
|
|
* the specified plugin id. The endpoint for the content process part of the
|
|
|
|
* bridge is returned.
|
2015-01-17 00:03:27 +03:00
|
|
|
*/
|
2017-01-26 01:17:17 +03:00
|
|
|
sync ConnectPluginBridge(uint32_t aPluginId)
|
|
|
|
returns (nsresult rv, Endpoint<PPluginModuleParent> aEndpoint);
|
2015-01-17 00:03:27 +03:00
|
|
|
|
2019-01-12 07:51:20 +03:00
|
|
|
// See Bug 1518344 - Investigate using async for PContent::LaunchRDDProcess
|
|
|
|
sync LaunchRDDProcess()
|
|
|
|
returns (nsresult rv, Endpoint<PRemoteDecoderManagerChild> aEndpoint);
|
|
|
|
|
2014-05-09 02:43:53 +04:00
|
|
|
async PJavaScript();
|
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async PRemoteSpellcheckEngine();
|
2012-06-20 03:14:39 +04:00
|
|
|
|
2017-02-17 05:44:16 +03:00
|
|
|
async InitCrashReporter(Shmem shmem, NativeThreadId tid);
|
2011-06-08 23:56:31 +04:00
|
|
|
|
2017-02-14 05:29:24 +03:00
|
|
|
sync IsSecureURI(uint32_t aType, URIParams aURI, uint32_t aFlags,
|
|
|
|
OriginAttributes aOriginAttributes)
|
2014-07-22 16:17:45 +04:00
|
|
|
returns (bool isSecureURI);
|
|
|
|
|
2018-01-10 19:07:00 +03:00
|
|
|
async AccumulateMixedContentHSTS(URIParams aURI, bool aActive,
|
2017-02-14 05:29:24 +03:00
|
|
|
OriginAttributes aOriginAttributes);
|
2015-09-09 22:14:27 +03:00
|
|
|
|
2016-10-01 02:20:50 +03:00
|
|
|
nested(inside_cpow) async PHal();
|
2011-10-06 02:15:45 +04:00
|
|
|
|
2015-09-22 22:09:42 +03:00
|
|
|
async PHeapSnapshotTempFileHelper();
|
|
|
|
|
2017-07-28 00:42:00 +03:00
|
|
|
async PNecko();
|
2011-11-21 02:40:53 +04:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async PPrinting();
|
2014-10-28 18:59:08 +03:00
|
|
|
|
2017-03-14 14:28:58 +03:00
|
|
|
async PChildToParentStream();
|
2016-05-15 20:32:09 +03:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async PSpeechSynthesis();
|
2013-04-10 16:18:38 +04:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async PMedia();
|
2015-06-18 18:46:36 +03:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async PWebrtcGlobal();
|
2015-09-09 22:14:27 +03:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async PPresentation();
|
2015-04-22 01:29:18 +03:00
|
|
|
|
2019-06-07 14:52:54 +03:00
|
|
|
async CreateAudioIPCConnection() returns (FileDescOrError fd);
|
2017-12-20 04:51:11 +03:00
|
|
|
|
2019-01-18 00:24:43 +03:00
|
|
|
sync PURLClassifier(Principal principal)
|
2016-11-19 00:54:57 +03:00
|
|
|
returns (bool success);
|
2018-12-14 14:40:17 +03:00
|
|
|
|
|
|
|
async PURLClassifierLocal(URIParams uri, IPCURLClassifierFeature[] features);
|
2016-11-19 00:54:57 +03:00
|
|
|
|
2017-12-07 11:32:52 +03:00
|
|
|
async PLoginReputation(URIParams formURI);
|
|
|
|
|
2019-02-06 08:09:57 +03:00
|
|
|
async PSessionStorageObserver();
|
|
|
|
|
2019-03-05 17:46:10 +03:00
|
|
|
async PSHistory(BrowsingContext aContext);
|
|
|
|
|
|
|
|
// Clone from entry or use shared id.
|
|
|
|
sync PSHEntry(PSHEntryOrSharedID entryOrSharedID);
|
|
|
|
|
2019-08-06 12:24:34 +03:00
|
|
|
async PBenchmarkStorage();
|
|
|
|
|
2010-07-15 18:04:25 +04:00
|
|
|
// Services remoting
|
|
|
|
|
2012-08-23 23:33:46 +04:00
|
|
|
async StartVisitedQuery(URIParams uri);
|
|
|
|
async SetURITitle(URIParams uri, nsString title);
|
2010-07-02 19:50:41 +04:00
|
|
|
|
2015-12-04 02:04:28 +03:00
|
|
|
async LoadURIExternal(URIParams uri, PBrowser windowContext);
|
2016-07-01 06:16:00 +03:00
|
|
|
async ExtProtocolChannelConnectParent(uint32_t registrarId);
|
2010-08-10 21:14:45 +04:00
|
|
|
|
2010-10-20 00:35:08 +04:00
|
|
|
// PrefService message
|
2016-08-04 21:33:42 +03:00
|
|
|
sync GetGfxVars() returns (GfxVarUpdate[] vars);
|
2010-07-15 18:04:25 +04:00
|
|
|
|
2011-01-13 07:04:42 +03:00
|
|
|
sync ReadFontList() returns (FontListEntry[] retValue);
|
|
|
|
|
2013-11-06 21:21:15 +04:00
|
|
|
sync SyncMessage(nsString aMessage, ClonedMessageData aData,
|
|
|
|
CpowEntry[] aCpows, Principal aPrincipal)
|
2015-09-10 23:50:58 +03:00
|
|
|
returns (StructuredCloneData[] retval);
|
2010-08-31 22:58:35 +04:00
|
|
|
|
2016-10-01 02:20:50 +03:00
|
|
|
nested(inside_sync) sync RpcMessage(nsString aMessage, ClonedMessageData aData,
|
|
|
|
CpowEntry[] aCpows, Principal aPrincipal)
|
2015-09-10 23:50:58 +03:00
|
|
|
returns (StructuredCloneData[] retval);
|
2013-10-01 20:15:06 +04:00
|
|
|
|
Bug 1443954 - Part 3: Add support for RefCounted types to IPDL, r=bz,froydnj,baku
This patch was reviewed in parts, however the intermediate states would not build:
Bug 1443954 - Part 3A: Strip pointers from the argument to WriteParam and WriteIPDLParam before selecting the ParamTraits impl, r=froydnj
Bug 1443954 - Part 3B: Move nsIAlertNotification serialization to the refcounted system, r=bz
Bug 1443954 - Part 3C: Move geolocation serialization to the refcounted system, r=bz
Bug 1443954 - Part 3D: Move nsIInputStream serialization to the refcounted system, r=baku
Bug 1443954 - Part 3E: Move BlobImpl serialization to the refcounted system, r=baku
Bug 1443954 - Part 3F: Correctly implement ParamTraits for actors after the ParamTraits changes, r=froydnj
2018-03-07 04:14:59 +03:00
|
|
|
async ShowAlert(nsIAlertNotification alert);
|
2013-03-18 17:24:53 +04:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async CloseAlert(nsString name, Principal principal);
|
2010-09-15 20:44:57 +04:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async DisableNotifications(Principal principal);
|
2015-10-23 00:10:14 +03:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async OpenNotificationSettings(Principal principal);
|
2015-10-23 00:20:51 +03:00
|
|
|
|
2018-12-18 03:42:53 +03:00
|
|
|
// Request that the ServiceWorkerManager in the parent process create a
|
|
|
|
// notification "click" or "close" event and dispatch it on the relevant
|
|
|
|
// ServiceWorker. This needs to happen because when a notification is
|
|
|
|
// created it is tied to a specific content process and when the user clicks
|
|
|
|
// on the notification, it will be that content process that is notified.
|
|
|
|
// However, even if the ServiceWorker lives in that process (it may no
|
|
|
|
// longer be in that process, or may have never lived there), the right/only
|
|
|
|
// way to talk through the ServiceWorker is through the parent.
|
|
|
|
//
|
|
|
|
// This happens on PContent because the ServiceWorkerManager lives on the
|
|
|
|
// main thread and bouncing this off of PBackground would be silly and
|
|
|
|
// complex. In the long run, the notification implementation will be
|
|
|
|
// overhauled to directly process the notification click/close and directly
|
|
|
|
// translate that to a ServiceWorker event.
|
|
|
|
async NotificationEvent(nsString type, NotificationEventData data);
|
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async PPSMContentDownloader(uint32_t aCertType);
|
2015-04-22 22:55:23 +03:00
|
|
|
|
2019-03-06 17:05:50 +03:00
|
|
|
async PExternalHelperApp(URIParams? uri,
|
2019-03-04 09:30:00 +03:00
|
|
|
LoadInfoArgs? loadInfoArgs,
|
2016-01-27 00:51:53 +03:00
|
|
|
nsCString aMimeContentType,
|
|
|
|
nsCString aContentDisposition,
|
|
|
|
uint32_t aContentDispositionHint,
|
|
|
|
nsString aContentDispositionFilename,
|
|
|
|
bool aForceSave,
|
|
|
|
int64_t aContentLength,
|
2017-01-11 04:49:16 +03:00
|
|
|
bool aWasFileChannel,
|
2019-03-06 17:05:50 +03:00
|
|
|
URIParams? aReferrer,
|
2016-01-27 00:51:53 +03:00
|
|
|
nullable PBrowser aBrowser);
|
2012-08-23 23:33:46 +04:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async PHandlerService();
|
2015-08-26 02:42:21 +03:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async AddGeolocationListener(Principal principal, bool highAccuracy);
|
|
|
|
async RemoveGeolocationListener();
|
|
|
|
async SetGeolocationHigherAccuracy(bool enable);
|
2010-09-16 02:55:08 +04:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async ConsoleMessage(nsString message);
|
2018-02-24 04:21:49 +03:00
|
|
|
async ScriptErrorWithStack(nsString message, nsString sourceName, nsString sourceLine,
|
|
|
|
uint32_t lineNumber, uint32_t colNumber, uint32_t flags,
|
2018-03-13 08:40:38 +03:00
|
|
|
nsCString category, bool privateWindow,
|
2019-04-02 01:42:34 +03:00
|
|
|
bool fromChromeContext, ClonedMessageData stack);
|
2010-09-24 05:39:32 +04:00
|
|
|
|
2015-04-16 22:38:12 +03:00
|
|
|
// Places the items within dataTransfer on the clipboard.
|
2016-01-27 00:51:53 +03:00
|
|
|
async SetClipboard(IPCDataTransfer aDataTransfer,
|
|
|
|
bool aIsPrivateData,
|
2016-06-30 10:12:56 +03:00
|
|
|
Principal aRequestingPrincipal,
|
2018-03-14 11:44:36 +03:00
|
|
|
uint32_t aContentPolicyType,
|
2016-01-27 00:51:53 +03:00
|
|
|
int32_t aWhichClipboard);
|
2015-04-16 22:38:12 +03:00
|
|
|
|
|
|
|
// Given a list of supported types, returns the clipboard data for the
|
|
|
|
// first type that matches.
|
|
|
|
sync GetClipboard(nsCString[] aTypes, int32_t aWhichClipboard)
|
|
|
|
returns (IPCDataTransfer dataTransfer);
|
|
|
|
|
Bug 1470540 - Improve performance of DataTransfer::CacheExternalClipboardFormats, r=baku,mccr8
Currently, in order to retrieve supported clipboard formats
DataTransfer::CacheExternalClipboardFormats repeatedly makes the same calls to
clipboard->HasDataMatchingFlavors.
In the case when aPlainTextOnly == true only 1 call is made -
clipboard->HasDataMatchingFlavors(kUnicodeMime, ...), and when
aPlainTextOnly == false we have 1 call made for every member of the list
{ kCustomTypesMime, kFileMime, kHTMLMime, kRTFMime, kURLMime, kURLDataMime,
kUnicodeMime, kPNGImageMime } - a total of 8 calls.
We can see that in nsClipboardProxy::HasDataMatchingFlavors, there is a call to
ContentChild::GetSingleton()->SendClipboardHasType.
So when aPlainTextOnly == true, we will have 1 sync message, and when
aPlainTextOnly == false, we will have 8 sync messages.
With the proposed solution, in DataTransfer::CacheExternalClipboardFormats
we will only have 1 sync message regardless of the case because
GetExternalClipboardFormats() will retrieve all supported clipboard
formats at once.
MozReview-Commit-ID: CAmBfqB459v
--HG--
extra : rebase_source : 27f1b420f2613e6a747ed63762f1583ab71ba3e0
2018-06-22 21:28:27 +03:00
|
|
|
// Returns a list of formats supported by the clipboard
|
|
|
|
sync GetExternalClipboardFormats(int32_t aWhichClipboard, bool aPlainTextOnly) returns (nsCString[] aTypes);
|
|
|
|
|
2015-04-16 22:38:12 +03:00
|
|
|
// Clears the clipboard.
|
2016-01-27 00:51:53 +03:00
|
|
|
async EmptyClipboard(int32_t aWhichClipboard);
|
2015-04-16 22:38:12 +03:00
|
|
|
|
|
|
|
// Returns true if data of one of the specified types is on the clipboard.
|
|
|
|
sync ClipboardHasType(nsCString[] aTypes, int32_t aWhichClipboard)
|
|
|
|
returns (bool hasType);
|
2011-03-01 08:36:43 +03:00
|
|
|
|
2018-01-16 15:24:51 +03:00
|
|
|
// 'Play', 'Beep' and 'PlayEventSound' are the only nsISound methods used in
|
|
|
|
// the content process.
|
|
|
|
async PlaySound(URIParams aURL) compress;
|
|
|
|
async Beep() compress;
|
|
|
|
async PlayEventSound(uint32_t aEventId) compress;
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
sync GetIconForExtension(nsCString aFileExt, uint32_t aIconSize)
|
|
|
|
returns (uint8_t[] bits);
|
2011-06-14 01:02:13 +04:00
|
|
|
|
2011-07-27 05:14:52 +04:00
|
|
|
sync GetShowPasswordSetting()
|
2011-09-29 10:19:26 +04:00
|
|
|
returns (bool showPassword);
|
2011-07-27 05:14:52 +04:00
|
|
|
|
2012-04-20 04:13:20 +04:00
|
|
|
// Notify the parent of the presence or absence of private docshells
|
2016-01-27 00:51:53 +03:00
|
|
|
async PrivateDocShellsExist(bool aExist);
|
2012-04-20 04:13:20 +04:00
|
|
|
|
2017-02-01 15:34:24 +03:00
|
|
|
// Tell the parent that the child has gone idle for the first time.
|
|
|
|
async FirstIdle();
|
|
|
|
|
2017-06-15 21:34:00 +03:00
|
|
|
async DeviceReset();
|
|
|
|
|
2019-10-12 15:37:51 +03:00
|
|
|
sync KeywordToURI(nsCString keyword, bool isPrivateContext)
|
2019-03-06 17:05:50 +03:00
|
|
|
returns (nsString providerName, nsIInputStream postData, URIParams? uri);
|
2014-09-11 17:50:55 +04:00
|
|
|
|
|
|
|
sync NotifyKeywordSearchLoading(nsString providerName, nsString keyword);
|
2013-08-16 21:59:31 +04:00
|
|
|
|
2015-11-25 00:31:57 +03:00
|
|
|
async CopyFavicon(URIParams oldURI, URIParams newURI, Principal aLoadingPrincipal, bool isPrivate);
|
2015-04-29 11:57:24 +03:00
|
|
|
|
2013-11-24 13:06:27 +04:00
|
|
|
/**
|
|
|
|
* Notifies the parent about a recording device is starting or shutdown.
|
|
|
|
* @param recordingStatus starting or shutdown
|
|
|
|
* @param pageURL URL that request that changing the recording status
|
|
|
|
* @param isAudio recording start with microphone
|
|
|
|
* @param isVideo recording start with camera
|
|
|
|
*/
|
|
|
|
async RecordingDeviceEvents(nsString recordingStatus,
|
|
|
|
nsString pageURL,
|
|
|
|
bool isAudio,
|
|
|
|
bool isVideo);
|
|
|
|
|
2016-02-17 02:07:37 +03:00
|
|
|
// Graphics errors
|
|
|
|
async GraphicsError(nsCString aError);
|
|
|
|
|
2015-08-12 06:22:20 +03:00
|
|
|
// Driver crash guards. aGuardType must be a member of CrashGuardType.
|
|
|
|
sync BeginDriverCrashGuard(uint32_t aGuardType) returns (bool crashDetected);
|
|
|
|
sync EndDriverCrashGuard(uint32_t aGuardType);
|
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async AddIdleObserver(uint64_t observerId, uint32_t idleTimeInS);
|
|
|
|
async RemoveIdleObserver(uint64_t observerId, uint32_t idleTimeInS);
|
2014-02-05 20:37:26 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This message is only used on X11 platforms.
|
|
|
|
*
|
|
|
|
* Send a dup of the plugin process's X socket to the parent
|
|
|
|
* process. In theory, this scheme keeps the plugin's X resources
|
|
|
|
* around until after both the plugin process shuts down *and* the
|
|
|
|
* parent process closes the dup fd. This is used to prevent the
|
|
|
|
* parent process from crashing on X errors if, e.g., the plugin
|
|
|
|
* crashes *just before* a repaint and the parent process tries to
|
|
|
|
* use the newly-invalid surface.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async BackUpXResources(FileDescriptor aXSocketFd);
|
2014-02-05 20:37:26 +04:00
|
|
|
|
2017-03-14 02:06:04 +03:00
|
|
|
async RequestAnonymousTemporaryFile(uint64_t aID);
|
|
|
|
|
2014-11-13 03:31:00 +03:00
|
|
|
/**
|
|
|
|
* Starts an offline application cache update.
|
|
|
|
* @param manifestURI
|
|
|
|
* URI of the manifest to fetch, the application cache group ID
|
|
|
|
* @param documentURI
|
|
|
|
* URI of the document that referred the manifest
|
2015-10-02 19:13:52 +03:00
|
|
|
* @param loadingPrincipal
|
|
|
|
* Principal of the document that referred the manifest
|
2014-11-13 03:31:00 +03:00
|
|
|
* @param stickDocument
|
|
|
|
* True if the update was initiated by a document load that referred
|
|
|
|
* a manifest.
|
|
|
|
* False if the update was initiated by applicationCache.update() call.
|
|
|
|
*
|
|
|
|
* Tells the update to carry the documentURI to a potential separate
|
|
|
|
* update of implicit (master) items.
|
|
|
|
*
|
|
|
|
* Why this argument? If the document was not found in an offline cache
|
|
|
|
* before load and refers a manifest and this manifest itself has not
|
|
|
|
* been changed since the last fetch, we will not do the application
|
|
|
|
* cache group update. But we must cache the document (identified by the
|
|
|
|
* documentURI). This argument will ensure that a previously uncached
|
|
|
|
* document will get cached and that we don't re-cache a document that
|
|
|
|
* has already been cached (stickDocument=false).
|
|
|
|
* @param tabId
|
|
|
|
* To identify which tab owns the app.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async POfflineCacheUpdate(URIParams manifestURI, URIParams documentURI,
|
2019-10-15 20:32:54 +03:00
|
|
|
PrincipalInfo loadingPrincipal, bool stickDocument,
|
|
|
|
CookieSettingsArgs cookieSettings);
|
2014-11-13 03:31:00 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets "offline-app" permission for the principal. Called when we hit
|
2019-09-10 13:57:07 +03:00
|
|
|
* a web app with the manifest attribute in <html>
|
2014-11-13 03:31:00 +03:00
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async SetOfflinePermission(Principal principal);
|
2014-11-13 03:31:00 +03:00
|
|
|
|
2015-01-10 21:18:59 +03:00
|
|
|
/**
|
|
|
|
* Notifies the parent to continue shutting down after the child performs
|
|
|
|
* its shutdown tasks.
|
|
|
|
*/
|
|
|
|
async FinishShutdown();
|
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async UpdateDropEffect(uint32_t aDragAction, uint32_t aDropEffect);
|
2015-04-14 04:08:00 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Initiates an asynchronous request for permission for the
|
|
|
|
* provided principal.
|
|
|
|
*
|
|
|
|
* @param aRequests
|
|
|
|
* The array of permissions to request.
|
|
|
|
* @param aPrincipal
|
|
|
|
* The principal of the request.
|
2018-11-20 04:52:47 +03:00
|
|
|
* @param aTopLevelPrincipal
|
|
|
|
* The principal of the top level page the request comes from.
|
2015-04-14 04:08:00 +03:00
|
|
|
* @param tabId
|
|
|
|
* To identify which tab issues this request.
|
|
|
|
*
|
|
|
|
* NOTE: The principal is untrusted in the parent process. Only
|
|
|
|
* principals that can live in the content process should
|
|
|
|
* provided.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async PContentPermissionRequest(PermissionRequest[] aRequests, Principal aPrincipal,
|
2018-11-20 04:52:47 +03:00
|
|
|
Principal aTopLevelPrincipal, bool aIsHandlingUserInput,
|
2019-04-18 16:43:05 +03:00
|
|
|
bool aDocumentHasUserInput, uint64_t aPageLoadTimestamp, TabId tabId);
|
2015-04-14 04:08:00 +03:00
|
|
|
|
2017-05-30 22:06:14 +03:00
|
|
|
async ShutdownProfile(nsCString aProfile);
|
2015-06-11 00:58:30 +03:00
|
|
|
|
2015-08-02 23:59:33 +03:00
|
|
|
/**
|
|
|
|
* Request graphics initialization information from the parent.
|
|
|
|
*/
|
|
|
|
sync GetGraphicsDeviceInitData()
|
2016-08-21 06:59:11 +03:00
|
|
|
returns (ContentDeviceData aData);
|
2015-08-02 23:59:33 +03:00
|
|
|
|
2019-04-27 18:37:29 +03:00
|
|
|
/**
|
|
|
|
* A shared font list (see gfx/thebes/SharedFontList.*) contains a list
|
|
|
|
* of shared-memory blocks that are used to store all the font list data.
|
|
|
|
* The font list created in the parent process is the only one that can
|
|
|
|
* create or store objects into the shared memory; content processes font
|
|
|
|
* lists have read-only access to it.
|
|
|
|
*
|
|
|
|
* To minimize the cost of record allocations, the shared font list
|
|
|
|
* bump-allocates new objects that it adds to the shared memory blocks
|
|
|
|
* (i.e. the records stored in the shared memory blocks are only ever
|
|
|
|
* appended, and never freed except when the entire font list is
|
|
|
|
* reconstructed).
|
|
|
|
*
|
|
|
|
* When initially created by the parent process, the font list may contain
|
|
|
|
* nothing except a header, and the list of the system's installed font
|
|
|
|
* family names. Additional data about the families (styled faces available
|
|
|
|
* and character coverage) is appended to the font list during the session
|
|
|
|
* as a given font is considered for use, because loading all data for all
|
|
|
|
* installed fonts during startup is too expensive/slow.
|
|
|
|
*
|
|
|
|
* During content process launch, a content process's first step in
|
|
|
|
* gaining access to the font list is to call GetFontListShmBlock,
|
|
|
|
* passing index zero in order to get access to the first block, which
|
|
|
|
* contains the font list header and the list of font-family records
|
|
|
|
* (which may be virtually all uninitialized at this time, containing
|
|
|
|
* nothing but the family names). Once a content process determines a
|
|
|
|
* font-family name it wants to use (e.g. from a CSS font-family list, or
|
|
|
|
* from preferences), if that Family record has not yet been initialized,
|
|
|
|
* it will call InitializeFamily (below) to have the parent process
|
|
|
|
* populate Face records in the shared memory with the family's styles.
|
|
|
|
* The content process can then pick the face with best style match from
|
|
|
|
* the available faces according to the CSS font matching algorithm, load
|
|
|
|
* its character map, then send the map to the parent process using
|
|
|
|
* SetCharacterMap (so that the parent process can share the map with all
|
|
|
|
* processes to avoid duplication of work).
|
|
|
|
*
|
|
|
|
* At some point, as the parent process adds data to the font list, a new
|
|
|
|
* shared-memory block will probably be needed. At that point the parent
|
|
|
|
* will create a new block and append it to its share memory block list.
|
|
|
|
* The new Block index will start to appear in Pointer records in the
|
|
|
|
* shared memory, and the content process's can then fetch those other
|
|
|
|
* blocks using this function as needed.
|
|
|
|
*
|
|
|
|
* @param aGeneration
|
|
|
|
* The font list has a Generation ID stored in its Header, and any time
|
|
|
|
* the parent process needs to reinitialize the list (because of a change
|
|
|
|
* in the available font repertoire) a new Generation ID is assigned.
|
|
|
|
* Content processes pass the Generation of the list they're using in
|
|
|
|
* all messages, so that the parent can recognize if they're out of date
|
|
|
|
* and safely ignore such messages. (When the parent rebuilds the list,
|
|
|
|
* it will notify all content processes, but they may still send a few
|
|
|
|
* messages that relate to the obsolete list before they have processed
|
|
|
|
* this notification.)
|
|
|
|
* @param aIndex
|
|
|
|
* (Zero-based) index of the shared-memory block to be mapped.
|
|
|
|
* In a typical case, there will be a handful of blocks altogether, so
|
|
|
|
* each content process only needs to make this request a few times.
|
|
|
|
* @returns aHandle
|
|
|
|
* Handle that can be used to construct a SharedMemoryBasic that maps the
|
|
|
|
* requested block of memory.
|
|
|
|
* If aGeneration does not match the parent's font list generation ID, or
|
|
|
|
* if requesting a block that does not exist (i.e. with aIndex greater
|
|
|
|
* than or equal to the number of blocks actually in existence), returns
|
|
|
|
* a null handle.
|
|
|
|
*
|
|
|
|
* This is a sync message because the content process needs font data in
|
|
|
|
* order to perform font-matching (e.g. during reflow), and cannot continue
|
|
|
|
* until it has mapped the font-list memory.
|
|
|
|
*/
|
|
|
|
sync GetFontListShmBlock(uint32_t aGeneration, uint32_t aIndex)
|
|
|
|
returns (Handle aHandle);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Ask the parent to initialize a given font family, so that face metadata
|
|
|
|
* will be available. Content processes will only call this for families
|
|
|
|
* where the Face data has not yet been populated, so it will generally be
|
|
|
|
* called no more than once per family. (It may not be needed at all, if
|
|
|
|
* the parent process has already initialized the families that content
|
|
|
|
* wants to use.)
|
|
|
|
*
|
|
|
|
* @param aGeneration
|
|
|
|
* Font-list generation, so requests relating to an obsolete list can be
|
|
|
|
* ignored (see comments for GetFontListShmBlock).
|
|
|
|
* @param aFamilyIndex
|
|
|
|
* The 0-based index of the Family within the font-list that a content
|
|
|
|
* process needs to use.
|
|
|
|
*
|
|
|
|
* This is a sync message because the content process cannot complete its
|
|
|
|
* font-matching until the family is fully populated with Face records.
|
|
|
|
* If we make it async, content processes will reflow using fallbacks,
|
|
|
|
* and then have to reflow again once all the font information needed
|
|
|
|
* becomes available.
|
|
|
|
*/
|
|
|
|
sync InitializeFamily(uint32_t aGeneration, uint32_t aFamilyIndex);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Record the character map of a given Face in the font list.
|
|
|
|
*
|
|
|
|
* @param aGeneration
|
|
|
|
* Font-list generation, so requests relating to an obsolete list can be
|
|
|
|
* ignored (see comments for GetFontListShmBlock).
|
|
|
|
* @param aFacePtr
|
|
|
|
* Font-list shared-memory "pointer" to the Face record to be updated.
|
|
|
|
* A Pointer is a record of a shared-memory block index and an offset
|
|
|
|
* within that block, which each process that maps the block can convert
|
|
|
|
* into a real pointer in its address space.
|
|
|
|
* @param aMap
|
|
|
|
* The character coverage map of the face. (This will be stored as a
|
|
|
|
* SharedBitSet record within the shared font list, and the Face record
|
|
|
|
* will be updated to reference it.)
|
|
|
|
*/
|
2019-04-29 17:39:05 +03:00
|
|
|
async SetCharacterMap(uint32_t aGeneration, Pointer aFacePtr, gfxSparseBitSet aMap);
|
2019-04-27 18:37:29 +03:00
|
|
|
|
2019-04-27 18:39:26 +03:00
|
|
|
/**
|
|
|
|
* Ask the parent to set up the merged charmap for a family, to accelerate
|
|
|
|
* future fallback searches.
|
|
|
|
* aFamilyPtr may refer to an element of either the Families() or AliasFamilies().
|
|
|
|
*/
|
|
|
|
async SetupFamilyCharMap(uint32_t aGeneration, Pointer aFamilyPtr);
|
|
|
|
|
2019-04-27 18:37:29 +03:00
|
|
|
/**
|
|
|
|
* Ask the parent to try and complete the InitOtherFamilyNames task, because
|
|
|
|
* we're trying to look up a localized font name. This is a sync method so that
|
|
|
|
* the update will be available before the child continues reflow; however, it
|
|
|
|
* is possible the task will have timed-out in the parent and not actually
|
|
|
|
* completed during this call.
|
|
|
|
*
|
|
|
|
* @param aGeneration
|
|
|
|
* Font-list generation, so requests relating to an obsolete list can be
|
|
|
|
* ignored (see comments for GetFontListShmBlock).
|
|
|
|
* @param aDefer
|
|
|
|
* Parameter aDeferOtherFamilyNamesLoading to be passed to
|
|
|
|
* gfxPlatformFontList::InitOtherFamilyNames, to determine whether name
|
|
|
|
* loading should be deferred to a background task or run immediately.
|
|
|
|
* @param aLoaded
|
|
|
|
* Returns whether the font name loading process has completed.
|
|
|
|
*
|
|
|
|
* TODO: This is currently a sync message but can probably be made async,
|
|
|
|
* at the cost of an increased chance of some testcases failing because
|
|
|
|
* they depend on lazily-loaded font names.
|
|
|
|
*/
|
|
|
|
sync InitOtherFamilyNames(uint32_t aGeneration, bool aDefer) returns (bool aLoaded);
|
|
|
|
|
2017-06-15 20:28:11 +03:00
|
|
|
async CreateWindow(nullable PBrowser aThisTab,
|
|
|
|
PBrowser aNewTab,
|
|
|
|
uint32_t aChromeFlags,
|
|
|
|
bool aCalledFromJS,
|
|
|
|
bool aPositionSpecified,
|
|
|
|
bool aSizeSpecified,
|
2019-03-06 17:05:50 +03:00
|
|
|
URIParams? aURIToLoad,
|
2017-06-15 20:28:11 +03:00
|
|
|
nsCString aFeatures,
|
2017-07-05 22:57:47 +03:00
|
|
|
float aFullZoom,
|
2017-11-30 16:42:05 +03:00
|
|
|
Principal aTriggeringPrincipal,
|
2019-02-21 18:00:32 +03:00
|
|
|
nsIContentSecurityPolicy aCsp,
|
2019-03-15 08:11:43 +03:00
|
|
|
nsIReferrerInfo aReferrerInfo)
|
2017-06-15 20:28:11 +03:00
|
|
|
returns (CreatedWindowInfo window);
|
2015-10-30 02:30:57 +03:00
|
|
|
|
2016-11-24 18:08:31 +03:00
|
|
|
async CreateWindowInDifferentProcess(
|
|
|
|
PBrowser aThisTab,
|
|
|
|
uint32_t aChromeFlags,
|
|
|
|
bool aCalledFromJS,
|
|
|
|
bool aPositionSpecified,
|
|
|
|
bool aSizeSpecified,
|
2019-03-06 17:05:50 +03:00
|
|
|
URIParams? aURIToLoad,
|
2016-11-24 18:08:31 +03:00
|
|
|
nsCString aFeatures,
|
2017-06-05 20:33:11 +03:00
|
|
|
float aFullZoom,
|
2017-07-05 22:57:47 +03:00
|
|
|
nsString aName,
|
2019-06-28 23:10:03 +03:00
|
|
|
nsIPrincipal aTriggeringPrincipal,
|
2019-02-21 18:00:32 +03:00
|
|
|
nsIContentSecurityPolicy aCsp,
|
2019-03-15 08:11:43 +03:00
|
|
|
nsIReferrerInfo aReferrerInfo);
|
2016-11-24 18:08:31 +03:00
|
|
|
|
2015-11-05 00:46:10 +03:00
|
|
|
/**
|
|
|
|
* Tells the parent to ungrab the pointer on the default display.
|
|
|
|
*
|
|
|
|
* This is for GTK platforms where we have to ensure the pointer ungrab happens in the
|
|
|
|
* chrome process as that's the process that receives the pointer event.
|
|
|
|
*/
|
|
|
|
sync UngrabPointer(uint32_t time);
|
2016-03-03 00:09:48 +03:00
|
|
|
|
|
|
|
sync RemovePermission(Principal principal, nsCString permissionType) returns (nsresult rv);
|
2016-03-17 09:18:35 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Tell the parent that a decoder's' benchmark has been completed.
|
|
|
|
* The result can then be stored in permanent storage.
|
|
|
|
*/
|
|
|
|
async NotifyBenchmarkResult(nsString aCodecName, uint32_t aDecodeFPS);
|
|
|
|
|
2016-04-21 21:11:03 +03:00
|
|
|
/**
|
|
|
|
* Notify `push-message` observers without data in the parent.
|
|
|
|
*/
|
2016-05-02 19:38:47 +03:00
|
|
|
async NotifyPushObservers(nsCString scope, Principal principal,
|
|
|
|
nsString messageId);
|
2016-04-21 21:11:03 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Notify `push-message` observers with data in the parent.
|
|
|
|
*/
|
2016-05-02 19:38:47 +03:00
|
|
|
async NotifyPushObserversWithData(nsCString scope, Principal principal,
|
|
|
|
nsString messageId, uint8_t[] data);
|
2016-04-21 21:11:03 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Notify `push-subscription-change` observers in the parent.
|
|
|
|
*/
|
2016-05-02 19:38:47 +03:00
|
|
|
async NotifyPushSubscriptionChangeObservers(nsCString scope,
|
|
|
|
Principal principal);
|
2016-04-21 21:11:03 +03:00
|
|
|
|
2016-07-14 10:04:21 +03:00
|
|
|
async GetFilesRequest(nsID aID, nsString aDirectory, bool aRecursiveFlag);
|
|
|
|
async DeleteGetFilesRequest(nsID aID);
|
|
|
|
|
2017-04-24 13:16:49 +03:00
|
|
|
async StoreAndBroadcastBlobURLRegistration(nsCString url, IPCBlob blob,
|
2016-07-17 17:50:50 +03:00
|
|
|
Principal principal);
|
|
|
|
|
|
|
|
async UnstoreAndBroadcastBlobURLUnregistration(nsCString url);
|
|
|
|
|
2016-06-22 17:16:40 +03:00
|
|
|
/**
|
|
|
|
* Messages for communicating child Telemetry to the parent process
|
|
|
|
*/
|
2017-09-13 12:20:36 +03:00
|
|
|
async AccumulateChildHistograms(HistogramAccumulation[] accumulations);
|
|
|
|
async AccumulateChildKeyedHistograms(KeyedHistogramAccumulation[] accumulations);
|
2017-01-16 07:12:00 +03:00
|
|
|
async UpdateChildScalars(ScalarAction[] updates);
|
|
|
|
async UpdateChildKeyedScalars(KeyedScalarAction[] updates);
|
2017-02-14 16:43:51 +03:00
|
|
|
async RecordChildEvents(ChildEventData[] events);
|
2017-06-09 16:53:42 +03:00
|
|
|
async RecordDiscardedData(DiscardedData data);
|
2019-05-03 18:37:14 +03:00
|
|
|
async RecordOrigin(uint32_t metricId, nsCString origin);
|
2016-06-22 17:16:40 +03:00
|
|
|
|
2019-06-22 01:45:47 +03:00
|
|
|
async ReportContentBlockingLog(IPCStream aJSONStream);
|
2019-05-31 18:13:33 +03:00
|
|
|
|
2016-10-27 21:40:50 +03:00
|
|
|
sync GetA11yContentId() returns (uint32_t aContentId);
|
Bug 1303060: Changes to a11y to enable the serving of a COM handler; r=tbsaunde
MozReview-Commit-ID: GTQF3x1pBtX
A general outline of the COM handler (a.k.a. the "smart proxy"):
COM handlers are pieces of code that are loaded by the COM runtime along with
a proxy and are layered above that proxy. This enables the COM handler to
interpose itself between the caller and the proxy, thus providing the
opportunity for the handler to manipulate an interface's method calls before
those calls reach the proxy.
Handlers are regular COM components that live in DLLs and are declared in the
Windows registry. In order to allow for the specifying of a handler (and an
optional payload to be sent with the proxy), the mscom library allows its
clients to specify an implementation of the IHandlerProvider interface.
IHandlerProvider consists of 5 functions:
* GetHandler returns the CLSID of the component that should be loaded into
the COM client's process. If GetHandler returns a failure code, then no
handler is loaded.
* GetHandlerPayloadSize and WriteHandlerPayload are for obtaining the payload
data. These calls are made on a background thread but need to do their work
on the main thread. We declare the payload struct in IDL. MIDL generates two
functions, IA2Payload_Encode and IA2Payload_Decode, which are used by
mscom::StructToStream to read and write that struct to and from buffers.
* The a11y payload struct also includes an interface, IGeckoBackChannel, that
allows the handler to communicate directly with Gecko. IGeckoBackChannel
currently provides two methods: one to allow the handler to request fresh
cache information, and the other to provide Gecko with its IHandlerControl
interface.
* MarshalAs accepts an IID that specifies the interface that is about to be
proxied. We may want to send a more sophisticated proxy than the one that
is requested. The desired IID is returned by this function. In the case of
a11y interfaces, we should always return IAccessible2_3 if we are asked for
one of its parent interfaces. This allows us to eliminate round trips to
resolve more sophisticated interfaces later on.
* NewInstance, which is needed to ensure that all descendent proxies are also
imbued with the same handler code.
The main focus of this patch is as follows:
1. Provide an implementation of the IHandlerProvider interface;
2. Populate the handler payload (ie, the cache) with data;
3. Modify CreateHolderFromAccessible to specify the HandlerPayload object;
4. Receive the IHandlerControl interface from the handler DLL and move it
into the chrome process.
Some more information about IHandlerControl:
There is one IHandlerControl per handler DLL instance. It is the interface that
we call in Gecko when we need to dispatch an event to the handler. In order to
ensure that events are dispatched in the correct order, we need to dispatch
those events from the chrome main thread so that they occur in sequential order
with calls to NotifyWinEvent.
--HG--
extra : rebase_source : acb44dead7cc5488424720e1bf58862b7b30374f
2017-04-05 00:23:55 +03:00
|
|
|
async A11yHandlerControl(uint32_t aPid,
|
|
|
|
IHandlerControlHolder aHandlerControl);
|
2016-10-27 21:40:50 +03:00
|
|
|
|
2017-01-27 03:35:54 +03:00
|
|
|
async AddMemoryReport(MemoryReport aReport);
|
|
|
|
async FinishMemoryReport(uint32_t aGeneration);
|
|
|
|
|
2017-06-06 20:39:46 +03:00
|
|
|
async MaybeReloadPlugins();
|
2017-07-20 19:49:28 +03:00
|
|
|
|
|
|
|
async BHRThreadHang(HangDetails aHangDetails);
|
2018-03-20 22:07:41 +03:00
|
|
|
|
2018-07-05 17:32:03 +03:00
|
|
|
async AddPerformanceMetrics(nsID aID, PerformanceInfo[] aMetrics);
|
2018-07-10 11:09:59 +03:00
|
|
|
|
2019-08-15 00:00:51 +03:00
|
|
|
/*
|
|
|
|
* Determines whether storage access can be granted automatically by the
|
|
|
|
* storage access API without showing a user prompt.
|
|
|
|
*/
|
|
|
|
async AutomaticStorageAccessCanBeGranted(Principal aPrincipal)
|
|
|
|
returns (bool success);
|
|
|
|
|
2018-07-10 11:09:59 +03:00
|
|
|
/*
|
2018-07-13 13:02:19 +03:00
|
|
|
* A 3rd party tracking origin (aTrackingOrigin) has received the permission
|
|
|
|
* granted to have access to aGrantedOrigin when loaded by aParentPrincipal.
|
2018-07-10 11:09:59 +03:00
|
|
|
*/
|
2018-07-13 13:02:19 +03:00
|
|
|
async FirstPartyStorageAccessGrantedForOrigin(Principal aParentPrincipal,
|
2018-11-27 00:23:16 +03:00
|
|
|
Principal aTrackingPrincipal,
|
2018-07-13 13:02:19 +03:00
|
|
|
nsCString aTrackingOrigin,
|
2018-11-27 00:23:16 +03:00
|
|
|
nsCString aGrantedOrigin,
|
2018-12-17 19:19:43 +03:00
|
|
|
int aAllowMode)
|
2018-07-19 23:19:59 +03:00
|
|
|
returns (bool unused);
|
2018-07-10 11:09:59 +03:00
|
|
|
|
2018-09-24 13:54:54 +03:00
|
|
|
async StoreUserInteractionAsPermission(Principal aPrincipal);
|
|
|
|
|
2019-08-08 23:01:19 +03:00
|
|
|
/**
|
|
|
|
* When media started or stopped in content process, we have to notify the
|
|
|
|
* chrome process in order to know which tab is playing media.
|
|
|
|
*/
|
|
|
|
async NotifyMediaActiveChanged(BrowsingContext aContext, bool aActive);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* When media became audible or inaudible in content process, we have to
|
|
|
|
* notify chrome process in order to which tab is audible.
|
|
|
|
*/
|
|
|
|
async NotifyMediaAudibleChanged(BrowsingContext aContext, bool aAudible);
|
|
|
|
|
2019-03-06 00:11:48 +03:00
|
|
|
both:
|
2019-08-27 20:37:55 +03:00
|
|
|
async ScriptError(nsString message, nsString sourceName, nsString sourceLine,
|
|
|
|
uint32_t lineNumber, uint32_t colNumber, uint32_t flags,
|
|
|
|
nsCString category, bool privateWindow, uint64_t innerWindowId,
|
|
|
|
bool fromChromeContext);
|
|
|
|
|
2019-03-06 00:11:48 +03:00
|
|
|
async CommitBrowsingContextTransaction(BrowsingContext aContext,
|
2019-03-27 12:19:29 +03:00
|
|
|
BrowsingContextTransaction aTransaction,
|
2019-08-09 17:51:30 +03:00
|
|
|
uint64_t aEpoch);
|
2019-03-06 00:11:48 +03:00
|
|
|
|
|
|
|
async AsyncMessage(nsString aMessage, CpowEntry[] aCpows,
|
|
|
|
Principal aPrincipal, ClonedMessageData aData);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Notify `push-subscription-modified` observers in the parent and child.
|
|
|
|
*/
|
|
|
|
async NotifyPushSubscriptionModifiedObservers(nsCString scope,
|
|
|
|
Principal principal);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Send a Push error message to all service worker clients in the parent or
|
|
|
|
* child.
|
|
|
|
*/
|
|
|
|
async PushError(nsCString scope, Principal principal, nsString message,
|
|
|
|
uint32_t flags);
|
|
|
|
|
2019-03-14 21:50:38 +03:00
|
|
|
/**
|
|
|
|
* Sync the BrowsingContext with id 'aContextId' and name 'aName' to the
|
|
|
|
* parent, and attach it to the BrowsingContext 'aParentContext'. If
|
|
|
|
* 'aParentContext' is 'nullptr' the BrowsingContext is a root in the
|
|
|
|
* BrowsingContext tree. AttachBrowsingContext must only be called at most
|
|
|
|
* once for any child BrowsingContext, and only for BrowsingContexts where
|
|
|
|
* the parent and the child context contains their nsDocShell.
|
|
|
|
*/
|
2019-03-14 21:51:09 +03:00
|
|
|
async AttachBrowsingContext(BrowsingContextInitializer aInit);
|
2019-03-14 21:50:38 +03:00
|
|
|
|
|
|
|
/**
|
2019-07-15 23:44:50 +03:00
|
|
|
* Remove the synced BrowsingContext with id 'aContextId' from the parent.
|
2019-03-14 21:50:38 +03:00
|
|
|
* DetachBrowsingContext is only needed to be called once for any
|
|
|
|
* BrowsingContext, since detaching a node in the BrowsingContext detaches
|
|
|
|
* the entire sub-tree rooted at that node. Calling DetachBrowsingContext
|
|
|
|
* with an already detached BrowsingContext effectively does nothing. Note
|
|
|
|
* that it is not an error to call DetachBrowsingContext on a
|
2019-07-15 23:44:50 +03:00
|
|
|
* BrowsingContext belonging to an already detached subtree.
|
|
|
|
*
|
|
|
|
* As the passed-in context is allowed to already be detached, it is passed
|
|
|
|
* by id, rather than using BrowsingContext's serializer.
|
|
|
|
*
|
|
|
|
* Callers should keep the BrowsingContext alive until this async request is
|
|
|
|
* resolved or rejected, in order to ensure that in-flight messages still
|
|
|
|
* have valid targets.
|
2019-03-14 21:50:38 +03:00
|
|
|
*/
|
2019-07-15 23:44:50 +03:00
|
|
|
async DetachBrowsingContext(uint64_t aContextId) returns (bool unused);
|
2019-04-29 14:38:45 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Removes all of 'aContext'\'s children, and caches them in the
|
|
|
|
* BrowsingContextGroup.
|
|
|
|
*/
|
|
|
|
async CacheBrowsingContextChildren(BrowsingContext aContext);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Re-attach all BrowsingContexts in a 'aContext'.
|
|
|
|
*/
|
|
|
|
async RestoreBrowsingContextChildren(BrowsingContext aContext,
|
2019-05-28 10:40:00 +03:00
|
|
|
BrowsingContext[] aChildren);
|
2019-03-14 21:50:38 +03:00
|
|
|
|
2019-02-14 00:02:55 +03:00
|
|
|
async WindowClose(BrowsingContext aContext, bool aTrustedCaller);
|
|
|
|
async WindowFocus(BrowsingContext aContext);
|
|
|
|
async WindowBlur(BrowsingContext aContext);
|
|
|
|
async WindowPostMessage(BrowsingContext aContext, ClonedMessageData aMessage,
|
2019-01-02 16:29:18 +03:00
|
|
|
PostMessageData aData);
|
2009-07-11 10:33:10 +04:00
|
|
|
};
|
|
|
|
|
2009-09-10 02:00:14 +04:00
|
|
|
}
|
2019-03-01 00:20:40 +03:00
|
|
|
}
|