michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * vim: sw=2 ts=8 et : michael@0: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: include protocol PBrowser; michael@0: include protocol PLayerTransaction; michael@0: michael@0: michael@0: using class nsRegion from "nsRegion.h"; michael@0: michael@0: namespace mozilla { michael@0: namespace layout { michael@0: michael@0: /** michael@0: * PRenderFrame (in the layout sense of "frame") represents one web michael@0: * "page". It's used to graft content processes' layer trees into michael@0: * chrome's rendering path. The lifetime of a PRenderFrame is tied to michael@0: * its PresShell in the child process. michael@0: * michael@0: * The child process conceptually "owns" a PRenderFrame, because it michael@0: * only makes sense wrt documents loaded by the child. michael@0: */ michael@0: sync protocol PRenderFrame michael@0: { michael@0: manager PBrowser; michael@0: manages PLayerTransaction; michael@0: michael@0: parent: michael@0: /** michael@0: * Shadow layer trees can be grafted into the parent's in one of michael@0: * two ways michael@0: * - direct shadow tree: updates are sent to parent michael@0: * - indirect: the parent holds a reference (ID) to a shadow tree michael@0: * that's managed by the compositor. During composition, the michael@0: * shadow tree is looked up and grafted appropriately michael@0: * michael@0: * |id| is set to 0 in the "direct" case, and to a whole number michael@0: * in the "indirect" case. michael@0: */ michael@0: async PLayerTransaction(); michael@0: michael@0: async NotifyCompositorTransaction(); michael@0: michael@0: async UpdateHitRegion(nsRegion aRegion); michael@0: michael@0: async __delete__(); michael@0: michael@0: state EMPTY_OR_DIRECT_COMPOSITOR: michael@0: recv PLayerTransaction goto HAVE_CONTENT; michael@0: recv NotifyCompositorTransaction goto EMPTY_OR_DIRECT_COMPOSITOR; michael@0: recv UpdateHitRegion goto EMPTY_OR_DIRECT_COMPOSITOR; michael@0: recv __delete__; michael@0: michael@0: state HAVE_CONTENT: michael@0: recv NotifyCompositorTransaction goto HAVE_CONTENT; michael@0: recv UpdateHitRegion goto HAVE_CONTENT; michael@0: recv __delete__; michael@0: }; michael@0: michael@0: } // namespace layout michael@0: } // namespace mozilla