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-19 01:49:53 +04:00
|
|
|
include protocol PAsmJSCacheEntry;
|
2013-11-27 11:59:41 +04:00
|
|
|
include protocol PBackground;
|
2012-08-02 10:02:29 +04:00
|
|
|
include protocol PBlob;
|
2012-09-13 20:37:14 +04:00
|
|
|
include protocol PBluetooth;
|
2010-07-19 22:33:33 +04:00
|
|
|
include protocol PBrowser;
|
2012-07-18 03:59:45 +04:00
|
|
|
include protocol PCompositor;
|
2014-06-11 09:44:13 +04:00
|
|
|
include protocol PContentBridge;
|
2014-05-13 21:13:00 +04:00
|
|
|
include protocol PCycleCollectWithLogs;
|
2010-11-24 17:15:03 +03:00
|
|
|
include protocol PCrashReporter;
|
2010-09-16 02:55:08 +04:00
|
|
|
include protocol PExternalHelperApp;
|
2012-06-20 03:14:39 +04:00
|
|
|
include protocol PDeviceStorageRequest;
|
2014-03-25 22:37:13 +04:00
|
|
|
include protocol PFileDescriptorSet;
|
2013-09-04 02:28:06 +04:00
|
|
|
include protocol PFMRadio;
|
2014-03-05 07:25:40 +04:00
|
|
|
include protocol PFileSystemRequest;
|
2011-10-06 02:15:45 +04:00
|
|
|
include protocol PHal;
|
2012-08-29 16:24:48 +04:00
|
|
|
include protocol PImageBridge;
|
2012-07-14 15:24:20 +04:00
|
|
|
include protocol PIndexedDB;
|
2011-02-16 21:43:23 +03:00
|
|
|
include protocol PMemoryReportRequest;
|
2014-07-01 14:09:08 +04:00
|
|
|
include protocol PMobileConnection;
|
2011-10-06 02:15:45 +04:00
|
|
|
include protocol PNecko;
|
2014-07-14 21:22:26 +04:00
|
|
|
include protocol PScreenManager;
|
2014-05-01 05:52:00 +04:00
|
|
|
include protocol PSharedBufferManager;
|
2011-11-21 02:40:53 +04:00
|
|
|
include protocol PSms;
|
2013-04-04 02:13:17 +04:00
|
|
|
include protocol PSpeechSynthesis;
|
2011-10-06 02:15:45 +04:00
|
|
|
include protocol PStorage;
|
2013-09-07 10:19:50 +04:00
|
|
|
include protocol PTelephony;
|
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;
|
2012-08-23 23:33:46 +04:00
|
|
|
include DOMTypes;
|
2013-07-11 02:05:39 +04:00
|
|
|
include JavaScriptTypes;
|
2013-01-18 00:17:33 +04:00
|
|
|
include InputStreamParams;
|
2013-07-10 21:07:50 +04:00
|
|
|
include PTabContext;
|
2012-08-23 23:33:46 +04:00
|
|
|
include URIParams;
|
2013-06-03 14:14:40 +04:00
|
|
|
include ProtocolTypes;
|
2009-09-10 02:00:14 +04:00
|
|
|
|
2013-10-01 23:25:07 +04:00
|
|
|
using GeoPosition from "nsGeoPositionIPCSerialiser.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";
|
|
|
|
using struct ResourceMapping from "mozilla/chrome/RegistryMessageUtils.h";
|
|
|
|
using struct OverrideMapping from "mozilla/chrome/RegistryMessageUtils.h";
|
|
|
|
using base::ChildPrivileges from "base/process_util.h";
|
|
|
|
using struct IPC::Permission from "mozilla/net/NeckoMessageUtils.h";
|
|
|
|
using class IPC::Principal from "mozilla/dom/PermissionMessageUtils.h";
|
|
|
|
using struct mozilla::null_t from "ipc/IPCMessageUtils.h";
|
|
|
|
using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
|
2013-11-19 01:49:53 +04:00
|
|
|
using mozilla::dom::asmjscache::OpenMode from "mozilla/dom/asmjscache/AsmJSCache.h";
|
2013-12-05 08:32:52 +04:00
|
|
|
using mozilla::dom::asmjscache::WriteParams from "mozilla/dom/asmjscache/AsmJSCache.h";
|
2014-04-10 21:39:20 +04:00
|
|
|
using mozilla::dom::AudioChannel from "mozilla/dom/AudioChannelBinding.h";
|
2013-10-01 23:25:07 +04:00
|
|
|
using mozilla::dom::AudioChannelState from "AudioChannelCommon.h";
|
|
|
|
using mozilla::dom::NativeThreadId from "mozilla/dom/TabMessageUtils.h";
|
|
|
|
using mozilla::hal::ProcessPriority from "mozilla/HalTypes.h";
|
|
|
|
using gfxIntSize from "nsSize.h";
|
2009-09-10 02:00:14 +04:00
|
|
|
|
2014-07-26 00:17:36 +04:00
|
|
|
union ChromeRegistryItem
|
|
|
|
{
|
|
|
|
ChromePackage;
|
|
|
|
OverrideMapping;
|
|
|
|
};
|
|
|
|
|
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
|
|
|
|
2011-01-13 07:04:42 +03:00
|
|
|
struct FontListEntry {
|
2011-09-23 15:15:36 +04:00
|
|
|
nsString familyName;
|
|
|
|
nsString faceName;
|
2011-01-13 07:04:42 +03:00
|
|
|
nsCString filepath;
|
2012-08-22 19:56:38 +04:00
|
|
|
uint16_t weight;
|
|
|
|
int16_t stretch;
|
|
|
|
uint8_t italic;
|
|
|
|
uint8_t index;
|
2014-06-30 22:05:29 +04:00
|
|
|
bool isHidden;
|
2011-01-13 07:04:42 +03:00
|
|
|
};
|
|
|
|
|
2013-01-25 23:05:24 +04:00
|
|
|
struct DeviceStorageFreeSpaceParams
|
2012-07-31 23:28:23 +04:00
|
|
|
{
|
2012-08-31 02:17:37 +04:00
|
|
|
nsString type;
|
2013-05-11 13:10:18 +04:00
|
|
|
nsString storageName;
|
2012-07-31 23:28:23 +04:00
|
|
|
};
|
|
|
|
|
2013-01-25 23:05:24 +04:00
|
|
|
struct DeviceStorageUsedSpaceParams
|
|
|
|
{
|
|
|
|
nsString type;
|
2013-05-11 13:10:18 +04:00
|
|
|
nsString storageName;
|
2013-01-25 23:05:24 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct DeviceStorageAvailableParams
|
|
|
|
{
|
|
|
|
nsString type;
|
2013-05-11 13:10:18 +04:00
|
|
|
nsString storageName;
|
2013-01-25 23:05:24 +04:00
|
|
|
};
|
|
|
|
|
2014-02-19 06:48:05 +04:00
|
|
|
struct DeviceStorageStatusParams
|
|
|
|
{
|
|
|
|
nsString type;
|
|
|
|
nsString storageName;
|
|
|
|
};
|
|
|
|
|
2013-09-06 10:11:58 +04:00
|
|
|
struct DeviceStorageFormatParams
|
|
|
|
{
|
|
|
|
nsString type;
|
|
|
|
nsString storageName;
|
|
|
|
};
|
|
|
|
|
2014-03-04 15:24:19 +04:00
|
|
|
struct DeviceStorageMountParams
|
|
|
|
{
|
|
|
|
nsString type;
|
|
|
|
nsString storageName;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct DeviceStorageUnmountParams
|
|
|
|
{
|
|
|
|
nsString type;
|
|
|
|
nsString storageName;
|
|
|
|
};
|
|
|
|
|
2012-06-20 03:14:39 +04:00
|
|
|
struct DeviceStorageAddParams
|
|
|
|
{
|
2012-08-31 02:17:37 +04:00
|
|
|
nsString type;
|
2013-05-11 13:10:18 +04:00
|
|
|
nsString storageName;
|
2013-04-18 18:13:23 +04:00
|
|
|
nsString relpath;
|
2012-08-10 02:41:18 +04:00
|
|
|
PBlob blob;
|
2012-06-20 03:14:39 +04:00
|
|
|
};
|
|
|
|
|
2014-06-10 12:51:28 +04:00
|
|
|
struct DeviceStorageAppendParams
|
|
|
|
{
|
|
|
|
nsString type;
|
|
|
|
nsString storageName;
|
|
|
|
nsString relpath;
|
|
|
|
PBlob blob;
|
|
|
|
};
|
|
|
|
|
2014-01-17 05:01:27 +04:00
|
|
|
struct DeviceStorageCreateFdParams
|
|
|
|
{
|
|
|
|
nsString type;
|
|
|
|
nsString storageName;
|
|
|
|
nsString relpath;
|
|
|
|
};
|
|
|
|
|
2012-06-20 03:14:39 +04:00
|
|
|
struct DeviceStorageGetParams
|
|
|
|
{
|
2012-08-31 02:17:37 +04:00
|
|
|
nsString type;
|
2013-05-11 13:10:18 +04:00
|
|
|
nsString storageName;
|
2013-04-18 18:13:23 +04:00
|
|
|
nsString rootDir;
|
|
|
|
nsString relpath;
|
2012-06-20 03:14:39 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct DeviceStorageDeleteParams
|
|
|
|
{
|
2012-08-31 02:17:37 +04:00
|
|
|
nsString type;
|
2013-05-11 13:10:18 +04:00
|
|
|
nsString storageName;
|
2013-04-18 18:13:23 +04:00
|
|
|
nsString relpath;
|
2012-06-20 03:14:39 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct DeviceStorageEnumerationParams
|
|
|
|
{
|
2012-08-31 02:17:37 +04:00
|
|
|
nsString type;
|
2013-05-11 13:10:18 +04:00
|
|
|
nsString storageName;
|
|
|
|
nsString rootdir;
|
2012-08-22 19:56:38 +04:00
|
|
|
uint64_t since;
|
2012-06-20 03:14:39 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
union DeviceStorageParams
|
|
|
|
{
|
|
|
|
DeviceStorageAddParams;
|
2014-06-10 12:51:28 +04:00
|
|
|
DeviceStorageAppendParams;
|
2014-01-17 05:01:27 +04:00
|
|
|
DeviceStorageCreateFdParams;
|
2012-06-20 03:14:39 +04:00
|
|
|
DeviceStorageGetParams;
|
|
|
|
DeviceStorageDeleteParams;
|
|
|
|
DeviceStorageEnumerationParams;
|
2013-01-25 23:05:24 +04:00
|
|
|
DeviceStorageFreeSpaceParams;
|
|
|
|
DeviceStorageUsedSpaceParams;
|
|
|
|
DeviceStorageAvailableParams;
|
2014-02-19 06:48:05 +04:00
|
|
|
DeviceStorageStatusParams;
|
2013-09-06 10:11:58 +04:00
|
|
|
DeviceStorageFormatParams;
|
2014-03-04 15:24:19 +04:00
|
|
|
DeviceStorageMountParams;
|
|
|
|
DeviceStorageUnmountParams;
|
2012-06-20 03:14:39 +04:00
|
|
|
};
|
2012-08-02 10:02:29 +04:00
|
|
|
|
2013-09-04 02:28:06 +04:00
|
|
|
struct FMRadioRequestEnableParams
|
|
|
|
{
|
|
|
|
double frequency;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct FMRadioRequestDisableParams
|
|
|
|
{
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
struct FMRadioRequestSetFrequencyParams
|
|
|
|
{
|
|
|
|
double frequency;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct FMRadioRequestSeekParams
|
|
|
|
{
|
|
|
|
bool upward;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct FMRadioRequestCancelSeekParams
|
|
|
|
{
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
union FMRadioRequestParams
|
|
|
|
{
|
|
|
|
FMRadioRequestEnableParams;
|
|
|
|
FMRadioRequestDisableParams;
|
|
|
|
FMRadioRequestSetFrequencyParams;
|
|
|
|
FMRadioRequestSeekParams;
|
|
|
|
FMRadioRequestCancelSeekParams;
|
|
|
|
};
|
|
|
|
|
2014-03-05 07:25:40 +04:00
|
|
|
struct FileSystemCreateDirectoryParams
|
|
|
|
{
|
|
|
|
nsString filesystem;
|
|
|
|
nsString realPath;
|
|
|
|
};
|
|
|
|
|
2014-03-05 12:40:48 +04:00
|
|
|
union FileSystemFileDataValue
|
|
|
|
{
|
|
|
|
uint8_t[];
|
|
|
|
PBlob;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct FileSystemCreateFileParams
|
|
|
|
{
|
|
|
|
nsString filesystem;
|
|
|
|
nsString realPath;
|
|
|
|
FileSystemFileDataValue data;
|
|
|
|
bool replace;
|
|
|
|
};
|
|
|
|
|
2014-03-05 07:25:40 +04:00
|
|
|
struct FileSystemGetFileOrDirectoryParams
|
|
|
|
{
|
|
|
|
nsString filesystem;
|
|
|
|
nsString realPath;
|
|
|
|
};
|
|
|
|
|
2014-03-12 10:30:21 +04:00
|
|
|
union FileSystemPathOrFileValue
|
|
|
|
{
|
|
|
|
nsString;
|
|
|
|
PBlob;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct FileSystemRemoveParams
|
|
|
|
{
|
|
|
|
nsString filesystem;
|
|
|
|
nsString directory;
|
|
|
|
FileSystemPathOrFileValue target;
|
|
|
|
bool recursive;
|
|
|
|
};
|
|
|
|
|
2014-03-05 07:25:40 +04:00
|
|
|
union FileSystemParams
|
|
|
|
{
|
|
|
|
FileSystemCreateDirectoryParams;
|
2014-03-05 12:40:48 +04:00
|
|
|
FileSystemCreateFileParams;
|
2014-03-05 07:25:40 +04:00
|
|
|
FileSystemGetFileOrDirectoryParams;
|
2014-03-12 10:30:21 +04:00
|
|
|
FileSystemRemoveParams;
|
2014-03-05 07:25:40 +04:00
|
|
|
};
|
|
|
|
|
2012-08-23 00:00:21 +04:00
|
|
|
union PrefValue {
|
|
|
|
nsCString;
|
|
|
|
int32_t;
|
|
|
|
bool;
|
|
|
|
};
|
|
|
|
|
|
|
|
union MaybePrefValue {
|
|
|
|
PrefValue;
|
|
|
|
null_t;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct PrefSetting {
|
|
|
|
nsCString name;
|
|
|
|
MaybePrefValue defaultValue;
|
|
|
|
MaybePrefValue userValue;
|
|
|
|
};
|
|
|
|
|
2014-06-03 18:36:46 +04:00
|
|
|
struct DataStoreSetting {
|
|
|
|
nsString name;
|
|
|
|
nsString originURL;
|
|
|
|
nsString manifestURL;
|
|
|
|
bool readOnly;
|
|
|
|
bool enabled;
|
|
|
|
};
|
|
|
|
|
2013-10-01 04:27:45 +04:00
|
|
|
intr protocol PContent
|
2009-07-11 10:33:10 +04:00
|
|
|
{
|
2012-07-18 03:59:45 +04:00
|
|
|
parent opens PCompositor;
|
2014-05-01 05:52:00 +04:00
|
|
|
parent opens PSharedBufferManager;
|
2012-08-29 16:24:48 +04:00
|
|
|
parent opens PImageBridge;
|
2013-11-27 11:59:41 +04:00
|
|
|
child opens PBackground;
|
2012-07-18 03:59:45 +04:00
|
|
|
|
2013-11-19 01:49:53 +04:00
|
|
|
manages PAsmJSCacheEntry;
|
2012-08-02 10:02:29 +04:00
|
|
|
manages PBlob;
|
2012-09-13 20:37:14 +04:00
|
|
|
manages PBluetooth;
|
2010-07-19 22:33:33 +04:00
|
|
|
manages PBrowser;
|
2010-11-24 17:15:03 +03:00
|
|
|
manages PCrashReporter;
|
2014-05-13 21:13:00 +04:00
|
|
|
manages PCycleCollectWithLogs;
|
2012-06-20 03:14:39 +04:00
|
|
|
manages PDeviceStorageRequest;
|
2014-03-05 07:25:40 +04:00
|
|
|
manages PFileSystemRequest;
|
2010-09-16 02:55:08 +04:00
|
|
|
manages PExternalHelperApp;
|
2014-03-25 22:37:13 +04:00
|
|
|
manages PFileDescriptorSet;
|
2013-09-04 02:28:06 +04:00
|
|
|
manages PFMRadio;
|
2011-10-06 02:15:45 +04:00
|
|
|
manages PHal;
|
2012-07-14 15:24:20 +04:00
|
|
|
manages PIndexedDB;
|
2011-02-16 21:43:23 +03:00
|
|
|
manages PMemoryReportRequest;
|
2014-07-01 14:09:08 +04:00
|
|
|
manages PMobileConnection;
|
2011-10-06 02:15:45 +04:00
|
|
|
manages PNecko;
|
2014-07-14 21:22:26 +04:00
|
|
|
manages PScreenManager;
|
2011-11-21 02:40:53 +04:00
|
|
|
manages PSms;
|
2013-04-04 02:13:17 +04:00
|
|
|
manages PSpeechSynthesis;
|
2011-10-06 02:15:45 +04:00
|
|
|
manages PStorage;
|
2013-09-07 10:19:50 +04:00
|
|
|
manages PTelephony;
|
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;
|
2009-08-26 03:07:22 +04:00
|
|
|
|
2012-06-13 02:01:25 +04:00
|
|
|
both:
|
|
|
|
// 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
|
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
|
|
|
// TabChild::BrowserFrameProvideWindow (which happens when the child's
|
|
|
|
// content calls window.open()), and the parent creates the PBrowser as part
|
2013-06-21 02:54:01 +04:00
|
|
|
// of ContentParent::CreateBrowserOrApp.
|
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
|
|
|
//
|
|
|
|
// When the parent constructs a PBrowser, the child trusts the app token it
|
|
|
|
// receives from the parent. In that case, context can be any of the
|
|
|
|
// IPCTabContext subtypes.
|
|
|
|
//
|
|
|
|
// When the child constructs a PBrowser, the parent doesn't trust the app
|
|
|
|
// token it receives from the child. In this case, context must have type
|
|
|
|
// PopupIPCTabContext. The browser created using a PopupIPCTabContext has
|
|
|
|
// the opener PBrowser's app-id and containing-app-id. The parent checks
|
|
|
|
// that if the opener is a browser element, the context is also for a
|
|
|
|
// browser element.
|
2012-08-09 06:58:06 +04:00
|
|
|
//
|
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
|
|
|
// This allows the parent to prevent a malicious child from escalating its
|
|
|
|
// privileges by requesting a PBrowser corresponding to a highly-privileged
|
|
|
|
// app; the child can only request privileges for an app which the child has
|
|
|
|
// access to (in the form of a TabChild).
|
2014-06-04 01:15:27 +04:00
|
|
|
//
|
|
|
|
// Keep the last 3 attributes in sync with GetProcessAttributes!
|
|
|
|
async PBrowser(IPCTabContext context, uint32_t chromeFlags,
|
|
|
|
uint64_t id, bool isForApp, bool isForBrowser);
|
2009-08-26 03:07:22 +04:00
|
|
|
|
2012-08-02 10:02:29 +04:00
|
|
|
async PBlob(BlobConstructorParams params);
|
|
|
|
|
2014-03-25 22:37:28 +04:00
|
|
|
PFileDescriptorSet(FileDescriptor fd);
|
|
|
|
|
2012-06-13 02:01:25 +04:00
|
|
|
child:
|
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
|
|
|
*/
|
2014-03-13 02:48:15 +04:00
|
|
|
async SetProcessSandbox();
|
2013-01-18 00:06:36 +04:00
|
|
|
|
2014-05-21 10:06:54 +04:00
|
|
|
PMemoryReportRequest(uint32_t generation, bool anonymize,
|
2014-07-03 02:59:02 +04:00
|
|
|
bool minimizeMemoryUsage, FileDescriptor DMDFile);
|
2011-02-16 21:43:23 +03:00
|
|
|
|
2012-12-06 07:01:58 +04:00
|
|
|
/**
|
|
|
|
* Notify the AudioChannelService in the child processes.
|
|
|
|
*/
|
|
|
|
async AudioChannelNotify();
|
|
|
|
|
2013-11-25 03:50:03 +04:00
|
|
|
async SpeakerManagerNotify();
|
|
|
|
|
2014-06-03 18:36:46 +04:00
|
|
|
async DataStoreNotify(uint32_t aAppId, nsString aName,
|
|
|
|
nsString aManifestURL);
|
|
|
|
|
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
|
|
|
*/
|
2014-05-13 21:13:00 +04:00
|
|
|
PCycleCollectWithLogs(bool dumpAllTraces,
|
|
|
|
FileDescriptor gcLog,
|
|
|
|
FileDescriptor ccLog);
|
2012-10-16 06:12:14 +04:00
|
|
|
|
2009-09-10 02:00:14 +04:00
|
|
|
PTestShell();
|
2009-08-26 03:07:22 +04:00
|
|
|
|
2010-03-11 08:33:00 +03:00
|
|
|
RegisterChrome(ChromePackage[] packages, ResourceMapping[] resources,
|
2014-07-26 00:17:36 +04:00
|
|
|
OverrideMapping[] overrides, nsCString locale, bool reset);
|
|
|
|
RegisterChromeItem(ChromeRegistryItem item);
|
2010-03-11 08:33:00 +03:00
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
async SetOffline(bool offline);
|
2010-05-11 16:44:12 +04:00
|
|
|
|
2012-08-23 23:33:46 +04:00
|
|
|
async NotifyVisited(URIParams uri);
|
2010-07-02 19:50:41 +04:00
|
|
|
|
2014-05-21 09:49:36 +04:00
|
|
|
async SystemMemoryAvailable(uint64_t getterId, uint32_t memoryAvailable);
|
|
|
|
|
2012-08-23 00:00:21 +04:00
|
|
|
PreferenceUpdate(PrefSetting pref);
|
2010-05-26 04:13:47 +04:00
|
|
|
|
2010-09-15 20:44:57 +04:00
|
|
|
NotifyAlertsObserver(nsCString topic, nsString data);
|
|
|
|
|
2010-09-21 08:16:37 +04:00
|
|
|
GeolocationUpdate(GeoPosition somewhere);
|
|
|
|
|
2010-10-09 22:07:38 +04:00
|
|
|
// nsIPermissionManager messages
|
|
|
|
AddPermission(Permission permission);
|
|
|
|
|
2010-11-24 21:22:40 +03:00
|
|
|
ScreenSizeChanged(gfxIntSize size);
|
|
|
|
|
2010-12-12 01:36:08 +03:00
|
|
|
FlushMemory(nsString reason);
|
|
|
|
|
2011-09-13 21:53:51 +04:00
|
|
|
GarbageCollect();
|
|
|
|
CycleCollect();
|
|
|
|
|
2011-07-21 08:37:32 +04:00
|
|
|
/**
|
|
|
|
* Start accessibility engine in content process.
|
|
|
|
*/
|
|
|
|
ActivateA11y();
|
|
|
|
|
2013-04-22 20:41:59 +04:00
|
|
|
AppInfo(nsCString version, nsCString buildID, nsCString name, nsCString UAName);
|
2011-10-05 00:31:00 +04:00
|
|
|
|
2012-04-20 04:13:20 +04:00
|
|
|
// Notify child that last-pb-context-exited notification was observed
|
|
|
|
LastPrivateDocShellDestroyed();
|
|
|
|
|
2013-05-11 13:10:18 +04:00
|
|
|
FilePathUpdate(nsString storageType, nsString storageName, nsString filepath,
|
|
|
|
nsCString reasons);
|
2012-08-02 10:32:04 +04:00
|
|
|
|
2012-12-15 04:01:34 +04:00
|
|
|
FileSystemUpdate(nsString fsName, nsString mountPoint, int32_t fsState,
|
2013-08-23 03:12:25 +04:00
|
|
|
int32_t mountGeneration, bool isMediaPresent,
|
2014-05-14 02:48:04 +04:00
|
|
|
bool isSharing, bool isFormatting, bool isFake);
|
2012-08-04 03:48:58 +04:00
|
|
|
|
2013-06-03 14:14:40 +04:00
|
|
|
// Ask the Nuwa process to create a new child process.
|
|
|
|
NuwaFork();
|
|
|
|
|
2013-04-26 04:53:26 +04:00
|
|
|
NotifyProcessPriorityChanged(ProcessPriority priority);
|
|
|
|
MinimizeMemoryUsage();
|
|
|
|
|
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-09-13 12:51:45 +04:00
|
|
|
NotifyPhoneStateChange(nsString newState);
|
2013-12-13 20:28:46 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Notify idle observers in the child
|
|
|
|
*/
|
|
|
|
NotifyIdleObserver(uint64_t observerId, nsCString topic, nsString str);
|
2014-08-29 04:20:27 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Notify windows in the child to apply a new app style.
|
|
|
|
*/
|
|
|
|
OnAppThemeChanged();
|
|
|
|
|
2009-08-18 23:05:15 +04:00
|
|
|
parent:
|
2012-09-05 04:36:16 +04:00
|
|
|
/**
|
|
|
|
* Tell the content process some attributes of itself. This is
|
|
|
|
* among the first information queried by content processes after
|
|
|
|
* startup. (The message is sync to allow the content process to
|
|
|
|
* control when it receives the information.)
|
|
|
|
*
|
|
|
|
* |id| is a unique ID among all subprocesses. When |isForApp &&
|
|
|
|
* isForBrowser|, we're loading <browser> for an app. When
|
|
|
|
* |isForBrowser|, we're loading <browser>. When |!isForApp &&
|
|
|
|
* !isForBrowser|, we're probably loading <xul:browser remote>.
|
2014-06-04 01:15:27 +04:00
|
|
|
*
|
|
|
|
* Keep the return values in sync with PBrowser()!
|
2012-09-05 04:36:16 +04:00
|
|
|
*/
|
|
|
|
sync GetProcessAttributes()
|
2013-01-27 01:14:01 +04:00
|
|
|
returns (uint64_t id, bool isForApp, bool isForBrowser);
|
2012-11-09 01:09:39 +04:00
|
|
|
sync GetXPCOMProcessAttributes()
|
2014-07-25 01:07:53 +04:00
|
|
|
returns (bool isOffline);
|
2012-09-05 04:36:16 +04:00
|
|
|
|
2014-06-11 09:44:13 +04:00
|
|
|
sync CreateChildProcess(IPCTabContext context,
|
|
|
|
ProcessPriority priority)
|
|
|
|
returns (uint64_t id, bool isForApp, bool isForBrowser);
|
|
|
|
intr BridgeToChildProcess(uint64_t id);
|
|
|
|
|
2014-05-09 02:43:53 +04:00
|
|
|
async PJavaScript();
|
|
|
|
|
2014-07-02 02:24:27 +04:00
|
|
|
sync PRemoteSpellcheckEngine();
|
2012-06-20 03:14:39 +04:00
|
|
|
PDeviceStorageRequest(DeviceStorageParams params);
|
|
|
|
|
2014-03-05 07:25:40 +04:00
|
|
|
PFileSystemRequest(FileSystemParams params);
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
sync PCrashReporter(NativeThreadId tid, uint32_t processType);
|
2011-06-08 23:56:31 +04:00
|
|
|
|
2013-02-28 00:31:19 +04:00
|
|
|
sync GetRandomValues(uint32_t length)
|
|
|
|
returns (uint8_t[] randomValues);
|
|
|
|
|
2014-05-21 09:49:36 +04:00
|
|
|
async GetSystemMemory(uint64_t getterId);
|
|
|
|
|
2014-07-22 16:17:45 +04:00
|
|
|
sync IsSecureURI(uint32_t type, URIParams uri, uint32_t flags)
|
|
|
|
returns (bool isSecureURI);
|
|
|
|
|
2011-10-06 02:15:45 +04:00
|
|
|
PHal();
|
|
|
|
|
2012-07-14 15:24:20 +04:00
|
|
|
PIndexedDB();
|
|
|
|
|
2014-07-01 14:09:08 +04:00
|
|
|
PMobileConnection(uint32_t clientId);
|
|
|
|
|
2011-10-06 02:15:45 +04:00
|
|
|
PNecko();
|
2011-11-21 02:40:53 +04:00
|
|
|
|
2014-08-06 08:45:41 +04:00
|
|
|
rpc PScreenManager()
|
2014-07-14 21:22:26 +04:00
|
|
|
returns (uint32_t numberOfScreens,
|
|
|
|
float systemDefaultScale,
|
|
|
|
bool success);
|
|
|
|
|
2011-11-21 02:40:53 +04:00
|
|
|
PSms();
|
2013-04-04 02:13:17 +04:00
|
|
|
|
|
|
|
PSpeechSynthesis();
|
2013-04-10 16:18:38 +04:00
|
|
|
|
2013-04-15 16:38:48 +04:00
|
|
|
PStorage();
|
2011-10-06 02:15:45 +04:00
|
|
|
|
2013-09-07 10:19:50 +04:00
|
|
|
PTelephony();
|
|
|
|
|
2012-09-13 20:37:14 +04:00
|
|
|
PBluetooth();
|
|
|
|
|
2013-09-04 02:28:06 +04:00
|
|
|
PFMRadio();
|
|
|
|
|
2013-12-05 08:32:52 +04:00
|
|
|
PAsmJSCacheEntry(OpenMode openMode, WriteParams write, Principal principal);
|
2013-11-19 01:49:53 +04:00
|
|
|
|
2010-07-15 18:04:25 +04:00
|
|
|
// Services remoting
|
|
|
|
|
2012-08-23 23:33:46 +04:00
|
|
|
async StartVisitedQuery(URIParams uri);
|
|
|
|
async VisitURI(URIParams uri, OptionalURIParams referrer, uint32_t flags);
|
|
|
|
async SetURITitle(URIParams uri, nsString title);
|
2010-07-02 19:50:41 +04:00
|
|
|
|
2012-08-23 23:33:46 +04:00
|
|
|
async LoadURIExternal(URIParams uri);
|
2010-08-10 21:14:45 +04:00
|
|
|
|
2010-10-20 00:35:08 +04:00
|
|
|
// PrefService message
|
2012-08-23 00:00:21 +04:00
|
|
|
sync ReadPrefsArray() returns (PrefSetting[] prefs);
|
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)
|
2010-08-31 22:58:35 +04:00
|
|
|
returns (nsString[] retval);
|
|
|
|
|
2013-11-06 21:21:15 +04:00
|
|
|
rpc RpcMessage(nsString aMessage, ClonedMessageData aData,
|
|
|
|
CpowEntry[] aCpows, Principal aPrincipal)
|
2013-10-01 20:15:06 +04:00
|
|
|
returns (nsString[] retval);
|
|
|
|
|
2013-03-18 17:24:53 +04:00
|
|
|
ShowAlertNotification(nsString imageUrl,
|
|
|
|
nsString title,
|
|
|
|
nsString text,
|
2011-09-29 10:19:26 +04:00
|
|
|
bool textClickable,
|
2010-09-15 20:44:57 +04:00
|
|
|
nsString cookie,
|
2013-03-18 17:24:53 +04:00
|
|
|
nsString name,
|
|
|
|
nsString bidi,
|
2013-11-12 03:56:21 +04:00
|
|
|
nsString lang,
|
2014-08-21 04:56:12 +04:00
|
|
|
nsString data,
|
2013-11-12 03:56:21 +04:00
|
|
|
Principal principal);
|
2013-03-18 17:24:53 +04:00
|
|
|
|
2013-11-12 03:56:21 +04:00
|
|
|
CloseAlert(nsString name, Principal principal);
|
2010-09-15 20:44:57 +04:00
|
|
|
|
2014-02-14 02:43:58 +04:00
|
|
|
PExternalHelperApp(OptionalURIParams uri,
|
|
|
|
nsCString aMimeContentType,
|
|
|
|
nsCString aContentDisposition,
|
|
|
|
uint32_t aContentDispositionHint,
|
|
|
|
nsString aContentDispositionFilename,
|
|
|
|
bool aForceSave,
|
|
|
|
int64_t aContentLength,
|
|
|
|
OptionalURIParams aReferrer,
|
2013-09-12 23:24:10 +04:00
|
|
|
nullable PBrowser aBrowser);
|
2012-08-23 23:33:46 +04:00
|
|
|
|
2013-02-26 21:27:31 +04:00
|
|
|
AddGeolocationListener(Principal principal, bool highAccuracy);
|
2010-11-05 20:43:13 +03:00
|
|
|
RemoveGeolocationListener();
|
2012-12-31 20:36:46 +04:00
|
|
|
SetGeolocationHigherAccuracy(bool enable);
|
2010-09-16 02:55:08 +04:00
|
|
|
|
2010-09-24 05:39:32 +04:00
|
|
|
ConsoleMessage(nsString message);
|
|
|
|
ScriptError(nsString message, nsString sourceName, nsString sourceLine,
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t lineNumber, uint32_t colNumber, uint32_t flags,
|
2010-09-24 05:39:32 +04:00
|
|
|
nsCString category);
|
|
|
|
|
2010-10-09 22:07:38 +04:00
|
|
|
// nsIPermissionManager messages
|
|
|
|
sync ReadPermissions() returns (Permission[] permissions);
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
SetClipboardText(nsString text, bool isPrivateData, int32_t whichClipboard);
|
|
|
|
sync GetClipboardText(int32_t whichClipboard)
|
2011-03-01 08:36:43 +03:00
|
|
|
returns (nsString text);
|
2014-02-10 04:13:10 +04:00
|
|
|
EmptyClipboard(int32_t whichClipboard);
|
|
|
|
sync ClipboardHasText(int32_t whichClipboard)
|
2011-09-29 10:19:26 +04:00
|
|
|
returns (bool hasText);
|
2011-03-01 08:36:43 +03:00
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
sync GetSystemColors(uint32_t colorsCount)
|
|
|
|
returns (uint32_t[] colors);
|
2011-03-30 22:04:41 +04:00
|
|
|
|
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
|
|
|
|
PrivateDocShellsExist(bool aExist);
|
|
|
|
|
2012-10-09 08:46:19 +04:00
|
|
|
// Tell the parent that the child has gone idle for the first time
|
|
|
|
async FirstIdle();
|
|
|
|
|
2012-12-06 07:01:58 +04:00
|
|
|
// Get Muted from the main AudioChannelService.
|
2014-04-10 21:39:20 +04:00
|
|
|
sync AudioChannelGetState(AudioChannel aChannel, bool aElementHidden,
|
2013-01-09 11:18:16 +04:00
|
|
|
bool aElementWasHidden)
|
2013-09-02 13:45:44 +04:00
|
|
|
returns (AudioChannelState value);
|
2012-12-06 07:01:58 +04:00
|
|
|
|
2014-04-10 21:39:20 +04:00
|
|
|
sync AudioChannelRegisterType(AudioChannel aChannel, bool aWithVideo);
|
|
|
|
sync AudioChannelUnregisterType(AudioChannel aChannel,
|
2013-09-18 07:46:22 +04:00
|
|
|
bool aElementHidden,
|
|
|
|
bool aWithVideo);
|
2013-01-09 11:18:16 +04:00
|
|
|
|
|
|
|
async AudioChannelChangedNotification();
|
2014-04-10 21:39:20 +04:00
|
|
|
async AudioChannelChangeDefVolChannel(int32_t aChannel, bool aHidden);
|
2012-12-06 07:01:58 +04:00
|
|
|
|
2014-07-17 07:53:23 +04:00
|
|
|
sync DataStoreGetStores(nsString aName, nsString aOwner, Principal aPrincipal)
|
2014-06-03 18:36:46 +04:00
|
|
|
returns (DataStoreSetting[] dataStores);
|
|
|
|
|
2013-01-09 19:03:28 +04:00
|
|
|
async FilePathUpdateNotify(nsString aType,
|
2013-05-11 13:10:18 +04:00
|
|
|
nsString aStorageName,
|
2013-01-09 19:03:28 +04:00
|
|
|
nsString aFilepath,
|
|
|
|
nsCString aReason);
|
2012-12-15 04:01:34 +04:00
|
|
|
// get nsIVolumeService to broadcast volume information
|
|
|
|
async BroadcastVolume(nsString volumeName);
|
|
|
|
|
2013-02-15 00:41:30 +04:00
|
|
|
// Notify the parent that the child has finished handling a system message.
|
|
|
|
async SystemMessageHandled();
|
|
|
|
|
2013-06-03 14:14:40 +04:00
|
|
|
NuwaReady();
|
|
|
|
|
|
|
|
sync AddNewProcess(uint32_t pid, ProtocolFdMapping[] aFds);
|
|
|
|
|
2013-07-09 10:37:47 +04:00
|
|
|
// called by the child (test code only) to propagate volume changes to the parent
|
|
|
|
async CreateFakeVolume(nsString fsName, nsString mountPoint);
|
|
|
|
async SetFakeVolumeState(nsString fsName, int32_t fsState);
|
|
|
|
|
2013-08-16 21:59:31 +04:00
|
|
|
sync KeywordToURI(nsCString keyword)
|
|
|
|
returns (OptionalInputStreamParams postData, OptionalURIParams uri);
|
|
|
|
|
2014-06-11 09:44:39 +04:00
|
|
|
// Tell the compositor to allocate a layer tree id for nested remote mozbrowsers.
|
|
|
|
sync AllocateLayerTreeId()
|
|
|
|
returns (uint64_t id);
|
|
|
|
async DeallocateLayerTreeId(uint64_t id);
|
|
|
|
|
2013-11-25 03:50:03 +04:00
|
|
|
sync SpeakerManagerForceSpeaker(bool aEnable);
|
|
|
|
|
|
|
|
sync SpeakerManagerGetSpeakerStatus()
|
|
|
|
returns (bool value);
|
|
|
|
|
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);
|
|
|
|
|
2014-01-11 05:09:20 +04:00
|
|
|
sync GetGraphicsFeatureStatus(int32_t aFeature) returns (int32_t aStatus, bool aSuccess);
|
|
|
|
|
2013-12-13 20:28:46 +04:00
|
|
|
AddIdleObserver(uint64_t observerId, uint32_t idleTimeInS);
|
|
|
|
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.
|
|
|
|
*/
|
|
|
|
BackUpXResources(FileDescriptor aXSocketFd);
|
|
|
|
|
2014-06-24 21:11:36 +04:00
|
|
|
sync OpenAnonymousTemporaryFile() returns (FileDescriptor aFD);
|
|
|
|
|
2010-08-31 22:58:35 +04:00
|
|
|
both:
|
2013-11-06 21:21:15 +04:00
|
|
|
AsyncMessage(nsString aMessage, ClonedMessageData aData,
|
|
|
|
CpowEntry[] aCpows, Principal aPrincipal);
|
2009-07-11 10:33:10 +04:00
|
|
|
};
|
|
|
|
|
2009-09-10 02:00:14 +04:00
|
|
|
}
|
2012-08-29 16:24:48 +04:00
|
|
|
}
|