2013-07-10 21:07:50 +04:00
|
|
|
/* -*- 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/. */
|
|
|
|
|
2018-03-16 23:28:19 +03:00
|
|
|
include "mozilla/dom/TabMessageUtils.h";
|
|
|
|
|
2013-07-10 21:07:50 +04:00
|
|
|
include protocol PBrowser;
|
|
|
|
|
2016-06-09 14:59:31 +03:00
|
|
|
using UIStateChangeType from "nsPIDOMWindow.h";
|
2017-01-12 19:38:48 +03:00
|
|
|
using mozilla::OriginAttributes from "mozilla/ipc/BackgroundUtils.h";
|
2016-06-09 14:59:31 +03:00
|
|
|
|
2013-07-10 21:07:50 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
|
|
|
// An IPCTabContext which corresponds to a PBrowser opened by a child when it
|
|
|
|
// receives window.open().
|
|
|
|
struct PopupIPCTabContext
|
|
|
|
{
|
2020-05-08 01:49:06 +03:00
|
|
|
PBrowser opener;
|
2018-07-11 05:31:55 +03:00
|
|
|
uint64_t chromeOuterWindowID;
|
2013-07-10 21:07:50 +04:00
|
|
|
};
|
|
|
|
|
2015-10-07 06:47:46 +03:00
|
|
|
// An IPCTabContext which corresponds to an app, browser, or normal frame.
|
|
|
|
struct FrameIPCTabContext
|
2013-07-10 21:07:50 +04:00
|
|
|
{
|
2018-07-11 05:31:55 +03:00
|
|
|
uint64_t chromeOuterWindowID;
|
|
|
|
|
2016-05-17 06:10:59 +03:00
|
|
|
// The requested presentation URL.
|
|
|
|
// This value would be empty if the TabContext isn't created for
|
|
|
|
// presented content.
|
|
|
|
nsString presentationURL;
|
2016-06-09 14:59:31 +03:00
|
|
|
|
|
|
|
// Keyboard indicator state inherited from the parent.
|
|
|
|
UIStateChangeType showFocusRings;
|
2019-07-19 01:45:16 +03:00
|
|
|
|
|
|
|
// Maximum number of touch points on the screen.
|
|
|
|
uint32_t maxTouchPoints;
|
2013-07-10 21:07:50 +04:00
|
|
|
};
|
|
|
|
|
2017-05-29 13:38:46 +03:00
|
|
|
struct JSPluginFrameIPCTabContext
|
|
|
|
{
|
|
|
|
uint32_t jsPluginId;
|
|
|
|
};
|
|
|
|
|
2013-07-10 21:07:50 +04:00
|
|
|
// IPCTabContext is an analog to mozilla::dom::TabContext. Both specify an
|
|
|
|
// iframe/PBrowser's own and containing app-ids and tell you whether the
|
|
|
|
// iframe/PBrowser is a browser frame. But only IPCTabContext is allowed to
|
|
|
|
// travel over IPC.
|
|
|
|
//
|
|
|
|
// We need IPCTabContext (specifically, PopupIPCTabContext) to prevent a
|
2015-10-30 02:30:57 +03:00
|
|
|
// privilege escalation attack by a compromised child process.
|
|
|
|
union IPCTabContext
|
2013-07-10 21:07:50 +04:00
|
|
|
{
|
|
|
|
PopupIPCTabContext;
|
2015-10-07 06:47:46 +03:00
|
|
|
FrameIPCTabContext;
|
2017-05-29 13:38:46 +03:00
|
|
|
JSPluginFrameIPCTabContext;
|
2013-07-10 21:07:50 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|