forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPContent.ipdl
1897 lines (1612 loc) · 74.8 KB
/
PContent.ipdl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 8 -*- */
/* vim: set sw=4 ts=8 et tw=80 ft=cpp : */
/* 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/. */
include protocol PBackgroundStarter;
include protocol PBrowser;
include protocol PCompositorManager;
include protocol PContentPermissionRequest;
include protocol PCycleCollectWithLogs;
include protocol PDocumentChannel;
include protocol PExtensions;
include protocol PExternalHelperApp;
include protocol PHandlerService;
include protocol PFileDescriptorSet;
include protocol PHal;
include protocol PHeapSnapshotTempFileHelper;
include protocol PProcessHangMonitor;
include protocol PImageBridge;
include protocol PRemoteLazyInputStream;
include protocol PLoginReputation;
include protocol PMedia;
include protocol PNecko;
include protocol PStreamFilter;
include protocol PGMPContent;
include protocol PGMPService;
include protocol PGMP;
include protocol PPrinting;
include protocol PChildToParentStream;
include protocol PParentToChildStream;
#ifdef MOZ_WEBSPEECH
include protocol PSpeechSynthesis;
#endif
include protocol PTestShell;
include protocol PRemoteSpellcheckEngine;
include protocol PWebBrowserPersistDocument;
#ifdef MOZ_WEBRTC
include protocol PWebrtcGlobal;
#endif
include protocol PWindowGlobal;
include protocol PURLClassifier;
include protocol PURLClassifierLocal;
include protocol PVRManager;
include protocol PRemoteDecoderManager;
include protocol PProfiler;
include protocol PScriptCache;
include protocol PSessionStorageObserver;
include protocol PBenchmarkStorage;
include DOMTypes;
include WindowGlobalTypes;
include IPCBlob;
include IPCStream;
include PPrintingTypes;
include PTabContext;
include ProtocolTypes;
include PBackgroundSharedTypes;
include PContentPermission;
include GraphicsMessages;
include MemoryReportTypes;
include ClientIPCTypes;
include HangTypes;
include PrefsTypes;
include NeckoChannelParams;
include PSMIPCTypes;
include LookAndFeelTypes;
#if defined(MOZ_SANDBOX) && defined(MOZ_DEBUG) && defined(ENABLE_TESTS)
include protocol PSandboxTesting;
#endif
include "ipc/MediaControlIPC.h";
include "mozilla/AntiTrackingIPCUtils.h";
include "mozilla/GfxMessageUtils.h";
include "mozilla/dom/BindingIPCUtils.h";
include "mozilla/dom/CSPMessageUtils.h";
include "mozilla/dom/DocShellMessageUtils.h";
include "mozilla/dom/FeaturePolicyUtils.h";
include "mozilla/dom/MediaSessionIPCUtils.h";
include "mozilla/dom/ReferrerInfoUtils.h";
include "mozilla/ipc/ByteBufUtils.h";
include "mozilla/ipc/URIUtils.h";
include "mozilla/PermissionDelegateIPCUtils.h";
[RefCounted] using class nsIDOMGeoPosition from "nsGeoPositionIPCSerialiser.h";
[RefCounted] using class nsIAlertNotification from "mozilla/AlertNotificationIPCSerializer.h";
using struct ChromePackage from "mozilla/chrome/RegistryMessageUtils.h";
using struct SubstitutionMapping from "mozilla/chrome/RegistryMessageUtils.h";
using struct OverrideMapping from "mozilla/chrome/RegistryMessageUtils.h";
using base::ProcessId from "base/process.h";
using struct IPC::Permission from "mozilla/net/NeckoMessageUtils.h";
using class IPC::Principal from "mozilla/dom/PermissionMessageUtils.h";
using mozilla::a11y::IHandlerControlHolder from "mozilla/a11y/IPCTypes.h";
using mozilla::dom::NativeThreadId from "mozilla/dom/NativeThreadId.h";
using mozilla::hal::ProcessPriority from "mozilla/HalTypes.h";
using mozilla::gfx::IntSize from "mozilla/gfx/2D.h";
using mozilla::dom::TabId from "mozilla/dom/ipc/IdType.h";
using mozilla::dom::ContentParentId from "mozilla/dom/ipc/IdType.h";
using mozilla::LayoutDeviceIntPoint from "Units.h";
using mozilla::widget::ThemeChangeKind from "mozilla/widget/WidgetMessageUtils.h";
using class mozilla::dom::MessagePort from "mozilla/dom/MessagePort.h";
using class mozilla::dom::ipc::StructuredCloneData from "mozilla/dom/ipc/StructuredCloneData.h";
using mozilla::OriginAttributes from "mozilla/ipc/BackgroundUtils.h";
using struct mozilla::layers::TextureFactoryIdentifier from "mozilla/layers/CompositorTypes.h";
using mozilla::layers::CompositorOptions from "mozilla/layers/CompositorOptions.h";
using mozilla::layers::LayersId from "mozilla/layers/LayersTypes.h";
using mozilla::Telemetry::HistogramAccumulation from "mozilla/TelemetryComms.h";
using mozilla::Telemetry::KeyedHistogramAccumulation from "mozilla/TelemetryComms.h";
using mozilla::Telemetry::ScalarAction from "mozilla/TelemetryComms.h";
using mozilla::Telemetry::KeyedScalarAction from "mozilla/TelemetryComms.h";
using mozilla::Telemetry::DynamicScalarDefinition from "mozilla/TelemetryComms.h";
using mozilla::Telemetry::ChildEventData from "mozilla/TelemetryComms.h";
#if defined(XP_WIN)
[MoveOnly] using mozilla::UntrustedModulesData from "mozilla/UntrustedModulesData.h";
[MoveOnly] using mozilla::ModulePaths from "mozilla/UntrustedModulesData.h";
[MoveOnly] using mozilla::ModulesMapResult from "mozilla/UntrustedModulesData.h";
#endif // defined(XP_WIN)
using mozilla::Telemetry::DiscardedData from "mozilla/TelemetryComms.h";
[MoveOnly] using mozilla::CrossProcessMutexHandle from "mozilla/ipc/CrossProcessMutex.h";
using mozilla::dom::MaybeDiscardedBrowsingContext from "mozilla/dom/BrowsingContext.h";
using mozilla::dom::BrowsingContextTransaction from "mozilla/dom/BrowsingContext.h";
using mozilla::dom::BrowsingContextInitializer from "mozilla/dom/BrowsingContext.h";
using mozilla::dom::PermitUnloadResult from "nsIContentViewer.h";
using mozilla::dom::MaybeDiscardedWindowContext from "mozilla/dom/WindowContext.h";
using mozilla::dom::WindowContextTransaction from "mozilla/dom/WindowContext.h";
[MoveOnly] using base::SharedMemoryHandle from "base/shared_memory.h";
using mozilla::fontlist::Pointer from "SharedFontList.h";
using gfxSparseBitSet from "gfxFontUtils.h";
using FontVisibility from "gfxFontEntry.h";
using mozilla::dom::MediaControlAction from "mozilla/dom/MediaControlKeySource.h";
using mozilla::dom::MediaPlaybackState from "mozilla/dom/MediaPlaybackStatus.h";
using mozilla::dom::MediaAudibleState from "mozilla/dom/MediaPlaybackStatus.h";
using mozilla::dom::MediaMetadataBase from "mozilla/dom/MediaMetadata.h";
using mozilla::dom::MediaSessionAction from "mozilla/dom/MediaSessionBinding.h";
using mozilla::dom::MediaSessionPlaybackState from "mozilla/dom/MediaSessionBinding.h";
using mozilla::dom::PositionState from "mozilla/dom/MediaSession.h";
[RefCounted] using class nsDocShellLoadState from "nsDocShellLoadState.h";
using mozilla::dom::ServiceWorkerShutdownState::Progress from "mozilla/dom/ServiceWorkerShutdownState.h";
using mozilla::ContentBlockingNotifier::StorageAccessPermissionGrantedReason from "mozilla/ContentBlockingNotifier.h";
using mozilla::ContentBlockingNotifier::BlockingDecision from "mozilla/ContentBlockingNotifier.h";
using mozilla::ContentBlocking::StorageAccessPromptChoices from "mozilla/ContentBlocking.h";
using JSActorMessageKind from "mozilla/dom/JSActor.h";
using JSActorMessageMeta from "mozilla/dom/PWindowGlobal.h";
using mozilla::PermissionDelegateHandler::DelegatedPermissionList from "mozilla/PermissionDelegateHandler.h";
[RefCounted] using class nsILayoutHistoryState from "nsILayoutHistoryState.h";
using class mozilla::dom::SessionHistoryInfo from "mozilla/dom/SessionHistoryEntry.h";
using struct nsPoint from "nsPoint.h";
using struct mozilla::dom::LoadingSessionHistoryInfo from "mozilla/dom/SessionHistoryEntry.h";
using mozilla::PDMFactory::MediaCodecsSupported from "PDMFactory.h";
using mozilla::RemoteDecodeIn from "mozilla/RemoteDecoderManagerChild.h";
using mozilla::dom::PerformanceTimingData from "mozilla/dom/PerformanceTiming.h";
[RefCounted] using mozilla::dom::FeaturePolicy from "mozilla/dom/FeaturePolicy.h";
using Wireframe from "mozilla/dom/DocumentBinding.h";
union ChromeRegistryItem
{
ChromePackage;
OverrideMapping;
SubstitutionMapping;
};
namespace mozilla {
namespace dom {
// SetXPCOMProcessAttributes passes an array of font data to the child,
// but each platform needs different details so we have platform-specific
// versions of the SystemFontListEntry type:
#if defined(ANDROID)
// Used on Android to pass the list of fonts on the device
// to the child process
struct SystemFontListEntry {
nsCString familyName;
nsCString faceName;
nsCString filepath;
uint32_t weightRange;
uint32_t stretchRange;
uint32_t styleRange;
uint8_t index;
FontVisibility visibility;
};
#elif defined(XP_MACOSX)
// 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 SystemFontListEntry {
nsCString familyName;
FontVisibility visibility;
uint8_t entryType;
};
#else
// Used on Linux to pass list of font patterns from chrome to content.
// (Unused on Windows, but there needs to be a definition of the type.)
struct SystemFontListEntry {
nsCString pattern;
bool appFontFamily;
};
#endif
#ifdef MOZ_WIDGET_GTK
struct SystemFontOptions {
int32_t antialias; // cairo_antialias_t
int32_t subpixelOrder; // cairo_subpixel_order_t
int32_t hintStyle; // cairo_hint_style_t
int32_t lcdFilter; // cairo_lcd_filter_t
};
#endif
struct SystemFontList {
SystemFontListEntry[] entries;
#ifdef MOZ_WIDGET_GTK
SystemFontOptions options;
#endif
};
union SystemParameterValue {
bool;
float;
};
struct SystemParameterKVPair {
uint8_t id;
SystemParameterValue value;
};
struct ClipboardCapabilities {
bool supportsSelectionClipboard;
bool supportsFindClipboard;
};
union FileDescOrError {
FileDescriptor;
nsresult;
};
struct DomainPolicyClone
{
bool active;
nsIURI[] blocklist;
nsIURI[] allowlist;
nsIURI[] superBlocklist;
nsIURI[] superAllowlist;
};
struct AndroidSystemInfo
{
nsString device;
nsString manufacturer;
nsString release_version;
nsString hardware;
uint32_t sdk_version;
bool isTablet;
};
struct GetFilesResponseSuccess
{
IPCBlob[] blobs;
};
struct GetFilesResponseFailure
{
nsresult errorCode;
};
union GetFilesResponseResult
{
GetFilesResponseSuccess;
GetFilesResponseFailure;
};
struct BlobURLRegistrationData
{
nsCString url;
IPCBlob blob;
nsIPrincipal principal;
nsID? agentClusterId;
bool revoked;
};
struct JSWindowActorEventDecl
{
nsString name;
bool capture;
bool systemGroup;
bool allowUntrusted;
bool? passive;
bool createActor;
};
struct JSWindowActorInfo
{
nsCString name;
bool allFrames;
// The module of the url.
nsCString? url;
JSWindowActorEventDecl[] events;
// Observer notifications this actor listens to.
nsCString[] observers;
nsString[] matches;
nsCString[] remoteTypes;
nsString[] messageManagerGroups;
};
struct JSProcessActorInfo
{
// The name of the actor.
nsCString name;
// The module of the url.
nsCString? url;
// Observer notifications this actor listens to.
nsCString[] observers;
nsCString[] remoteTypes;
};
struct GMPAPITags
{
nsCString api;
nsCString[] tags;
};
struct GMPCapabilityData
{
nsCString name;
nsCString version;
GMPAPITags[] capabilities;
};
struct L10nFileSourceDescriptor {
nsCString name;
nsCString metasource;
nsCString[] locales;
nsCString prePath;
nsCString[] index;
};
struct XPCOMInitData
{
bool isOffline;
bool isConnected;
int32_t captivePortalState;
bool isLangRTL;
bool haveBidiKeyboards;
nsCString[] dictionaries;
ClipboardCapabilities clipboardCaps;
DomainPolicyClone domainPolicy;
nsIURI userContentSheetURL;
GfxVarUpdate[] gfxNonDefaultVarUpdates;
ContentDeviceData contentDeviceData;
GfxInfoFeatureStatus[] gfxFeatureStatus;
nsCString[] appLocales;
nsCString[] requestedLocales;
L10nFileSourceDescriptor[] l10nFileSources;
DynamicScalarDefinition[] dynamicScalarDefs;
SystemParameterKVPair[] systemParameters;
};
struct VisitedQueryResult
{
nsIURI uri;
bool visited;
};
struct StringBundleDescriptor
{
nsCString bundleURL;
FileDescriptor mapFile;
uint32_t mapSize;
};
struct IPCURLClassifierFeature
{
nsCString featureName;
nsCString[] tables;
nsCString exceptionHostList;
};
// 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;
};
struct PostMessageData
{
MaybeDiscardedBrowsingContext source;
nsString origin;
nsString targetOrigin;
nsIURI targetOriginURI;
nsIPrincipal callerPrincipal;
nsIPrincipal subjectPrincipal;
nsIURI callerURI;
bool isFromPrivateWindow;
nsCString scriptLocation;
uint64_t innerWindowId;
};
union SyncedContextInitializer
{
BrowsingContextInitializer;
WindowContextInitializer;
};
union BlobURLDataRequestResult
{
IPCBlob;
nsresult;
};
/**
* 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.
*/
[ManualDealloc, NestedUpTo=inside_cpow, NeedsOtherPid]
sync protocol PContent
{
manages PBrowser;
manages PContentPermissionRequest;
manages PCycleCollectWithLogs;
manages PExtensions;
manages PExternalHelperApp;
manages PFileDescriptorSet;
manages PHal;
manages PHandlerService;
manages PHeapSnapshotTempFileHelper;
manages PRemoteLazyInputStream;
manages PMedia;
manages PNecko;
manages PPrinting;
manages PChildToParentStream;
manages PParentToChildStream;
#ifdef MOZ_WEBSPEECH
manages PSpeechSynthesis;
#endif
manages PTestShell;
manages PRemoteSpellcheckEngine;
manages PWebBrowserPersistDocument;
#ifdef MOZ_WEBRTC
manages PWebrtcGlobal;
#endif
manages PURLClassifier;
manages PURLClassifierLocal;
manages PScriptCache;
manages PLoginReputation;
manages PSessionStorageObserver;
manages PBenchmarkStorage;
// 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
// BrowserChild::BrowserFrameProvideWindow (which happens when the child's
// content calls window.open()), and the parent creates the PBrowser as part
// of ContentParent::CreateBrowser.
//
// When the parent constructs a PBrowser, the child trusts the attributes it
// receives from the parent. In that case, the context should be
// FrameIPCTabContext.
//
// 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.
//
// 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.
//
// Separate messages are used for the parent and child side constructors due
// to the differences in data and actor setup required.
//
// Keep the last 3 attributes in sync with GetProcessAttributes!
parent:
async ConstructPopupBrowser(ManagedEndpoint<PBrowserParent> browserEp,
ManagedEndpoint<PWindowGlobalParent> windowEp,
TabId tabId, IPCTabContext context,
WindowGlobalInit windowInit,
uint32_t chromeFlags);
// TODO: Do I need to make this return something to watch for completion?
// Guess we'll see how we end up triggering the actual print, for preview
// this should be enough...
async CloneDocumentTreeInto(MaybeDiscardedBrowsingContext aSourceBc,
MaybeDiscardedBrowsingContext aTargetBc,
PrintData aPrintData);
async UpdateRemotePrintSettings(MaybeDiscardedBrowsingContext aBc,
PrintData aPrintData);
async PExtensions();
child:
async ConstructBrowser(ManagedEndpoint<PBrowserChild> browserEp,
ManagedEndpoint<PWindowGlobalChild> windowEp,
TabId tabId,
IPCTabContext context,
WindowGlobalInit windowInit,
uint32_t chromeFlags, ContentParentId cpId,
bool isForBrowser, bool isTopLevel);
both:
async PFileDescriptorSet(FileDescriptor fd);
// For parent->child, aBrowser must be non-null; aContext can
// be null to indicate the browser's current root document, or non-null
// to persist a subdocument. For child->parent, arguments are
// ignored and should be null.
async PWebBrowserPersistDocument(nullable PBrowser aBrowser,
MaybeDiscardedBrowsingContext aContext);
async RawMessage(JSActorMessageMeta aMetadata, ClonedMessageData? aData,
ClonedMessageData? aStack);
child:
async InitGMPService(Endpoint<PGMPServiceChild> service);
async InitProcessHangMonitor(Endpoint<PProcessHangMonitorChild> hangMonitor);
async InitProfiler(Endpoint<PProfilerChild> aEndpoint);
// Give the content process its endpoints to the compositor.
async InitRendering(
Endpoint<PCompositorManagerChild> compositor,
Endpoint<PImageBridgeChild> imageBridge,
Endpoint<PVRManagerChild> vr,
Endpoint<PRemoteDecoderManagerChild> video,
uint32_t[] namespaces);
// 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(
Endpoint<PCompositorManagerChild> compositor,
Endpoint<PImageBridgeChild> bridge,
Endpoint<PVRManagerChild> vr,
Endpoint<PRemoteDecoderManagerChild> video,
uint32_t[] namespaces);
async NetworkLinkTypeChange(uint32_t type);
// Re-create the rendering stack for a device reset.
async ReinitRenderingForDeviceReset();
/**
* 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.
*/
async SetProcessSandbox(FileDescriptor? aBroker);
async RequestMemoryReport(uint32_t generation,
bool anonymize,
bool minimizeMemoryUsage,
FileDescriptor? DMDFile)
returns (uint32_t aGeneration);
async RequestPerformanceMetrics(nsID aID);
#if defined(XP_WIN)
/**
* Used by third-party modules telemetry (aka "untrusted modules" telemetry)
* to pull data from content processes.
*/
async GetUntrustedModulesData() returns (UntrustedModulesData? data);
#endif // defined(XP_WIN)
/**
* Communication between the PuppetBidiKeyboard and the actual
* BidiKeyboard hosted by the parent
*/
async BidiKeyboardNotify(bool isLangRTL, bool haveBidiKeyboards);
/**
* Dump this process's GC and CC logs to the provided files.
*
* For documentation on the other args, see dumpGCAndCCLogsToFile in
* nsIMemoryInfoDumper.idl
*/
async PCycleCollectWithLogs(bool dumpAllTraces,
FileDescriptor gcLog,
FileDescriptor ccLog);
async PTestShell();
async PScriptCache(FileDescOrError cacheFile, bool wantCacheData);
async RegisterChrome(ChromePackage[] packages, SubstitutionMapping[] substitutions,
OverrideMapping[] overrides, nsCString locale, bool reset);
async RegisterChromeItem(ChromeRegistryItem item);
async ClearImageCacheFromPrincipal(nsIPrincipal aPrincipal);
async ClearImageCacheFromBaseDomain(nsCString aBaseDomain);
async ClearImageCache(bool privateLoader, bool chrome);
async ClearStyleSheetCache(nsIPrincipal? aForPrincipal,
nsCString? aBaseDomain);
async SetOffline(bool offline);
async SetConnectivity(bool connectivity);
async SetCaptivePortalState(int32_t aState);
async NotifyVisited(VisitedQueryResult[] uri);
/**
* Tell the child that the system theme has changed, and that a repaint is
* necessary.
*/
async ThemeChanged(FullLookAndFeel lookAndFeelData, ThemeChangeKind aKind);
async UpdateSystemParameters(SystemParameterKVPair[] aUpdates);
async PreferenceUpdate(Pref pref);
async VarUpdate(GfxVarUpdate var);
async UpdatePerfStatsCollectionMask(uint64_t aMask);
async CollectPerfStatsJSON() returns (nsCString aStats);
async CollectScrollingMetrics() returns (uint32_t pixelsScrolled, uint32_t scrollDurationMS);
async NotifyAlertsObserver(nsCString topic, nsString data);
async GeolocationUpdate(nsIDOMGeoPosition aPosition);
async GeolocationError(uint16_t errorCode);
async UpdateDictionaryList(nsCString[] dictionaries);
async UpdateFontList(SystemFontList fontList);
/**
* The shared font list has been updated by the parent, so child processes
* should globally reflow everything to pick up new character coverage etc.
* If aFullRebuild is true, child processes must discard and recreate
* their mappings to the shmem blocks, as those are no longer valid.
* This message has raised priority so that it will take precedence over
* vsync messages to the child.
*/
[Priority=mediumhigh] async RebuildFontList(bool aFullRebuild);
/**
* 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();
/**
* The font list or prefs have been updated in such a way that we might need
* to do a reflow and maybe reframe.
*/
async ForceGlobalReflow(bool aNeedsReframe);
/**
* A new shmem block has been added to the font list; the child process
* should map the new block and add to its index.
*/
async FontListShmBlockAdded(uint32_t aGeneration, uint32_t aIndex,
SharedMemoryHandle aHandle);
async UpdateAppLocales(nsCString[] appLocales);
async UpdateRequestedLocales(nsCString[] requestedLocales);
async UpdateL10nFileSources(L10nFileSourceDescriptor[] sources);
async RegisterStringBundles(StringBundleDescriptor[] stringBundles);
async UpdateSharedData(FileDescriptor mapFile, uint32_t aSize,
IPCBlob[] blobs,
nsCString[] changedKeys);
// nsIPermissionManager messages
async AddPermission(Permission permission);
async RemoveAllPermissions();
async FlushMemory(nsString reason);
async ApplicationBackground();
async ApplicationForeground();
async GarbageCollect();
async CycleCollect();
async UnlinkGhosts();
/**
* Start accessibility engine in content process.
* @param aTid is the thread ID of the chrome process main thread. Only used
* on Windows; pass 0 on other platforms.
* @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.
*/
async ActivateA11y(uint32_t aMainChromeTid, uint32_t aMsaaID);
/**
* Shutdown accessibility engine in content process (if not in use).
*/
async ShutdownA11y();
async AppInfo(nsCString version, nsCString buildID, nsCString name, nsCString UAName,
nsCString ID, nsCString vendor, nsCString sourceURL, nsCString updateURL);
/**
* Send the remote type associated with the content process.
*/
async RemoteType(nsCString aRemoteType);
/**
* Send BlobURLRegistrationData to child process.
*/
async InitBlobURLs(BlobURLRegistrationData[] registrations);
/**
* Send JS{Content, Window}ActorInfos to child process.
*/
async InitJSActorInfos(JSProcessActorInfo[] aContentInfos, JSWindowActorInfo[] aWindowInfos);
/**
* Unregister a previously registered JSWindowActor in the child process.
*/
async UnregisterJSWindowActor(nsCString name);
/**
* Unregister a previously registered JSProcessActor in the child process.
*/
async UnregisterJSProcessActor(nsCString name);
async SetXPCOMProcessAttributes(XPCOMInitData xpcomInit,
StructuredCloneData initialData,
FullLookAndFeel lookAndFeeldata,
/* used on MacOSX/Linux/Android only: */
SystemFontList systemFontList,
SharedMemoryHandle? sharedUASheetHandle,
uintptr_t sharedUASheetAddress,
SharedMemoryHandle[] sharedFontListBlocks);
// Notify child that last-pb-context-exited notification was observed
async LastPrivateDocShellDestroyed();
async NotifyProcessPriorityChanged(ProcessPriority priority);
async MinimizeMemoryUsage();
/**
* Used to manage nsIStyleSheetService across processes.
*/
async LoadAndRegisterSheet(nsIURI uri, uint32_t type);
async UnregisterSheet(nsIURI uri, uint32_t type);
/**
* Notify idle observers in the child
*/
async NotifyIdleObserver(uint64_t observerId, nsCString topic, nsString str);
async InvokeDragSession(MaybeDiscardedWindowContext aContext,
IPCDataTransfer[] transfers, uint32_t action);
async EndDragSession(bool aDoneDrag, bool aUserCancelled,
LayoutDeviceIntPoint aDragEndPoint,
uint32_t aKeyModifiers);
async DomainSetChanged(uint32_t aSetType, uint32_t aChangeType, nsIURI aDomain);
/**
* Notify the child that it will soon be asked to shutdown.
* This is sent with high priority right before the normal shutdown.
*/
[Priority=control] async ShutdownConfirmedHP();
/**
* Notify the child to shutdown. The child will in turn call FinishShutdown
* and let the parent close the channel.
*/
async Shutdown();
async LoadProcessScript(nsString url);
/**
* Requests a full native update of a native plugin child window. This is
* a Windows specific call.
*/
async UpdateWindow(uintptr_t aChildId);
/**
* Notify the child that cache is emptied.
*/
async NotifyEmptyHTTPCache();
/**
* Send a `push` event without data to a service worker in the child.
*/
async Push(nsCString scope, Principal principal, nsString messageId);
/**
* Send a `push` event with data to a service worker in the child.
*/
async PushWithData(nsCString scope, Principal principal,
nsString messageId, uint8_t[] data);
/**
* Send a `pushsubscriptionchange` event to a service worker in the child.
*/
async PushSubscriptionChange(nsCString scope, Principal principal);
async GetFilesResponse(nsID aID, GetFilesResponseResult aResult);
async BlobURLRegistration(nsCString aURI, IPCBlob aBlob,
Principal aPrincipal,
nsID? aAgentClusterId);
async BlobURLUnregistration(nsCString aURI);
async GMPsChanged(GMPCapabilityData[] capabilities);
async PParentToChildStream();
async ProvideAnonymousTemporaryFile(uint64_t aID, FileDescOrError aFD);
async SetPermissionsWithKey(nsCString aPermissionKey, Permission[] aPermissions);
async RefreshScreens(ScreenDetails[] aScreens);
async PRemoteLazyInputStream(nsID aID, uint64_t aSize);
async ShareCodeCoverageMutex(CrossProcessMutexHandle handle);
async FlushCodeCoverageCounters() returns (bool unused);
/*
* 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.
*/
[Priority=input] async SuspendInputEventQueue();
/*
* 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);
// 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.
// The returned loadInfo needs to be set on the channel - since the channel
// moved to a new process it now has different properties.
async CrossProcessRedirect(RedirectToRealChannelArgs args,
Endpoint<PStreamFilterParent>[] aEndpoint)
returns (nsresult rv);
/**
* This method is used to notifty content process to start delayed autoplay
* media via browsing context.
*/
async StartDelayedAutoplayMediaComponents(MaybeDiscardedBrowsingContext aContext);
/**
* This method is used to dispatch MediaControlAction to content process in
* order to control media within a specific browsing context tree.
*/
async UpdateMediaControlAction(MaybeDiscardedBrowsingContext aContext,
MediaControlAction aAction);
// Begin subscribing to a new BrowsingContextGroup, sending down the current
// value for every individual BrowsingContext.
async RegisterBrowsingContextGroup(uint64_t aGroupId, SyncedContextInitializer[] aInits);
// The BrowsingContextGroup has been destroyed in the parent process. The
// content process won't destroy the group until it receives this message or
// during shutdown.
//
// When the content process receives this message, all contexts in the group
// should have already been destroyed.
async DestroyBrowsingContextGroup(uint64_t aGroupId);
#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
async LoadURI(MaybeDiscardedBrowsingContext aContext, nsDocShellLoadState aLoadState, bool aSetNavigating)
returns (bool aSuccess);
async InternalLoad(nsDocShellLoadState aLoadState);
async DisplayLoadError(MaybeDiscardedBrowsingContext aContext, nsString aURI);
async GoBack(MaybeDiscardedBrowsingContext aContext, int32_t? aCancelContentJSEpoch, bool aRequireUserInteraction, bool aUserActivation);
async GoForward(MaybeDiscardedBrowsingContext aContext, int32_t? aCancelContentJSEpoch, bool aRequireUserInteraction, bool aUserActivation);
async GoToIndex(MaybeDiscardedBrowsingContext aContext, int32_t aIndex, int32_t? aCancelContentJSEpoch, bool aUserActivation);
async Reload(MaybeDiscardedBrowsingContext aContext, uint32_t aReloadFlags);
async StopLoad(MaybeDiscardedBrowsingContext aContext, uint32_t aStopFlags);
async OnAllowAccessFor(MaybeDiscardedBrowsingContext aParentContext,
nsCString aTrackingOrigin,
uint32_t aCookieBehavior,
StorageAccessPermissionGrantedReason aReason);
async OnContentBlockingDecision(MaybeDiscardedBrowsingContext aContext,
BlockingDecision aReason,
uint32_t aRejectedReason);
/**
* Abort orientationPendingPromises for documents in the child which
* are part of a BrowsingContextGroup.
*/
async AbortOrientationPendingPromises(MaybeDiscardedBrowsingContext aContext);
async HistoryCommitIndexAndLength(MaybeDiscardedBrowsingContext aContext,
uint32_t aIndex, uint32_t aLength,
nsID aChangeID);
async DispatchLocationChangeEvent(MaybeDiscardedBrowsingContext aContext);
// Dispatches a "beforeunload" event to each in-process content window in the
// subtree beginning at `aStartingAt`, and returns the result as documented in
// the `PermitUnloadResult` enum.
async DispatchBeforeUnloadToSubtree(MaybeDiscardedBrowsingContext aStartingAt)
returns (PermitUnloadResult result);
// Update the cached list of codec supported in the given process.
async UpdateMediaCodecsSupported(RemoteDecodeIn aLocation, MediaCodecsSupported aSupported);
async FlushTabState(MaybeDiscardedBrowsingContext aBrowsingContext)
returns(bool aHadContext);
// Send the list of the supported mimetypes in the given process. GeckoView-specific
async DecoderSupportedMimeTypes(nsCString[] supportedTypes);