2009-09-09 15:00:14 -07:00
|
|
|
/* -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 8 -*- */
|
2009-08-18 12:05:15 -07:00
|
|
|
/* vim: set sw=4 ts=8 et tw=80 ft=cpp : */
|
2009-07-10 23:33:10 -07:00
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/MPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
|
|
|
*
|
2009-09-09 15:00:14 -07:00
|
|
|
* The Original Code is Mozilla Content App.
|
2009-07-10 23:33:10 -07:00
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is
|
2009-09-09 15:00:14 -07:00
|
|
|
* The Mozilla Foundation.
|
2009-07-10 23:33:10 -07:00
|
|
|
* Portions created by the Initial Developer are Copyright (C) 2009
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
|
|
|
|
2010-11-16 20:14:19 -08:00
|
|
|
include protocol PAudio;
|
2010-07-19 11:33:33 -07:00
|
|
|
include protocol PBrowser;
|
2010-11-24 06:15:03 -08:00
|
|
|
include protocol PCrashReporter;
|
2010-09-15 15:55:08 -07:00
|
|
|
include protocol PExternalHelperApp;
|
2011-10-05 15:15:45 -07:00
|
|
|
include protocol PHal;
|
2011-02-16 10:43:23 -08:00
|
|
|
include protocol PMemoryReportRequest;
|
2011-10-05 15:15:45 -07:00
|
|
|
include protocol PNecko;
|
2011-11-20 14:40:53 -08:00
|
|
|
include protocol PSms;
|
2011-10-05 15:15:45 -07:00
|
|
|
include protocol PStorage;
|
|
|
|
include protocol PTestShell;
|
2009-09-09 15:00:14 -07:00
|
|
|
|
2010-03-10 21:33:00 -08:00
|
|
|
include "mozilla/chrome/RegistryMessageUtils.h";
|
2010-07-15 07:04:25 -07:00
|
|
|
include "mozilla/net/NeckoMessageUtils.h";
|
2011-06-08 12:56:31 -07:00
|
|
|
include "mozilla/dom/TabMessageUtils.h";
|
2010-03-10 21:33:00 -08:00
|
|
|
|
2010-09-20 21:16:37 -07:00
|
|
|
include "nsGeoPositionIPCSerialiser.h";
|
2010-10-19 13:35:08 -07:00
|
|
|
include "PPrefTuple.h";
|
2010-09-20 21:16:37 -07:00
|
|
|
|
|
|
|
using GeoPosition;
|
2010-10-19 13:35:08 -07:00
|
|
|
using PrefTuple;
|
2010-09-20 21:16:37 -07:00
|
|
|
|
2010-03-10 21:33:00 -08:00
|
|
|
using ChromePackage;
|
|
|
|
using ResourceMapping;
|
|
|
|
using OverrideMapping;
|
2010-07-15 07:04:25 -07:00
|
|
|
using IPC::URI;
|
2010-10-09 11:07:38 -07:00
|
|
|
using IPC::Permission;
|
2010-11-18 17:15:23 -08:00
|
|
|
using mozilla::null_t;
|
2011-06-08 12:56:31 -07:00
|
|
|
using mozilla::dom::NativeThreadId;
|
2010-11-24 10:22:40 -08:00
|
|
|
using gfxIntSize;
|
2009-09-09 15:00:14 -07:00
|
|
|
|
2009-07-10 23:33:10 -07:00
|
|
|
namespace mozilla {
|
2009-09-09 15:00:14 -07:00
|
|
|
namespace dom {
|
2009-07-10 23:33:10 -07:00
|
|
|
|
2010-11-18 17:15:23 -08: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-12 20:04:42 -08:00
|
|
|
struct FontListEntry {
|
2011-09-23 04:15:36 -07:00
|
|
|
nsString familyName;
|
|
|
|
nsString faceName;
|
2011-01-12 20:04:42 -08:00
|
|
|
nsCString filepath;
|
2011-09-23 04:15:36 -07:00
|
|
|
PRUint16 weight;
|
|
|
|
PRInt16 stretch;
|
|
|
|
PRUint8 italic;
|
|
|
|
PRUint8 index;
|
2011-01-12 20:04:42 -08:00
|
|
|
};
|
|
|
|
|
2010-07-19 11:33:33 -07:00
|
|
|
rpc protocol PContent
|
2009-07-10 23:33:10 -07:00
|
|
|
{
|
2010-11-16 20:14:19 -08:00
|
|
|
manages PAudio;
|
2010-07-19 11:33:33 -07:00
|
|
|
manages PBrowser;
|
2010-11-24 06:15:03 -08:00
|
|
|
manages PCrashReporter;
|
2010-09-15 15:55:08 -07:00
|
|
|
manages PExternalHelperApp;
|
2011-10-05 15:15:45 -07:00
|
|
|
manages PHal;
|
2011-02-16 10:43:23 -08:00
|
|
|
manages PMemoryReportRequest;
|
2011-10-05 15:15:45 -07:00
|
|
|
manages PNecko;
|
2011-11-20 14:40:53 -08:00
|
|
|
manages PSms;
|
2011-10-05 15:15:45 -07:00
|
|
|
manages PStorage;
|
|
|
|
manages PTestShell;
|
2009-08-25 16:07:22 -07:00
|
|
|
|
2009-08-12 11:31:48 -07:00
|
|
|
child:
|
2010-07-19 11:33:33 -07:00
|
|
|
PBrowser(PRUint32 chromeFlags);
|
2009-08-25 16:07:22 -07:00
|
|
|
|
2011-02-16 10:43:23 -08:00
|
|
|
PMemoryReportRequest();
|
|
|
|
|
2009-09-09 15:00:14 -07:00
|
|
|
PTestShell();
|
2009-08-25 16:07:22 -07:00
|
|
|
|
2010-03-10 21:33:00 -08:00
|
|
|
RegisterChrome(ChromePackage[] packages, ResourceMapping[] resources,
|
2011-01-11 13:34:31 -08:00
|
|
|
OverrideMapping[] overrides, nsCString locale);
|
2010-03-10 21:33:00 -08:00
|
|
|
|
2011-09-28 23:19:26 -07:00
|
|
|
async SetOffline(bool offline);
|
2010-05-11 05:44:12 -07:00
|
|
|
|
2010-07-02 08:50:41 -07:00
|
|
|
async NotifyVisited(URI uri);
|
|
|
|
|
2010-10-19 13:35:08 -07:00
|
|
|
PreferenceUpdate(PrefTuple pref);
|
2011-01-05 20:54:47 -08:00
|
|
|
ClearUserPreference(nsCString prefName);
|
2010-05-25 17:13:47 -07:00
|
|
|
|
2010-09-15 09:44:57 -07:00
|
|
|
NotifyAlertsObserver(nsCString topic, nsString data);
|
|
|
|
|
2010-09-20 21:16:37 -07:00
|
|
|
GeolocationUpdate(GeoPosition somewhere);
|
|
|
|
|
2010-10-09 11:07:38 -07:00
|
|
|
// nsIPermissionManager messages
|
|
|
|
AddPermission(Permission permission);
|
|
|
|
|
2011-06-19 22:36:17 -07:00
|
|
|
DeviceMotionChanged(long type, double x, double y, double z);
|
2010-11-05 10:43:13 -07:00
|
|
|
|
2010-11-24 10:22:40 -08:00
|
|
|
ScreenSizeChanged(gfxIntSize size);
|
|
|
|
|
2010-12-11 14:36:08 -08:00
|
|
|
FlushMemory(nsString reason);
|
|
|
|
|
2011-09-13 10:53:51 -07:00
|
|
|
GarbageCollect();
|
|
|
|
CycleCollect();
|
|
|
|
|
2011-07-20 21:37:32 -07:00
|
|
|
/**
|
|
|
|
* Start accessibility engine in content process.
|
|
|
|
*/
|
|
|
|
ActivateA11y();
|
|
|
|
|
2011-10-04 13:31:00 -07:00
|
|
|
AppInfo(nsCString version, nsCString buildID);
|
|
|
|
|
2011-09-30 00:00:48 -07:00
|
|
|
SetID(PRUint64 id);
|
|
|
|
|
2009-08-18 12:05:15 -07:00
|
|
|
parent:
|
2010-11-16 20:14:19 -08:00
|
|
|
PAudio(PRInt32 aNumChannels, PRInt32 aRate, PRInt32 aFormat);
|
|
|
|
|
2011-06-08 12:56:31 -07:00
|
|
|
sync PCrashReporter(NativeThreadId tid, PRUint32 processType);
|
|
|
|
|
2011-10-05 15:15:45 -07:00
|
|
|
PHal();
|
|
|
|
|
|
|
|
PNecko();
|
2011-11-20 14:40:53 -08:00
|
|
|
|
|
|
|
PSms();
|
2011-10-05 15:15:45 -07:00
|
|
|
|
|
|
|
PStorage(StorageConstructData data);
|
|
|
|
|
2010-07-15 07:04:25 -07:00
|
|
|
// Services remoting
|
|
|
|
|
2010-07-02 08:50:41 -07:00
|
|
|
async StartVisitedQuery(URI uri);
|
2010-07-02 08:50:24 -07:00
|
|
|
async VisitURI(URI uri, URI referrer, PRUint32 flags);
|
2010-07-02 08:53:42 -07:00
|
|
|
async SetURITitle(URI uri, nsString title);
|
2010-10-20 08:19:24 -07:00
|
|
|
|
|
|
|
// filepicker remoting
|
2011-09-28 23:19:26 -07:00
|
|
|
sync ShowFilePicker(PRInt16 mode, PRInt16 selectedType, bool addToRecentDocs,
|
2010-10-20 08:19:24 -07:00
|
|
|
nsString title, nsString defaultFile, nsString defaultExtension,
|
|
|
|
nsString[] filters, nsString[] filterNames)
|
|
|
|
returns (nsString[] files, PRInt16 retValue, nsresult result);
|
2010-07-02 08:50:41 -07:00
|
|
|
|
2010-08-10 10:14:45 -07:00
|
|
|
async LoadURIExternal(URI uri);
|
|
|
|
|
2010-10-19 13:35:08 -07:00
|
|
|
// PrefService message
|
2010-11-08 18:49:00 -08:00
|
|
|
sync ReadPrefsArray() returns (PrefTuple[] retValue);
|
2010-07-15 07:04:25 -07:00
|
|
|
|
2011-01-12 20:04:42 -08:00
|
|
|
sync ReadFontList() returns (FontListEntry[] retValue);
|
|
|
|
|
2010-08-31 11:58:35 -07:00
|
|
|
sync SyncMessage(nsString aMessage, nsString aJSON)
|
|
|
|
returns (nsString[] retval);
|
|
|
|
|
2010-09-15 09:44:57 -07:00
|
|
|
ShowAlertNotification(nsString imageUrl,
|
|
|
|
nsString title,
|
|
|
|
nsString text,
|
2011-09-28 23:19:26 -07:00
|
|
|
bool textClickable,
|
2010-09-15 09:44:57 -07:00
|
|
|
nsString cookie,
|
|
|
|
nsString name);
|
|
|
|
|
2010-09-15 15:55:08 -07:00
|
|
|
PExternalHelperApp(URI uri, nsCString aMimeContentType,
|
|
|
|
nsCString aContentDisposition, bool aForceSave,
|
2010-11-21 11:21:59 -08:00
|
|
|
PRInt64 aContentLength, URI aReferrer);
|
2010-09-20 21:16:37 -07:00
|
|
|
|
2010-11-05 10:43:13 -07:00
|
|
|
AddGeolocationListener();
|
|
|
|
RemoveGeolocationListener();
|
2011-06-19 22:36:17 -07:00
|
|
|
AddDeviceMotionListener();
|
|
|
|
RemoveDeviceMotionListener();
|
2010-09-15 15:55:08 -07:00
|
|
|
|
2010-09-23 18:39:32 -07:00
|
|
|
ConsoleMessage(nsString message);
|
|
|
|
ScriptError(nsString message, nsString sourceName, nsString sourceLine,
|
|
|
|
PRUint32 lineNumber, PRUint32 colNumber, PRUint32 flags,
|
|
|
|
nsCString category);
|
|
|
|
|
2010-10-09 11:07:38 -07:00
|
|
|
// nsIPermissionManager messages
|
|
|
|
sync ReadPermissions() returns (Permission[] permissions);
|
|
|
|
|
2011-04-29 16:46:20 -07:00
|
|
|
sync GetIndexedDBDirectory() returns (nsString directory);
|
|
|
|
|
2011-02-28 21:36:43 -08: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-28 23:19:26 -07:00
|
|
|
returns (bool hasText);
|
2011-02-28 21:36:43 -08:00
|
|
|
|
2011-03-30 11:04:41 -07:00
|
|
|
sync GetSystemColors(PRUint32 colorsCount)
|
|
|
|
returns (PRUint32[] colors);
|
|
|
|
|
2011-06-13 14:02:13 -07:00
|
|
|
sync GetIconForExtension(nsCString aFileExt, PRUint32 aIconSize)
|
|
|
|
returns (PRUint8[] bits);
|
|
|
|
|
2011-07-26 18:14:52 -07:00
|
|
|
sync GetShowPasswordSetting()
|
2011-09-28 23:19:26 -07:00
|
|
|
returns (bool showPassword);
|
2011-07-26 18:14:52 -07:00
|
|
|
|
2010-08-31 11:58:35 -07:00
|
|
|
both:
|
|
|
|
AsyncMessage(nsString aMessage, nsString aJSON);
|
|
|
|
|
2009-07-10 23:33:10 -07:00
|
|
|
};
|
|
|
|
|
2009-09-09 15:00:14 -07:00
|
|
|
}
|
|
|
|
}
|