gfx/layers/ipc/ShadowLayerParent.h

branch
TOR_BUG_9701
changeset 8
97036ab72558
equal deleted inserted replaced
-1:000000000000 0:cec9e8a344f2
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 MOZ_OVERRIDE
12 #include "mozilla/ipc/ProtocolUtils.h"
13 #include "mozilla/layers/PLayerParent.h" // for PLayerParent
14 #include "nsAutoPtr.h" // for nsRefPtr
15
16 namespace mozilla {
17 namespace layers {
18
19 class ContainerLayer;
20 class Layer;
21 class LayerManager;
22
23 class CanvasLayerComposite;
24 class ColorLayerComposite;
25 class ContainerLayerComposite;
26 class ImageLayerComposite;
27 class RefLayerComposite;
28 class ThebesLayerComposite;
29
30 class ShadowLayerParent : public PLayerParent
31 {
32 public:
33 ShadowLayerParent();
34
35 virtual ~ShadowLayerParent();
36
37 void Bind(Layer* layer);
38 void Destroy();
39
40 Layer* AsLayer() const { return mLayer; }
41
42 ContainerLayerComposite* AsContainerLayerComposite() const;
43 CanvasLayerComposite* AsCanvasLayerComposite() const;
44 ColorLayerComposite* AsColorLayerComposite() const;
45 ImageLayerComposite* AsImageLayerComposite() const;
46 RefLayerComposite* AsRefLayerComposite() const;
47 ThebesLayerComposite* AsThebesLayerComposite() const;
48
49 private:
50 virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
51
52 nsRefPtr<Layer> mLayer;
53 };
54
55 } // namespace layers
56 } // namespace mozilla
57
58 #endif // ifndef mozilla_layers_ShadowLayerParent_h

mercurial