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