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
|
|
|
|
2010-11-17 07:14:19 +03:00
|
|
|
include protocol PAudio;
|
2012-08-02 10:02:29 +04:00
|
|
|
include protocol PBlob;
|
2010-07-19 22:33:33 +04:00
|
|
|
include protocol PBrowser;
|
2012-07-18 03:59:45 +04:00
|
|
|
include protocol PCompositor;
|
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;
|
2011-10-06 02:15:45 +04:00
|
|
|
include protocol PHal;
|
2012-07-14 15:24:20 +04:00
|
|
|
include protocol PIndexedDB;
|
2011-02-16 21:43:23 +03:00
|
|
|
include protocol PMemoryReportRequest;
|
2011-10-06 02:15:45 +04:00
|
|
|
include protocol PNecko;
|
2011-11-21 02:40:53 +04:00
|
|
|
include protocol PSms;
|
2011-10-06 02:15:45 +04:00
|
|
|
include protocol PStorage;
|
|
|
|
include protocol PTestShell;
|
2009-09-10 02:00:14 +04:00
|
|
|
|
2010-03-11 08:33:00 +03:00
|
|
|
include "mozilla/chrome/RegistryMessageUtils.h";
|
2010-07-15 18:04:25 +04:00
|
|
|
include "mozilla/net/NeckoMessageUtils.h";
|
2011-06-08 23:56:31 +04:00
|
|
|
include "mozilla/dom/TabMessageUtils.h";
|
2010-03-11 08:33:00 +03:00
|
|
|
|
2010-09-21 08:16:37 +04:00
|
|
|
include "nsGeoPositionIPCSerialiser.h";
|
2010-10-20 00:35:08 +04:00
|
|
|
include "PPrefTuple.h";
|
2010-09-21 08:16:37 +04:00
|
|
|
|
2012-08-02 10:02:29 +04:00
|
|
|
include DOMTypes;
|
|
|
|
|
2010-09-21 08:16:37 +04:00
|
|
|
using GeoPosition;
|
2010-10-20 00:35:08 +04:00
|
|
|
using PrefTuple;
|
2010-09-21 08:16:37 +04:00
|
|
|
|
2010-03-11 08:33:00 +03:00
|
|
|
using ChromePackage;
|
|
|
|
using ResourceMapping;
|
|
|
|
using OverrideMapping;
|
2010-07-15 18:04:25 +04:00
|
|
|
using IPC::URI;
|
2010-10-09 22:07:38 +04:00
|
|
|
using IPC::Permission;
|
2010-11-19 04:15:23 +03:00
|
|
|
using mozilla::null_t;
|
2012-08-02 10:02:29 +04:00
|
|
|
using mozilla::void_t;
|
2011-06-08 23:56:31 +04:00
|
|
|
using mozilla::dom::NativeThreadId;
|
2010-11-24 21:22:40 +03:00
|
|
|
using gfxIntSize;
|
2009-09-10 02:00:14 +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
|
|
|
|
2010-11-19 04:15:23 +03:00
|
|
|
// Data required to clone an existing DOMStorageImpl in the parent
|
|
|
|
struct StorageClone
|
|
|
|
{
|
|
|
|
// Existing cross-process storage actor to clone
|
|
|
|
PStorage actor;
|
|
|
|
// Result of calling IsCallerSecure() in the child
|
|
|
|
bool callerSecure;
|
|
|
|
};
|
|
|
|
|
|
|
|
// When creating a new PStorage protocol, an existing one can be
|
|
|
|
// cloned (see nsDOMStorage2::Clone)
|
|
|
|
union StorageConstructData
|
|
|
|
{
|
|
|
|
null_t;
|
|
|
|
StorageClone;
|
|
|
|
};
|
|
|
|
|
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;
|
2011-09-23 15:15:36 +04:00
|
|
|
PRUint16 weight;
|
|
|
|
PRInt16 stretch;
|
|
|
|
PRUint8 italic;
|
|
|
|
PRUint8 index;
|
2011-01-13 07:04:42 +03:00
|
|
|
};
|
|
|
|
|
2012-06-20 03:14:39 +04:00
|
|
|
struct DeviceStorageAddParams
|
|
|
|
{
|
|
|
|
nsString fullpath;
|
|
|
|
PRUint8[] bits;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct DeviceStorageGetParams
|
|
|
|
{
|
|
|
|
nsString fullpath;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct DeviceStorageDeleteParams
|
|
|
|
{
|
|
|
|
nsString fullpath;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct DeviceStorageEnumerationParams
|
|
|
|
{
|
|
|
|
nsString fullpath;
|
|
|
|
PRUint32 since;
|
|
|
|
};
|
|
|
|
|
|
|
|
union DeviceStorageParams
|
|
|
|
{
|
|
|
|
DeviceStorageAddParams;
|
|
|
|
DeviceStorageGetParams;
|
|
|
|
DeviceStorageDeleteParams;
|
|
|
|
DeviceStorageEnumerationParams;
|
|
|
|
};
|
2012-08-02 10:02:29 +04:00
|
|
|
|
|
|
|
struct NormalBlobConstructorParams
|
|
|
|
{
|
|
|
|
nsString contentType;
|
|
|
|
uint64_t length;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct FileBlobConstructorParams
|
|
|
|
{
|
|
|
|
nsString name;
|
|
|
|
nsString contentType;
|
|
|
|
uint64_t length;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct SlicedBlobConstructorParams
|
|
|
|
{
|
|
|
|
PBlob source;
|
|
|
|
uint64_t begin;
|
|
|
|
uint64_t end;
|
|
|
|
nsString contentType;
|
|
|
|
};
|
|
|
|
|
|
|
|
union BlobConstructorParams
|
|
|
|
{
|
|
|
|
NormalBlobConstructorParams;
|
|
|
|
FileBlobConstructorParams;
|
|
|
|
SlicedBlobConstructorParams;
|
|
|
|
};
|
|
|
|
|
2010-07-19 22:33:33 +04:00
|
|
|
rpc protocol PContent
|
2009-07-11 10:33:10 +04:00
|
|
|
{
|
2012-07-18 03:59:45 +04:00
|
|
|
parent opens PCompositor;
|
|
|
|
|
2010-11-17 07:14:19 +03:00
|
|
|
manages PAudio;
|
2012-08-02 10:02:29 +04:00
|
|
|
manages PBlob;
|
2010-07-19 22:33:33 +04:00
|
|
|
manages PBrowser;
|
2010-11-24 17:15:03 +03:00
|
|
|
manages PCrashReporter;
|
2012-06-20 03:14:39 +04:00
|
|
|
manages PDeviceStorageRequest;
|
2010-09-16 02:55:08 +04:00
|
|
|
manages PExternalHelperApp;
|
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;
|
2011-10-06 02:15:45 +04:00
|
|
|
manages PNecko;
|
2011-11-21 02:40:53 +04:00
|
|
|
manages PSms;
|
2011-10-06 02:15:45 +04:00
|
|
|
manages PStorage;
|
|
|
|
manages PTestShell;
|
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
|
|
|
|
// TabChild::BrowserFrameProvideWindow, and the parent creates the PBrowser
|
|
|
|
// as part of ContentParent::CreateTab.
|
2012-07-22 04:16:11 +04:00
|
|
|
async PBrowser(PRUint32 chromeFlags, bool isBrowserElement, PRUint32 appId);
|
2009-08-26 03:07:22 +04:00
|
|
|
|
2012-08-02 10:02:29 +04:00
|
|
|
async PBlob(BlobConstructorParams params);
|
|
|
|
|
2012-06-13 02:01:25 +04:00
|
|
|
child:
|
2011-02-16 21:43:23 +03:00
|
|
|
PMemoryReportRequest();
|
|
|
|
|
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,
|
2011-01-12 00:34:31 +03:00
|
|
|
OverrideMapping[] overrides, nsCString locale);
|
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
|
|
|
|
2010-07-02 19:50:41 +04:00
|
|
|
async NotifyVisited(URI uri);
|
|
|
|
|
2010-10-20 00:35:08 +04:00
|
|
|
PreferenceUpdate(PrefTuple pref);
|
2011-01-06 07:54:47 +03:00
|
|
|
ClearUserPreference(nsCString prefName);
|
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();
|
|
|
|
|
2011-10-05 00:31:00 +04:00
|
|
|
AppInfo(nsCString version, nsCString buildID);
|
|
|
|
|
2011-09-30 11:00:48 +04:00
|
|
|
SetID(PRUint64 id);
|
|
|
|
|
2012-04-20 04:13:20 +04:00
|
|
|
// Notify child that last-pb-context-exited notification was observed
|
|
|
|
LastPrivateDocShellDestroyed();
|
|
|
|
|
2009-08-18 23:05:15 +04:00
|
|
|
parent:
|
2010-11-17 07:14:19 +03:00
|
|
|
PAudio(PRInt32 aNumChannels, PRInt32 aRate, PRInt32 aFormat);
|
|
|
|
|
2012-06-20 03:14:39 +04:00
|
|
|
PDeviceStorageRequest(DeviceStorageParams params);
|
|
|
|
|
2011-06-08 23:56:31 +04:00
|
|
|
sync PCrashReporter(NativeThreadId tid, PRUint32 processType);
|
|
|
|
|
2011-10-06 02:15:45 +04:00
|
|
|
PHal();
|
|
|
|
|
2012-07-14 15:24:20 +04:00
|
|
|
PIndexedDB();
|
|
|
|
|
2011-10-06 02:15:45 +04:00
|
|
|
PNecko();
|
2011-11-21 02:40:53 +04:00
|
|
|
|
|
|
|
PSms();
|
2011-10-06 02:15:45 +04:00
|
|
|
|
|
|
|
PStorage(StorageConstructData data);
|
|
|
|
|
2010-07-15 18:04:25 +04:00
|
|
|
// Services remoting
|
|
|
|
|
2010-07-02 19:50:41 +04:00
|
|
|
async StartVisitedQuery(URI uri);
|
2010-07-02 19:50:24 +04:00
|
|
|
async VisitURI(URI uri, URI referrer, PRUint32 flags);
|
2010-07-02 19:53:42 +04:00
|
|
|
async SetURITitle(URI uri, nsString title);
|
2010-10-20 19:19:24 +04:00
|
|
|
|
|
|
|
// filepicker remoting
|
2011-09-29 10:19:26 +04:00
|
|
|
sync ShowFilePicker(PRInt16 mode, PRInt16 selectedType, bool addToRecentDocs,
|
2010-10-20 19:19:24 +04:00
|
|
|
nsString title, nsString defaultFile, nsString defaultExtension,
|
|
|
|
nsString[] filters, nsString[] filterNames)
|
|
|
|
returns (nsString[] files, PRInt16 retValue, nsresult result);
|
2010-07-02 19:50:41 +04:00
|
|
|
|
2010-08-10 21:14:45 +04:00
|
|
|
async LoadURIExternal(URI uri);
|
|
|
|
|
2010-10-20 00:35:08 +04:00
|
|
|
// PrefService message
|
2010-11-09 05:49:00 +03:00
|
|
|
sync ReadPrefsArray() returns (PrefTuple[] retValue);
|
2010-07-15 18:04:25 +04:00
|
|
|
|
2011-01-13 07:04:42 +03:00
|
|
|
sync ReadFontList() returns (FontListEntry[] retValue);
|
|
|
|
|
2012-08-02 10:02:29 +04:00
|
|
|
sync SyncMessage(nsString aMessage, ClonedMessageData aData)
|
2010-08-31 22:58:35 +04:00
|
|
|
returns (nsString[] retval);
|
|
|
|
|
2010-09-15 20:44:57 +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,
|
|
|
|
nsString name);
|
|
|
|
|
2010-09-16 02:55:08 +04:00
|
|
|
PExternalHelperApp(URI uri, nsCString aMimeContentType,
|
|
|
|
nsCString aContentDisposition, bool aForceSave,
|
2010-11-21 22:21:59 +03:00
|
|
|
PRInt64 aContentLength, URI aReferrer);
|
2010-09-21 08:16:37 +04:00
|
|
|
|
2010-11-05 20:43:13 +03:00
|
|
|
AddGeolocationListener();
|
|
|
|
RemoveGeolocationListener();
|
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,
|
|
|
|
PRUint32 lineNumber, PRUint32 colNumber, PRUint32 flags,
|
|
|
|
nsCString category);
|
|
|
|
|
2010-10-09 22:07:38 +04:00
|
|
|
// nsIPermissionManager messages
|
|
|
|
sync ReadPermissions() returns (Permission[] permissions);
|
|
|
|
|
2011-03-01 08:36:43 +03:00
|
|
|
// These clipboard methods are only really used on Android since
|
|
|
|
// the clipboard is not available in the content process.
|
|
|
|
SetClipboardText(nsString text, PRInt32 whichClipboard);
|
|
|
|
sync GetClipboardText(PRInt32 whichClipboard)
|
|
|
|
returns (nsString text);
|
|
|
|
EmptyClipboard();
|
|
|
|
sync ClipboardHasText()
|
2011-09-29 10:19:26 +04:00
|
|
|
returns (bool hasText);
|
2011-03-01 08:36:43 +03:00
|
|
|
|
2011-03-30 22:04:41 +04:00
|
|
|
sync GetSystemColors(PRUint32 colorsCount)
|
|
|
|
returns (PRUint32[] colors);
|
|
|
|
|
2011-06-14 01:02:13 +04:00
|
|
|
sync GetIconForExtension(nsCString aFileExt, PRUint32 aIconSize)
|
|
|
|
returns (PRUint8[] bits);
|
|
|
|
|
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);
|
|
|
|
|
2010-08-31 22:58:35 +04:00
|
|
|
both:
|
2012-08-02 10:02:29 +04:00
|
|
|
AsyncMessage(nsString aMessage, ClonedMessageData aData);
|
2009-07-11 10:33:10 +04:00
|
|
|
};
|
|
|
|
|
2009-09-10 02:00:14 +04:00
|
|
|
}
|
|
|
|
}
|