Bug 1861467 - [wpt-sync] Update web-platform-tests to eedf737ce39c512d0ca3471f988972e...
[gecko.git] / dom / ipc / PTabContext.ipdlh
blob380bb911eeac5215356f19b34cd121210e527a2e
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 "mozilla/dom/TabMessageUtils.h";
9 include protocol PBrowser;
11 using mozilla::OriginAttributes from "mozilla/ipc/BackgroundUtils.h";
13 namespace mozilla {
14 namespace dom {
16 // An IPCTabContext which corresponds to a PBrowser opened by a child when it
17 // receives window.open().
18 struct PopupIPCTabContext
20   PBrowser opener;
21   uint64_t chromeOuterWindowID;
24 // An IPCTabContext which corresponds to an app, browser, or normal frame.
25 struct FrameIPCTabContext
27   uint64_t chromeOuterWindowID;
29   // Maximum number of touch points on the screen.
30   uint32_t maxTouchPoints;
33 struct JSPluginFrameIPCTabContext
35   uint32_t jsPluginId;
38 // IPCTabContext is an analog to mozilla::dom::TabContext.  Both specify an
39 // iframe/PBrowser's own and containing app-ids and tell you whether the
40 // iframe/PBrowser is a browser frame.  But only IPCTabContext is allowed to
41 // travel over IPC.
43 // We need IPCTabContext (specifically, PopupIPCTabContext) to prevent a
44 // privilege escalation attack by a compromised child process.
45 union IPCTabContext
47   PopupIPCTabContext;
48   FrameIPCTabContext;
49   JSPluginFrameIPCTabContext;