tor-browser

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

PAPZ.ipdl (3335B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
      2  * vim: sw=2 ts=8 et :
      3  */
      4 /* This Source Code Form is subject to the terms of the Mozilla Public
      5  * License, v. 2.0. If a copy of the MPL was not distributed with this
      6  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      7 
      8 include "mozilla/GfxMessageUtils.h";
      9 include "mozilla/layers/LayersMessageUtils.h";
     10 include "mozilla/layers/RemoteContentController.h";
     11 
     12 include protocol PCompositorBridge;
     13 
     14 using mozilla::CSSRect from "Units.h";
     15 using struct mozilla::layers::RepaintRequest from "mozilla/layers/RepaintRequest.h";
     16 using struct mozilla::layers::ScrollableLayerGuid from "mozilla/layers/ScrollableLayerGuid.h";
     17 using mozilla::layers::ScrollableLayerGuid::ViewID from "mozilla/layers/ScrollableLayerGuid.h";
     18 using mozilla::layers::GeckoContentController_APZStateChange from "mozilla/layers/GeckoContentControllerTypes.h";
     19 using mozilla::layers::ScrollDirection from "mozilla/layers/LayersTypes.h";
     20 using mozilla::layers::MatrixMessage from "mozilla/layers/MatrixMessage.h";
     21 using mozilla::dom::TabId from "mozilla/dom/ipc/IdType.h";
     22 using mozilla::dom::ContentParentId from "mozilla/dom/ipc/IdType.h";
     23 using mozilla::layers::AsyncDragMetrics from "mozilla/layers/AsyncDragMetrics.h";
     24 using class nsRegion from "nsRegion.h";
     25 
     26 namespace mozilla {
     27 namespace layers {
     28 
     29 
     30 /**
     31  * PAPZ is a protocol for remoting a GeckoContentController. PAPZ lives on the
     32  * PCompositorBridge protocol which either connects to the compositor thread
     33  * in the main process, or to the compositor thread in the gpu processs.
     34  *
     35  * PAPZParent lives in the compositor thread, while PAPZChild lives wherever the remoted
     36  * GeckoContentController lives (generally the main thread of the main or content process).
     37  * RemoteContentController implements PAPZParent, while APZChild implements PAPZChild.
     38  *
     39  * PAPZ is always used for ContentProcessController and only used for ChromeProcessController
     40  * when there is a gpu process, otherwhise ChromeProcessController is used directly on the
     41  * compositor thread. Only the methods that are used by the [Chrome,Content]ProcessController
     42  * are implemented. If a new method is needed then PAPZ, APZChild, and RemoteContentController
     43  * must be updated to handle it.
     44  */
     45 [ManualDealloc, ParentImpl="RemoteContentController"]
     46 sync protocol PAPZ
     47 {
     48   manager PCompositorBridge;
     49 
     50 parent:
     51   async __delete__();
     52 
     53 child:
     54   async LayerTransforms(MatrixMessage[] aTransforms);
     55 
     56   [Priority=control]
     57   async RequestContentRepaint(RepaintRequest request);
     58 
     59   async UpdateOverscrollVelocity(ScrollableLayerGuid aGuid, float aX, float aY, bool aIsRootContent);
     60 
     61   async UpdateOverscrollOffset(ScrollableLayerGuid aGuid, float aX, float aY, bool aIsRootContent);
     62 
     63   async HideDynamicToolbar();
     64 
     65   async NotifyMozMouseScrollEvent(ViewID aScrollId, nsString aEvent);
     66 
     67   async NotifyAPZStateChange(ScrollableLayerGuid aGuid, GeckoContentController_APZStateChange aChange, int aArg, uint64_t? aInputBlockId);
     68 
     69   [Priority=control]
     70   async NotifyFlushComplete();
     71 
     72   async NotifyAsyncScrollbarDragInitiated(uint64_t aDragBlockId, ViewID aScrollId, ScrollDirection aDirection);
     73 
     74   async NotifyAsyncScrollbarDragRejected(ViewID aScrollId);
     75 
     76   async NotifyAsyncAutoscrollRejected(ViewID aScrollId);
     77 
     78 both:
     79   async Destroy();
     80 };
     81 
     82 } // layers
     83 } // mozilla