tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

PTabContext.ipdlh (1372B)


      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/. */
      6 
      7 include "mozilla/dom/TabMessageUtils.h";
      8 
      9 include protocol PBrowser;
     10 
     11 using mozilla::OriginAttributes from "mozilla/ipc/BackgroundUtils.h";
     12 
     13 namespace mozilla {
     14 namespace dom {
     15 
     16 // An IPCTabContext which corresponds to a PBrowser opened by a child when it
     17 // receives window.open().
     18 struct PopupIPCTabContext
     19 {
     20   PBrowser opener;
     21   uint64_t chromeOuterWindowID;
     22 };
     23 
     24 // An IPCTabContext which corresponds to an app, browser, or normal frame.
     25 struct FrameIPCTabContext
     26 {
     27   uint64_t chromeOuterWindowID;
     28 
     29   // Maximum number of touch points on the screen.
     30   uint32_t maxTouchPoints;
     31 };
     32 
     33 // IPCTabContext is an analog to mozilla::dom::TabContext.  Both specify an
     34 // iframe/PBrowser's own and containing app-ids and tell you whether the
     35 // iframe/PBrowser is a browser frame.  But only IPCTabContext is allowed to
     36 // travel over IPC.
     37 //
     38 // We need IPCTabContext (specifically, PopupIPCTabContext) to prevent a
     39 // privilege escalation attack by a compromised child process.
     40 union IPCTabContext
     41 {
     42   PopupIPCTabContext;
     43   FrameIPCTabContext;
     44 };
     45 
     46 }
     47 }