tor-browser

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

UITourParent.sys.mjs (799B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 import { UITour } from "moz-src:///browser/components/uitour/UITour.sys.mjs";
      6 import { UITourUtils } from "moz-src:///browser/components/uitour/UITourUtils.sys.mjs";
      7 
      8 export class UITourParent extends JSWindowActorParent {
      9  receiveMessage(message) {
     10    if (!UITourUtils.ensureTrustedOrigin(this.manager)) {
     11      return;
     12    }
     13    switch (message.name) {
     14      case "UITour:onPageEvent":
     15        if (this.manager.rootFrameLoader) {
     16          let browser = this.manager.rootFrameLoader.ownerElement;
     17          UITour.onPageEvent(message.data, browser);
     18          break;
     19        }
     20    }
     21  }
     22 }