tor-browser

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

PVsync.ipdl (1307B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* This Source Code Form is subject to the terms of the Mozilla Public
      3  * License, v. 2.0. If a copy of the MPL was not distributed with this
      4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      5 
      6 include protocol PBackground;
      7 include protocol PBrowser;
      8 include "mozilla/layers/LayersMessageUtils.h";
      9 
     10 using class mozilla::TimeStamp from "mozilla/TimeStamp.h";
     11 using mozilla::VsyncEvent from "mozilla/VsyncDispatcher.h";
     12 
     13 namespace mozilla {
     14 namespace dom {
     15 
     16 /*
     17  * The PVsync is a sub-protocol in PBackground or PBrowser and it is used to
     18  * notify the vsync event from chrome to content process. It also provides the
     19  * interfaces for content to observe/unobserve vsync event notifications.
     20  */
     21 async protocol PVsync
     22 {
     23   manager PBackground or PBrowser;
     24 
     25 child:
     26   // Send vsync event and vsync rate from chrome to content process.
     27   [Compress, Priority=vsync] async Notify(VsyncEvent aVsync, float aVsyncRate);
     28 
     29 parent:
     30   // Content process use these messages to acquire the vsync event.
     31   async Observe();
     32   async Unobserve();
     33 
     34   // This message is never sent. Each PVsync actor will stay alive as long as
     35   // its PBackground or PBrowser manager.
     36   async __delete__();
     37 };
     38 
     39 } // namespace dom
     40 } // namespace mozilla