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 #ifndef mozilla_layers_ShadowLayerParent_h 9 #define mozilla_layers_ShadowLayerParent_h 10 11 #include "mozilla/Attributes.h" // for override 12 #include "mozilla/ipc/ProtocolUtils.h" 13 #include "mozilla/layers/PLayerParent.h" // for PLayerParent 14 15 namespace mozilla { 16 namespace layers { 17 18 class ContainerLayer; 19 class Layer; 20 21 class CanvasLayerComposite; 22 class ColorLayerComposite; 23 class ContainerLayerComposite; 24 class ImageLayerComposite; 25 class RefLayerComposite; 26 class PaintedLayerComposite; 27 28 class ShadowLayerParent : public PLayerParent 29 { 30 public: 31 ShadowLayerParent(); 32 33 virtual ~ShadowLayerParent(); 34 35 void Bind(Layer* layer); 36 void Destroy(); 37 AsLayer()38 Layer* AsLayer() const { return mLayer; } 39 40 ContainerLayerComposite* AsContainerLayerComposite() const; 41 CanvasLayerComposite* AsCanvasLayerComposite() const; 42 ColorLayerComposite* AsColorLayerComposite() const; 43 ImageLayerComposite* AsImageLayerComposite() const; 44 RefLayerComposite* AsRefLayerComposite() const; 45 PaintedLayerComposite* AsPaintedLayerComposite() const; 46 47 private: 48 virtual void ActorDestroy(ActorDestroyReason why) override; 49 50 void Disconnect(); 51 52 RefPtr<Layer> mLayer; 53 }; 54 55 } // namespace layers 56 } // namespace mozilla 57 58 #endif // ifndef mozilla_layers_ShadowLayerParent_h 59