no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / dom / ipc / PBrowserBridge.ipdl
blobc2af10d2a49b3018473666212bc50eb143299749
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 /* This Source Code Form is subject to the terms of the Mozilla Public
4  * License, v. 2.0. If a copy of the MPL was not distributed with this
5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 include protocol PBrowser;
8 #ifdef ACCESSIBILITY
9 include protocol PDocAccessible;
10 #endif
12 include DOMTypes;
13 include PPrintingTypes;
15 include "mozilla/LayoutMessageUtils.h";
16 include "mozilla/dom/BindingIPCUtils.h";
17 include "mozilla/dom/DocShellMessageUtils.h";
18 include "mozilla/dom/TabMessageUtils.h";
20 using class mozilla::WidgetMouseEvent from "ipc/nsGUIEventIPC.h";
21 using mozilla::dom::EffectsInfo from "mozilla/dom/EffectsInfo.h";
22 using mozilla::ScrollAxis from "mozilla/PresShellForwards.h";
23 using mozilla::ScrollFlags from "mozilla/PresShellForwards.h";
24 using struct nsRect from "nsRect.h";
25 using mozilla::dom::CallerType from "mozilla/dom/BindingDeclarations.h";
26 using nsIntRect from "nsRect.h";
27 using mozilla::dom::EmbedderElementEventType from "mozilla/dom/TabMessageTypes.h";
28 [RefCounted] using class nsDocShellLoadState from "nsDocShellLoadState.h";
29 using mozilla::IntrinsicSize from "nsIFrame.h";
30 using mozilla::AspectRatio from "mozilla/AspectRatio.h";
31 using mozilla::StyleImageRendering from "mozilla/ServoStyleConsts.h";
33 namespace mozilla {
34 namespace dom {
36 /**
37  * A PBrowserBridge connects an iframe/browser in a content process to the
38  * PBrowser that manages the embedded content.
39  *
40  * See `dom/docs/Fission-IPC-Diagram.svg` for an overview of the DOM IPC
41  * actors.
42  */
43 async protocol PBrowserBridge {
44   manager PBrowser;
46 child:
47   /**
48    * Request that the IPC child / Web parent process move focus to the
49    * browser's frame. If canRaise is true, the window can be raised if
50    * it is inactive.
51    */
52   async RequestFocus(bool canRaise, CallerType aCallerType);
54   /**
55    * When IPC parent / Web child sends this message, the IPC child / Web parent
56    * should move focus to the next or previous focusable element or document.
57    */
58   async MoveFocus(bool forward, bool forDocumentNavigation);
60   /**
61    * Called once this PBrowserBridge's OOP subdoc no longer blocks its
62    * embedding element's and embedding doc's 'load' events.
63    */
64   async MaybeFireEmbedderLoadEvents(EmbedderElementEventType aFireEventAtEmbeddingElement);
66   async ScrollRectIntoView(nsRect aRect, ScrollAxis aVertical,
67                            ScrollAxis aHorizontal, ScrollFlags aScrollFlags,
68                            int32_t aAppUnitsPerDevPixel);
70   async SubFrameCrashed();
72   async IntrinsicSizeOrRatioChanged(IntrinsicSize? aIntrinsicSize,
73                                     AspectRatio? aIntrinsicRatio);
75   async ImageLoadComplete(nsresult aResult);
77 both:
79   // Destroy the remote web browser due to the nsFrameLoader going away.
80   // Before initialization we sync-delete it from the child. After
81   // initialization we sync-delete it from the parent after BeginDestroy().
82   async __delete__();
84 parent:
86   async BeginDestroy();
88   // DocShell messaging.
89   async LoadURL(nsDocShellLoadState aLoadState);
90   async ResumeLoad(uint64_t aPendingSwitchID);
92   // Out of process rendering.
93   async Show(OwnerShowInfo info);
94   async ScrollbarPreferenceChanged(ScrollbarPreference pref);
95   [Compress=all] async UpdateDimensions(nsIntRect rect, ScreenIntSize size);
96   async RenderLayers(bool aEnabled);
98   async UpdateEffects(EffectsInfo aEffects);
99   async UpdateRemotePrintSettings(PrintData aPrintData);
101   /**
102    * Navigate by key (Tab/Shift+Tab/F6/Shift+f6).
103    */
104   async NavigateByKey(bool aForward, bool aForDocumentNavigation);
106   /**
107    * Dispatch the given synthesized mousemove event to the child.
108    */
109   async DispatchSynthesizedMouseEvent(WidgetMouseEvent event);
111   /**
112    * Sending an activate message moves focus to the iframe.
113    */
114   async Activate(uint64_t aActionId);
116   async Deactivate(bool aWindowLowering, uint64_t aActionId);
118   async UpdateRemoteStyle(StyleImageRendering aImageRendering);
120   async WillChangeProcess();
122 #ifdef ACCESSIBILITY
123   /**
124    * Tell the parent the accessible for this iframe's embedder
125    * OuterDocAccessible.
126    * aDoc is the actor for the containing document.
127    * aID is the unique id of the embedder accessible within that document.
128    */
129   async SetEmbedderAccessible(nullable PDocAccessible aDoc, uint64_t aID);
130 #endif
133 }  // namespace dom
134 }  // namespace mozilla