1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 : #ifndef PLayersChild_h
7 : #define PLayersChild_h
8 :
9 : #include "mozilla/layers/PLayers.h"
10 : namespace mozilla {
11 : namespace layers {
12 : class PCompositorChild;
13 : } // namespace layers
14 : } // namespace mozilla
15 :
16 : namespace mozilla {
17 : namespace layers {
18 : class PLayerChild;
19 : } // namespace layers
20 : } // namespace mozilla
21 :
22 : namespace mozilla {
23 : namespace layout {
24 : class PRenderFrameChild;
25 : } // namespace layout
26 : } // namespace mozilla
27 :
28 : #ifdef DEBUG
29 : #include "prenv.h"
30 : #endif // DEBUG
31 : #include "base/id_map.h"
32 : #include "mozilla/ipc/RPCChannel.h"
33 :
34 :
35 : namespace mozilla {
36 : namespace layers {
37 : class PLayerChild;
38 : } // namespace layers
39 : } // namespace mozilla
40 :
41 :
42 : namespace mozilla {
43 : namespace layout {
44 : class PRenderFrameChild;
45 : } // namespace layout
46 : } // namespace mozilla
47 :
48 :
49 : namespace mozilla {
50 : namespace layers {
51 : class PCompositorChild;
52 : } // namespace layers
53 : } // namespace mozilla
54 :
55 : namespace mozilla {
56 : namespace layers {
57 :
58 :
59 : class /*NS_ABSTRACT_CLASS*/ PLayersChild :
60 : protected mozilla::ipc::RPCChannel::RPCListener,
61 : protected mozilla::ipc::IProtocolManager<mozilla::ipc::RPCChannel::RPCListener>
62 : {
63 : friend class mozilla::layers::PLayerChild;
64 :
65 : friend class mozilla::layout::PRenderFrameChild;
66 :
67 : friend class mozilla::layers::PCompositorChild;
68 :
69 : protected:
70 : typedef mozilla::ipc::ActorHandle ActorHandle;
71 : typedef mozilla::layers::OpCreateThebesLayer OpCreateThebesLayer;
72 : typedef mozilla::layers::OpCreateContainerLayer OpCreateContainerLayer;
73 : typedef mozilla::layers::OpCreateImageLayer OpCreateImageLayer;
74 : typedef mozilla::layers::OpCreateColorLayer OpCreateColorLayer;
75 : typedef mozilla::layers::OpCreateCanvasLayer OpCreateCanvasLayer;
76 : typedef mozilla::layers::SurfaceDescriptorD3D10 SurfaceDescriptorD3D10;
77 : typedef mozilla::layers::SurfaceDescriptor SurfaceDescriptor;
78 : typedef mozilla::layers::YUVImage YUVImage;
79 : typedef mozilla::layers::SharedImage SharedImage;
80 : typedef mozilla::layers::ThebesBuffer ThebesBuffer;
81 : typedef mozilla::layers::OptionalThebesBuffer OptionalThebesBuffer;
82 : typedef mozilla::layers::CanvasSurface CanvasSurface;
83 : typedef mozilla::layers::CommonLayerAttributes CommonLayerAttributes;
84 : typedef mozilla::layers::ThebesLayerAttributes ThebesLayerAttributes;
85 : typedef mozilla::layers::ContainerLayerAttributes ContainerLayerAttributes;
86 : typedef mozilla::layers::ColorLayerAttributes ColorLayerAttributes;
87 : typedef mozilla::layers::CanvasLayerAttributes CanvasLayerAttributes;
88 : typedef mozilla::layers::ImageLayerAttributes ImageLayerAttributes;
89 : typedef mozilla::layers::SpecificLayerAttributes SpecificLayerAttributes;
90 : typedef mozilla::layers::LayerAttributes LayerAttributes;
91 : typedef mozilla::layers::OpSetLayerAttributes OpSetLayerAttributes;
92 : typedef mozilla::layers::OpSetRoot OpSetRoot;
93 : typedef mozilla::layers::OpInsertAfter OpInsertAfter;
94 : typedef mozilla::layers::OpAppendChild OpAppendChild;
95 : typedef mozilla::layers::OpRemoveChild OpRemoveChild;
96 : typedef mozilla::layers::OpPaintThebesBuffer OpPaintThebesBuffer;
97 : typedef mozilla::layers::OpPaintCanvas OpPaintCanvas;
98 : typedef mozilla::layers::OpPaintImage OpPaintImage;
99 : typedef mozilla::layers::Edit Edit;
100 : typedef mozilla::layers::OpBufferSwap OpBufferSwap;
101 : typedef mozilla::layers::OpImageSwap OpImageSwap;
102 : typedef mozilla::layers::OpThebesBufferSwap OpThebesBufferSwap;
103 : typedef mozilla::layers::EditReply EditReply;
104 : typedef mozilla::ipc::Shmem Shmem;
105 : typedef mozilla::GraphicsFilterType GraphicsFilterType;
106 : typedef mozilla::layers::FrameMetrics FrameMetrics;
107 : typedef mozilla::layers::SurfaceDescriptorX11 SurfaceDescriptorX11;
108 : typedef mozilla::null_t null_t;
109 : typedef mozilla::WindowsHandle WindowsHandle;
110 : typedef mozilla::layers::PCompositorChild PCompositorChild;
111 : typedef mozilla::layers::PLayerChild PLayerChild;
112 : typedef mozilla::layout::PRenderFrameChild PRenderFrameChild;
113 : typedef base::ProcessId ProcessId;
114 : typedef mozilla::ipc::ProtocolId ProtocolId;
115 : typedef mozilla::ipc::Transport Transport;
116 : typedef mozilla::ipc::TransportDescriptor TransportDescriptor;
117 :
118 : typedef PLayers::State State;
119 :
120 : virtual PLayerChild*
121 : AllocPLayer() = 0;
122 : virtual bool
123 : DeallocPLayer(PLayerChild* actor) = 0;
124 :
125 : virtual void
126 : ActorDestroy(ActorDestroyReason why);
127 :
128 : public:
129 : typedef IPC::Message Message;
130 : typedef mozilla::ipc::RPCChannel Channel;
131 : typedef mozilla::ipc::RPCChannel::RPCListener ChannelListener;
132 : typedef base::ProcessHandle ProcessHandle;
133 : typedef mozilla::ipc::AsyncChannel AsyncChannel;
134 : typedef mozilla::ipc::SharedMemory SharedMemory;
135 : typedef mozilla::ipc::Trigger Trigger;
136 :
137 : public:
138 : PLayersChild();
139 :
140 : virtual ~PLayersChild();
141 :
142 : void
143 : ManagedPLayerChild(InfallibleTArray<PLayerChild*>& aArr) const;
144 : const InfallibleTArray<PLayerChild*>&
145 : ManagedPLayerChild() const;
146 :
147 : PLayers::State
148 : state();
149 :
150 : PLayerChild*
151 : SendPLayerConstructor();
152 :
153 : PLayerChild*
154 : SendPLayerConstructor(PLayerChild* actor);
155 :
156 : bool
157 : SendUpdate(
158 : const InfallibleTArray<Edit>& cset,
159 : InfallibleTArray<EditReply>* reply);
160 :
161 : static bool
162 : Send__delete__(PLayersChild* actor);
163 :
164 : virtual int32
165 : Register(ChannelListener* aRouted);
166 : virtual int32
167 : RegisterID(
168 : ChannelListener* aRouted,
169 : int32 aId);
170 : virtual ChannelListener*
171 : Lookup(int32 aId);
172 : virtual void
173 : Unregister(int32 aId);
174 : virtual void
175 : RemoveManagee(
176 : int32 aProtocolId,
177 : ChannelListener* aListener);
178 : virtual Shmem::SharedMemory*
179 : CreateSharedMemory(
180 : size_t aSize,
181 : Shmem::SharedMemory::SharedMemoryType type,
182 : bool unsafe,
183 : Shmem::id_t* aId);
184 : virtual bool
185 : AdoptSharedMemory(
186 : Shmem::SharedMemory* segment,
187 : Shmem::id_t* aId);
188 : virtual Shmem::SharedMemory*
189 : LookupSharedMemory(Shmem::id_t aId);
190 : virtual bool
191 : IsTrackingSharedMemory(Shmem::SharedMemory* segment);
192 : virtual bool
193 : DestroySharedMemory(Shmem& aShmem);
194 : virtual ProcessHandle
195 : OtherProcess() const;
196 : virtual AsyncChannel*
197 : GetIPCChannel();
198 :
199 : virtual Result
200 : OnMessageReceived(const Message& __msg);
201 :
202 : virtual Result
203 : OnMessageReceived(
204 : const Message& __msg,
205 : Message*& __reply);
206 :
207 : virtual Result
208 : OnCallReceived(
209 : const Message& __msg,
210 : Message*& __reply);
211 :
212 : void
213 : OnProcessingError(Result code);
214 :
215 : bool
216 : OnReplyTimeout();
217 :
218 : void
219 : OnChannelClose();
220 :
221 : void
222 : OnChannelError();
223 :
224 : void
225 : OnChannelConnected(int32 pid);
226 :
227 : // Methods for managing shmem
228 : bool
229 : AllocShmem(
230 : size_t aSize,
231 : Shmem::SharedMemory::SharedMemoryType aType,
232 : Shmem* aMem);
233 :
234 : bool
235 : AllocUnsafeShmem(
236 : size_t aSize,
237 : Shmem::SharedMemory::SharedMemoryType aType,
238 : Shmem* aMem);
239 :
240 : bool
241 : AdoptShmem(
242 : Shmem& aMem,
243 : Shmem* aOutMem);
244 :
245 : bool
246 : DeallocShmem(Shmem& aMem);
247 :
248 : private:
249 : virtual void
250 : FatalError(const char* const msg) const;
251 :
252 : void
253 : DestroySubtree(ActorDestroyReason why);
254 :
255 : void
256 : DeallocSubtree();
257 :
258 : template<typename T>
259 : void
260 0 : Write(
261 : const T& __v,
262 : Message* __msg)
263 : {
264 0 : IPC::WriteParam(__msg, __v);
265 0 : }
266 :
267 : template<typename T>
268 : bool
269 0 : Read(
270 : T* __v,
271 : const Message* __msg,
272 : void** __iter)
273 : {
274 0 : return IPC::ReadParam(__msg, __iter, __v);
275 : }
276 :
277 : void
278 : Write(
279 : const OpAppendChild& __v,
280 : Message* __msg);
281 :
282 : bool
283 : Read(
284 : OpAppendChild* __v,
285 : const Message* __msg,
286 : void** __iter) NS_WARN_UNUSED_RESULT;
287 :
288 : void
289 : Write(
290 : const SurfaceDescriptor& __v,
291 : Message* __msg);
292 :
293 : bool
294 : Read(
295 : SurfaceDescriptor* __v,
296 : const Message* __msg,
297 : void** __iter) NS_WARN_UNUSED_RESULT;
298 :
299 : void
300 : Write(
301 : const OpInsertAfter& __v,
302 : Message* __msg);
303 :
304 : bool
305 : Read(
306 : OpInsertAfter* __v,
307 : const Message* __msg,
308 : void** __iter) NS_WARN_UNUSED_RESULT;
309 :
310 : void
311 : Write(
312 : const OpPaintThebesBuffer& __v,
313 : Message* __msg);
314 :
315 : bool
316 : Read(
317 : OpPaintThebesBuffer* __v,
318 : const Message* __msg,
319 : void** __iter) NS_WARN_UNUSED_RESULT;
320 :
321 : void
322 : Write(
323 : const OpCreateColorLayer& __v,
324 : Message* __msg);
325 :
326 : bool
327 : Read(
328 : OpCreateColorLayer* __v,
329 : const Message* __msg,
330 : void** __iter) NS_WARN_UNUSED_RESULT;
331 :
332 : void
333 : Write(
334 : const CanvasLayerAttributes& __v,
335 : Message* __msg);
336 :
337 : bool
338 : Read(
339 : CanvasLayerAttributes* __v,
340 : const Message* __msg,
341 : void** __iter) NS_WARN_UNUSED_RESULT;
342 :
343 : void
344 : Write(
345 : const ImageLayerAttributes& __v,
346 : Message* __msg);
347 :
348 : bool
349 : Read(
350 : ImageLayerAttributes* __v,
351 : const Message* __msg,
352 : void** __iter) NS_WARN_UNUSED_RESULT;
353 :
354 : void
355 : Write(
356 : const YUVImage& __v,
357 : Message* __msg);
358 :
359 : bool
360 : Read(
361 : YUVImage* __v,
362 : const Message* __msg,
363 : void** __iter) NS_WARN_UNUSED_RESULT;
364 :
365 : void
366 : Write(
367 : const CanvasSurface& __v,
368 : Message* __msg);
369 :
370 : bool
371 : Read(
372 : CanvasSurface* __v,
373 : const Message* __msg,
374 : void** __iter) NS_WARN_UNUSED_RESULT;
375 :
376 : void
377 : Write(
378 : PLayerChild* __v,
379 : Message* __msg,
380 : bool __nullable);
381 :
382 : bool
383 : Read(
384 : PLayerChild** __v,
385 : const Message* __msg,
386 : void** __iter,
387 : bool __nullable) NS_WARN_UNUSED_RESULT;
388 :
389 : void
390 : Write(
391 : const OpCreateThebesLayer& __v,
392 : Message* __msg);
393 :
394 : bool
395 : Read(
396 : OpCreateThebesLayer* __v,
397 : const Message* __msg,
398 : void** __iter) NS_WARN_UNUSED_RESULT;
399 :
400 : void
401 : Write(
402 : const EditReply& __v,
403 : Message* __msg);
404 :
405 : bool
406 : Read(
407 : EditReply* __v,
408 : const Message* __msg,
409 : void** __iter) NS_WARN_UNUSED_RESULT;
410 :
411 : void
412 : Write(
413 : const InfallibleTArray<Edit>& __v,
414 : Message* __msg);
415 :
416 : bool
417 : Read(
418 : InfallibleTArray<Edit>* __v,
419 : const Message* __msg,
420 : void** __iter) NS_WARN_UNUSED_RESULT;
421 :
422 : void
423 : Write(
424 : const Edit& __v,
425 : Message* __msg);
426 :
427 : bool
428 : Read(
429 : Edit* __v,
430 : const Message* __msg,
431 : void** __iter) NS_WARN_UNUSED_RESULT;
432 :
433 : void
434 : Write(
435 : const SharedImage& __v,
436 : Message* __msg);
437 :
438 : bool
439 : Read(
440 : SharedImage* __v,
441 : const Message* __msg,
442 : void** __iter) NS_WARN_UNUSED_RESULT;
443 :
444 : void
445 : Write(
446 : const OptionalThebesBuffer& __v,
447 : Message* __msg);
448 :
449 : bool
450 : Read(
451 : OptionalThebesBuffer* __v,
452 : const Message* __msg,
453 : void** __iter) NS_WARN_UNUSED_RESULT;
454 :
455 : void
456 : Write(
457 : PLayersChild* __v,
458 : Message* __msg,
459 : bool __nullable);
460 :
461 : bool
462 : Read(
463 : PLayersChild** __v,
464 : const Message* __msg,
465 : void** __iter,
466 : bool __nullable) NS_WARN_UNUSED_RESULT;
467 :
468 : void
469 : Write(
470 : const OpImageSwap& __v,
471 : Message* __msg);
472 :
473 : bool
474 : Read(
475 : OpImageSwap* __v,
476 : const Message* __msg,
477 : void** __iter) NS_WARN_UNUSED_RESULT;
478 :
479 : void
480 : Write(
481 : const ColorLayerAttributes& __v,
482 : Message* __msg);
483 :
484 : bool
485 : Read(
486 : ColorLayerAttributes* __v,
487 : const Message* __msg,
488 : void** __iter) NS_WARN_UNUSED_RESULT;
489 :
490 : void
491 : Write(
492 : const SurfaceDescriptorD3D10& __v,
493 : Message* __msg);
494 :
495 : bool
496 : Read(
497 : SurfaceDescriptorD3D10* __v,
498 : const Message* __msg,
499 : void** __iter) NS_WARN_UNUSED_RESULT;
500 :
501 : void
502 : Write(
503 : const OpPaintCanvas& __v,
504 : Message* __msg);
505 :
506 : bool
507 : Read(
508 : OpPaintCanvas* __v,
509 : const Message* __msg,
510 : void** __iter) NS_WARN_UNUSED_RESULT;
511 :
512 : void
513 : Write(
514 : Shmem& __v,
515 : Message* __msg);
516 :
517 : bool
518 : Read(
519 : Shmem* __v,
520 : const Message* __msg,
521 : void** __iter) NS_WARN_UNUSED_RESULT;
522 :
523 : void
524 : Write(
525 : const OpPaintImage& __v,
526 : Message* __msg);
527 :
528 : bool
529 : Read(
530 : OpPaintImage* __v,
531 : const Message* __msg,
532 : void** __iter) NS_WARN_UNUSED_RESULT;
533 :
534 : void
535 : Write(
536 : const OpThebesBufferSwap& __v,
537 : Message* __msg);
538 :
539 : bool
540 : Read(
541 : OpThebesBufferSwap* __v,
542 : const Message* __msg,
543 : void** __iter) NS_WARN_UNUSED_RESULT;
544 :
545 : void
546 : Write(
547 : const OpCreateContainerLayer& __v,
548 : Message* __msg);
549 :
550 : bool
551 : Read(
552 : OpCreateContainerLayer* __v,
553 : const Message* __msg,
554 : void** __iter) NS_WARN_UNUSED_RESULT;
555 :
556 : void
557 : Write(
558 : const LayerAttributes& __v,
559 : Message* __msg);
560 :
561 : bool
562 : Read(
563 : LayerAttributes* __v,
564 : const Message* __msg,
565 : void** __iter) NS_WARN_UNUSED_RESULT;
566 :
567 : void
568 : Write(
569 : const OpBufferSwap& __v,
570 : Message* __msg);
571 :
572 : bool
573 : Read(
574 : OpBufferSwap* __v,
575 : const Message* __msg,
576 : void** __iter) NS_WARN_UNUSED_RESULT;
577 :
578 : void
579 : Write(
580 : const OpSetRoot& __v,
581 : Message* __msg);
582 :
583 : bool
584 : Read(
585 : OpSetRoot* __v,
586 : const Message* __msg,
587 : void** __iter) NS_WARN_UNUSED_RESULT;
588 :
589 : void
590 : Write(
591 : const OpRemoveChild& __v,
592 : Message* __msg);
593 :
594 : bool
595 : Read(
596 : OpRemoveChild* __v,
597 : const Message* __msg,
598 : void** __iter) NS_WARN_UNUSED_RESULT;
599 :
600 : void
601 : Write(
602 : const ContainerLayerAttributes& __v,
603 : Message* __msg);
604 :
605 : bool
606 : Read(
607 : ContainerLayerAttributes* __v,
608 : const Message* __msg,
609 : void** __iter) NS_WARN_UNUSED_RESULT;
610 :
611 : void
612 : Write(
613 : const OpSetLayerAttributes& __v,
614 : Message* __msg);
615 :
616 : bool
617 : Read(
618 : OpSetLayerAttributes* __v,
619 : const Message* __msg,
620 : void** __iter) NS_WARN_UNUSED_RESULT;
621 :
622 : void
623 : Write(
624 : const ThebesBuffer& __v,
625 : Message* __msg);
626 :
627 : bool
628 : Read(
629 : ThebesBuffer* __v,
630 : const Message* __msg,
631 : void** __iter) NS_WARN_UNUSED_RESULT;
632 :
633 : void
634 : Write(
635 : const SpecificLayerAttributes& __v,
636 : Message* __msg);
637 :
638 : bool
639 : Read(
640 : SpecificLayerAttributes* __v,
641 : const Message* __msg,
642 : void** __iter) NS_WARN_UNUSED_RESULT;
643 :
644 : void
645 : Write(
646 : const ThebesLayerAttributes& __v,
647 : Message* __msg);
648 :
649 : bool
650 : Read(
651 : ThebesLayerAttributes* __v,
652 : const Message* __msg,
653 : void** __iter) NS_WARN_UNUSED_RESULT;
654 :
655 : void
656 : Write(
657 : const InfallibleTArray<EditReply>& __v,
658 : Message* __msg);
659 :
660 : bool
661 : Read(
662 : InfallibleTArray<EditReply>* __v,
663 : const Message* __msg,
664 : void** __iter) NS_WARN_UNUSED_RESULT;
665 :
666 : void
667 : Write(
668 : const OpCreateImageLayer& __v,
669 : Message* __msg);
670 :
671 : bool
672 : Read(
673 : OpCreateImageLayer* __v,
674 : const Message* __msg,
675 : void** __iter) NS_WARN_UNUSED_RESULT;
676 :
677 : void
678 : Write(
679 : const CommonLayerAttributes& __v,
680 : Message* __msg);
681 :
682 : bool
683 : Read(
684 : CommonLayerAttributes* __v,
685 : const Message* __msg,
686 : void** __iter) NS_WARN_UNUSED_RESULT;
687 :
688 : void
689 : Write(
690 : const OpCreateCanvasLayer& __v,
691 : Message* __msg);
692 :
693 : bool
694 : Read(
695 : OpCreateCanvasLayer* __v,
696 : const Message* __msg,
697 : void** __iter) NS_WARN_UNUSED_RESULT;
698 :
699 : Channel* mChannel;
700 : int32 mId;
701 : mozilla::ipc::IProtocolManager<mozilla::ipc::RPCChannel::RPCListener>* mManager;
702 : State mState;
703 : // Sorted by pointer value
704 : InfallibleTArray<PLayerChild*> mManagedPLayerChild;
705 : };
706 :
707 :
708 : } // namespace layers
709 : } // namespace mozilla
710 :
711 : #if 0
712 :
713 : //-----------------------------------------------------------------------------
714 : // Skeleton implementation of abstract actor class
715 :
716 : // Header file contents
717 : namespace mozilla {
718 : namespace layers {
719 : class LayersChild :
720 : public PLayersChild
721 : {
722 : virtual PLayerChild*
723 : AllocPLayer();
724 :
725 : virtual bool
726 : DeallocPLayer(PLayerChild* actor);
727 :
728 : LayersChild();
729 : virtual ~LayersChild();
730 : };
731 : } // namespace layers
732 : } // namespace mozilla
733 :
734 :
735 : // C++ file contents
736 : namespace mozilla {
737 : namespace layers {
738 : PLayerChild*
739 : LayersChild::AllocPLayer()
740 : {
741 : return 0;
742 : }
743 :
744 : bool
745 : LayersChild::DeallocPLayer(PLayerChild* actor)
746 : {
747 : return false;
748 : }
749 :
750 : LayersChild::LayersChild()
751 : {
752 : MOZ_COUNT_CTOR(LayersChild);
753 : }
754 :
755 : LayersChild::~LayersChild()
756 : {
757 : MOZ_COUNT_DTOR(LayersChild);
758 : }
759 :
760 : } // namespace layers
761 : } // namespace mozilla
762 : #endif // if 0
763 :
764 : #endif // ifndef PLayersChild_h
|