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;
9 include protocol PDocAccessible;
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";
37 * A PBrowserBridge connects an iframe/browser in a content process to the
38 * PBrowser that manages the embedded content.
40 * See `dom/docs/Fission-IPC-Diagram.svg` for an overview of the DOM IPC
43 async protocol PBrowserBridge {
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
52 async RequestFocus(bool canRaise, CallerType aCallerType);
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.
58 async MoveFocus(bool forward, bool forDocumentNavigation);
61 * Called once this PBrowserBridge's OOP subdoc no longer blocks its
62 * embedding element's and embedding doc's 'load' events.
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);
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().
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);
102 * Navigate by key (Tab/Shift+Tab/F6/Shift+f6).
104 async NavigateByKey(bool aForward, bool aForDocumentNavigation);
107 * Dispatch the given synthesized mousemove event to the child.
109 async DispatchSynthesizedMouseEvent(WidgetMouseEvent event);
112 * Sending an activate message moves focus to the iframe.
114 async Activate(uint64_t aActionId);
116 async Deactivate(bool aWindowLowering, uint64_t aActionId);
118 async UpdateRemoteStyle(StyleImageRendering aImageRendering);
120 async WillChangeProcess();
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.
129 async SetEmbedderAccessible(nullable PDocAccessible aDoc, uint64_t aID);
134 } // namespace mozilla