Bug 1472338: part 1) Add Chrome tests for the async Clipboard API. r=NeilDeakin
[gecko.git] / dom / ipc / PTabContext.ipdlh
blob994d3293b6023ec2a133878ec952aef1fccbb11d
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 UIStateChangeType from "nsPIDOMWindow.h";
12 using mozilla::OriginAttributes from "mozilla/ipc/BackgroundUtils.h";
14 namespace mozilla {
15 namespace dom {
17 // An IPCTabContext which corresponds to a PBrowser opened by a child when it
18 // receives window.open().
19 struct PopupIPCTabContext
21   PBrowser opener;
22   uint64_t chromeOuterWindowID;
25 // An IPCTabContext which corresponds to an app, browser, or normal frame.
26 struct FrameIPCTabContext
28   uint64_t chromeOuterWindowID;
30   // Keyboard indicator state inherited from the parent.
31   UIStateChangeType showFocusRings;
33   // Maximum number of touch points on the screen.
34   uint32_t maxTouchPoints;
37 struct JSPluginFrameIPCTabContext
39   uint32_t jsPluginId;
42 // IPCTabContext is an analog to mozilla::dom::TabContext.  Both specify an
43 // iframe/PBrowser's own and containing app-ids and tell you whether the
44 // iframe/PBrowser is a browser frame.  But only IPCTabContext is allowed to
45 // travel over IPC.
47 // We need IPCTabContext (specifically, PopupIPCTabContext) to prevent a
48 // privilege escalation attack by a compromised child process.
49 union IPCTabContext
51   PopupIPCTabContext;
52   FrameIPCTabContext;
53   JSPluginFrameIPCTabContext;