1 /* -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 8 -*- */
2 /* vim: set sw=4 ts=8 et tw=80 ft=cpp : */
3 /* ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at
9 * http://www.mozilla.org/MPL/
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
16 * The Original Code is Mozilla Content App.
18 * The Initial Developer of the Original Code is
19 * The Mozilla Foundation.
20 * Portions created by the Initial Developer are Copyright (C) 2009
21 * the Initial Developer. All Rights Reserved.
25 * Alternatively, the contents of this file may be used under the terms of
26 * either the GNU General Public License Version 2 or later (the "GPL"), or
27 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 * in which case the provisions of the GPL or the LGPL are applicable instead
29 * of those above. If you wish to allow use of your version of this file only
30 * under the terms of either the GPL or the LGPL, and not to allow others to
31 * use your version of this file under the terms of the MPL, indicate your
32 * decision by deleting the provisions above and replace them with the notice
33 * and other provisions required by the GPL or the LGPL. If you do not delete
34 * the provisions above, a recipient may use your version of this file under
35 * the terms of any one of the MPL, the GPL or the LGPL.
37 * ***** END LICENSE BLOCK ***** */
39 include protocol PAudio;
40 include protocol PBrowser;
41 include protocol PCrashReporter;
42 include protocol PTestShell;
43 include protocol PNecko;
44 include protocol PExternalHelperApp;
45 include protocol PStorage;
47 include "mozilla/chrome/RegistryMessageUtils.h";
48 include "mozilla/net/NeckoMessageUtils.h";
50 include "nsGeoPositionIPCSerialiser.h";
51 include "PPrefTuple.h";
57 using ResourceMapping;
58 using OverrideMapping;
60 using IPC::Permission;
61 using mozilla::null_t;
67 // Data required to clone an existing DOMStorageImpl in the parent
70 // Existing cross-process storage actor to clone
72 // Result of calling IsCallerSecure() in the child
76 // When creating a new PStorage protocol, an existing one can be
77 // cloned (see nsDOMStorage2::Clone)
78 union StorageConstructData
88 manages PCrashReporter;
91 manages PExternalHelperApp;
95 PBrowser(PRUint32 chromeFlags);
99 RegisterChrome(ChromePackage[] packages, ResourceMapping[] resources,
100 OverrideMapping[] overrides, nsCString locale);
102 async SetOffline(PRBool offline);
104 async NotifyVisited(URI uri);
106 PreferenceUpdate(PrefTuple pref);
107 ClearUserPreference(nsCString prefName);
109 NotifyAlertsObserver(nsCString topic, nsString data);
111 GeolocationUpdate(GeoPosition somewhere);
113 // nsIPermissionManager messages
114 AddPermission(Permission permission);
116 AccelerationChanged(double x, double y, double z);
118 ScreenSizeChanged(gfxIntSize size);
120 FlushMemory(nsString reason);
126 PStorage(StorageConstructData data);
128 PAudio(PRInt32 aNumChannels, PRInt32 aRate, PRInt32 aFormat);
132 async StartVisitedQuery(URI uri);
133 async VisitURI(URI uri, URI referrer, PRUint32 flags);
134 async SetURITitle(URI uri, nsString title);
136 // filepicker remoting
137 sync ShowFilePicker(PRInt16 mode, PRInt16 selectedType,
138 nsString title, nsString defaultFile, nsString defaultExtension,
139 nsString[] filters, nsString[] filterNames)
140 returns (nsString[] files, PRInt16 retValue, nsresult result);
142 async LoadURIExternal(URI uri);
144 // PrefService message
145 sync ReadPrefsArray() returns (PrefTuple[] retValue);
147 sync SyncMessage(nsString aMessage, nsString aJSON)
148 returns (nsString[] retval);
150 ShowAlertNotification(nsString imageUrl,
153 PRBool textClickable,
157 PExternalHelperApp(URI uri, nsCString aMimeContentType,
158 nsCString aContentDisposition, bool aForceSave,
159 PRInt64 aContentLength, URI aReferrer);
161 AddGeolocationListener();
162 RemoveGeolocationListener();
163 AddAccelerometerListener();
164 RemoveAccelerometerListener();
166 ConsoleMessage(nsString message);
167 ScriptError(nsString message, nsString sourceName, nsString sourceLine,
168 PRUint32 lineNumber, PRUint32 colNumber, PRUint32 flags,
171 // nsIPermissionManager messages
172 sync ReadPermissions() returns (Permission[] permissions);
175 AsyncMessage(nsString aMessage, nsString aJSON);