1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 : #ifndef PPluginInstanceChild_h
7 : #define PPluginInstanceChild_h
8 :
9 : #include "mozilla/plugins/PPluginInstance.h"
10 : namespace mozilla {
11 : namespace plugins {
12 : class PPluginBackgroundDestroyerChild;
13 : } // namespace plugins
14 : } // namespace mozilla
15 :
16 : namespace mozilla {
17 : namespace plugins {
18 : class PPluginModuleChild;
19 : } // namespace plugins
20 : } // namespace mozilla
21 :
22 : namespace mozilla {
23 : namespace plugins {
24 : class PPluginScriptableObjectChild;
25 : } // namespace plugins
26 : } // namespace mozilla
27 :
28 : namespace mozilla {
29 : namespace plugins {
30 : class PBrowserStreamChild;
31 : } // namespace plugins
32 : } // namespace mozilla
33 :
34 : namespace mozilla {
35 : namespace plugins {
36 : class PPluginStreamChild;
37 : } // namespace plugins
38 : } // namespace mozilla
39 :
40 : namespace mozilla {
41 : namespace plugins {
42 : class PStreamNotifyChild;
43 : } // namespace plugins
44 : } // namespace mozilla
45 :
46 : namespace mozilla {
47 : namespace plugins {
48 : class PPluginSurfaceChild;
49 : } // namespace plugins
50 : } // namespace mozilla
51 :
52 : #ifdef DEBUG
53 : #include "prenv.h"
54 : #endif // DEBUG
55 : #include "base/id_map.h"
56 : #include "mozilla/ipc/RPCChannel.h"
57 :
58 :
59 : namespace mozilla {
60 : namespace plugins {
61 : class PPluginStreamChild;
62 : } // namespace plugins
63 : } // namespace mozilla
64 :
65 :
66 : namespace mozilla {
67 : namespace plugins {
68 : class PPluginSurfaceChild;
69 : } // namespace plugins
70 : } // namespace mozilla
71 :
72 :
73 : namespace mozilla {
74 : namespace plugins {
75 : class PPluginBackgroundDestroyerChild;
76 : } // namespace plugins
77 : } // namespace mozilla
78 :
79 :
80 : namespace mozilla {
81 : namespace plugins {
82 : class PBrowserStreamChild;
83 : } // namespace plugins
84 : } // namespace mozilla
85 :
86 :
87 : namespace mozilla {
88 : namespace plugins {
89 : class PPluginModuleChild;
90 : } // namespace plugins
91 : } // namespace mozilla
92 :
93 :
94 : namespace mozilla {
95 : namespace plugins {
96 : class PStreamNotifyChild;
97 : } // namespace plugins
98 : } // namespace mozilla
99 :
100 :
101 : namespace mozilla {
102 : namespace plugins {
103 : class PPluginScriptableObjectChild;
104 : } // namespace plugins
105 : } // namespace mozilla
106 :
107 : namespace mozilla {
108 : namespace plugins {
109 :
110 :
111 : class /*NS_ABSTRACT_CLASS*/ PPluginInstanceChild :
112 : protected mozilla::ipc::RPCChannel::RPCListener,
113 : protected mozilla::ipc::IProtocolManager<mozilla::ipc::RPCChannel::RPCListener>
114 : {
115 : friend class mozilla::plugins::PPluginStreamChild;
116 :
117 : friend class mozilla::plugins::PPluginSurfaceChild;
118 :
119 : friend class mozilla::plugins::PPluginBackgroundDestroyerChild;
120 :
121 : friend class mozilla::plugins::PBrowserStreamChild;
122 :
123 : friend class mozilla::plugins::PPluginModuleChild;
124 :
125 : friend class mozilla::plugins::PStreamNotifyChild;
126 :
127 : friend class mozilla::plugins::PPluginScriptableObjectChild;
128 :
129 : protected:
130 : typedef mozilla::ipc::ActorHandle ActorHandle;
131 : typedef mozilla::plugins::IOSurfaceDescriptor IOSurfaceDescriptor;
132 : typedef mozilla::plugins::SurfaceDescriptor SurfaceDescriptor;
133 : typedef mozilla::plugins::OptionalShmem OptionalShmem;
134 : typedef mozilla::plugins::AsyncSurfaceDescriptor AsyncSurfaceDescriptor;
135 : typedef mozilla::plugins::NPRemoteAsyncSurface NPRemoteAsyncSurface;
136 : typedef mozilla::ipc::Shmem Shmem;
137 : typedef mozilla::plugins::NativeWindowHandle NativeWindowHandle;
138 : typedef mozilla::gfxSurfaceType gfxSurfaceType;
139 : typedef mozilla::null_t null_t;
140 : typedef mozilla::plugins::WindowsSharedMemoryHandle WindowsSharedMemoryHandle;
141 : typedef mozilla::plugins::DXGISharedSurfaceHandle DXGISharedSurfaceHandle;
142 : typedef mozilla::CrossProcessMutexHandle CrossProcessMutexHandle;
143 : typedef mozilla::plugins::PPluginBackgroundDestroyerChild PPluginBackgroundDestroyerChild;
144 : typedef mozilla::plugins::PPluginModuleChild PPluginModuleChild;
145 : typedef mozilla::plugins::PPluginScriptableObjectChild PPluginScriptableObjectChild;
146 : typedef mozilla::plugins::PBrowserStreamChild PBrowserStreamChild;
147 : typedef mozilla::plugins::PPluginStreamChild PPluginStreamChild;
148 : typedef mozilla::plugins::PStreamNotifyChild PStreamNotifyChild;
149 : typedef mozilla::plugins::PPluginSurfaceChild PPluginSurfaceChild;
150 : typedef base::ProcessId ProcessId;
151 : typedef mozilla::ipc::ProtocolId ProtocolId;
152 : typedef mozilla::ipc::Transport Transport;
153 : typedef mozilla::ipc::TransportDescriptor TransportDescriptor;
154 :
155 : typedef PPluginInstance::State State;
156 :
157 : virtual bool
158 : Answer__delete__();
159 : virtual bool
160 : AnswerNPP_SetWindow(const NPRemoteWindow& window) = 0;
161 : virtual bool
162 : AnswerNPP_GetValue_NPPVpluginWantsAllNetworkStreams(
163 : bool* value,
164 : NPError* result) = 0;
165 : virtual bool
166 : AnswerNPP_GetValue_NPPVpluginNeedsXEmbed(
167 : bool* value,
168 : NPError* result) = 0;
169 : virtual bool
170 : AnswerNPP_GetValue_NPPVpluginScriptableNPObject(
171 : PPluginScriptableObjectChild** value,
172 : NPError* result) = 0;
173 : virtual bool
174 : AnswerNPP_SetValue_NPNVprivateModeBool(
175 : const bool& value,
176 : NPError* result) = 0;
177 : virtual bool
178 : AnswerNPP_GetValue_NPPVpluginNativeAccessibleAtkPlugId(
179 : nsCString* plug_id,
180 : NPError* result) = 0;
181 : virtual bool
182 : AnswerNPP_HandleEvent(
183 : const NPRemoteEvent& event,
184 : int16_t* handled) = 0;
185 : virtual bool
186 : AnswerNPP_HandleEvent_Shmem(
187 : const NPRemoteEvent& event,
188 : Shmem& buffer,
189 : int16_t* handled,
190 : Shmem* rtnbuffer) = 0;
191 : virtual bool
192 : AnswerNPP_HandleEvent_IOSurface(
193 : const NPRemoteEvent& event,
194 : const uint32_t& surfaceid,
195 : int16_t* handled) = 0;
196 : virtual bool
197 : AnswerPaint(
198 : const NPRemoteEvent& event,
199 : int16_t* handled) = 0;
200 : virtual bool
201 : RecvWindowPosChanged(const NPRemoteEvent& event) = 0;
202 : virtual bool
203 : RecvAsyncSetWindow(
204 : const gfxSurfaceType& surfaceType,
205 : const NPRemoteWindow& window) = 0;
206 : virtual bool
207 : RecvUpdateBackground(
208 : const SurfaceDescriptor& background,
209 : const nsIntRect& rect) = 0;
210 : virtual bool
211 : AnswerHandleTextEvent(
212 : const nsTextEvent& event,
213 : bool* handled) = 0;
214 : virtual bool
215 : AnswerHandleKeyEvent(
216 : const nsKeyEvent& event,
217 : bool* handled) = 0;
218 : virtual bool
219 : RecvNPP_DidComposite() = 0;
220 : virtual bool
221 : AnswerNPP_Destroy(NPError* rv) = 0;
222 : virtual bool
223 : RecvPPluginScriptableObjectConstructor(PPluginScriptableObjectChild* actor);
224 : virtual bool
225 : AnswerPBrowserStreamConstructor(
226 : PBrowserStreamChild* actor,
227 : const nsCString& url,
228 : const uint32_t& length,
229 : const uint32_t& lastmodified,
230 : PStreamNotifyChild* notifyData,
231 : const nsCString& headers,
232 : const nsCString& mimeType,
233 : const bool& seekable,
234 : NPError* rv,
235 : uint16_t* stype);
236 : virtual bool
237 : AnswerSetPluginFocus() = 0;
238 : virtual bool
239 : AnswerUpdateWindow() = 0;
240 : virtual bool
241 : RecvPPluginBackgroundDestroyerConstructor(PPluginBackgroundDestroyerChild* actor);
242 : virtual PStreamNotifyChild*
243 : AllocPStreamNotify(
244 : const nsCString& url,
245 : const nsCString& target,
246 : const bool& post,
247 : const nsCString& buffer,
248 : const bool& file,
249 : NPError* result) = 0;
250 : virtual bool
251 : DeallocPStreamNotify(PStreamNotifyChild* actor) = 0;
252 : virtual PPluginSurfaceChild*
253 : AllocPPluginSurface(
254 : const WindowsSharedMemoryHandle& handle,
255 : const gfxIntSize& size,
256 : const bool& transparent) = 0;
257 : virtual bool
258 : DeallocPPluginSurface(PPluginSurfaceChild* actor) = 0;
259 : virtual PPluginScriptableObjectChild*
260 : AllocPPluginScriptableObject() = 0;
261 : virtual bool
262 : DeallocPPluginScriptableObject(PPluginScriptableObjectChild* actor) = 0;
263 : virtual PBrowserStreamChild*
264 : AllocPBrowserStream(
265 : const nsCString& url,
266 : const uint32_t& length,
267 : const uint32_t& lastmodified,
268 : PStreamNotifyChild* notifyData,
269 : const nsCString& headers,
270 : const nsCString& mimeType,
271 : const bool& seekable,
272 : NPError* rv,
273 : uint16_t* stype) = 0;
274 : virtual bool
275 : DeallocPBrowserStream(PBrowserStreamChild* actor) = 0;
276 : virtual PPluginStreamChild*
277 : AllocPPluginStream(
278 : const nsCString& mimeType,
279 : const nsCString& target,
280 : NPError* result) = 0;
281 : virtual bool
282 : DeallocPPluginStream(PPluginStreamChild* actor) = 0;
283 : virtual PPluginBackgroundDestroyerChild*
284 : AllocPPluginBackgroundDestroyer() = 0;
285 : virtual bool
286 : DeallocPPluginBackgroundDestroyer(PPluginBackgroundDestroyerChild* actor) = 0;
287 :
288 : virtual void
289 : ActorDestroy(ActorDestroyReason why);
290 :
291 : public:
292 : typedef IPC::Message Message;
293 : typedef mozilla::ipc::RPCChannel Channel;
294 : typedef mozilla::ipc::RPCChannel::RPCListener ChannelListener;
295 : typedef base::ProcessHandle ProcessHandle;
296 : typedef mozilla::ipc::AsyncChannel AsyncChannel;
297 : typedef mozilla::ipc::SharedMemory SharedMemory;
298 : typedef mozilla::ipc::Trigger Trigger;
299 :
300 : public:
301 : PPluginInstanceChild();
302 :
303 : virtual ~PPluginInstanceChild();
304 :
305 : PPluginModuleChild*
306 : Manager();
307 :
308 : void
309 : ManagedPPluginBackgroundDestroyerChild(InfallibleTArray<PPluginBackgroundDestroyerChild*>& aArr) const;
310 : const InfallibleTArray<PPluginBackgroundDestroyerChild*>&
311 : ManagedPPluginBackgroundDestroyerChild() const;
312 :
313 : void
314 : ManagedPPluginScriptableObjectChild(InfallibleTArray<PPluginScriptableObjectChild*>& aArr) const;
315 : const InfallibleTArray<PPluginScriptableObjectChild*>&
316 : ManagedPPluginScriptableObjectChild() const;
317 :
318 : void
319 : ManagedPBrowserStreamChild(InfallibleTArray<PBrowserStreamChild*>& aArr) const;
320 : const InfallibleTArray<PBrowserStreamChild*>&
321 : ManagedPBrowserStreamChild() const;
322 :
323 : void
324 : ManagedPPluginStreamChild(InfallibleTArray<PPluginStreamChild*>& aArr) const;
325 : const InfallibleTArray<PPluginStreamChild*>&
326 : ManagedPPluginStreamChild() const;
327 :
328 : void
329 : ManagedPStreamNotifyChild(InfallibleTArray<PStreamNotifyChild*>& aArr) const;
330 : const InfallibleTArray<PStreamNotifyChild*>&
331 : ManagedPStreamNotifyChild() const;
332 :
333 : void
334 : ManagedPPluginSurfaceChild(InfallibleTArray<PPluginSurfaceChild*>& aArr) const;
335 : const InfallibleTArray<PPluginSurfaceChild*>&
336 : ManagedPPluginSurfaceChild() const;
337 :
338 : PPluginInstance::State
339 : state();
340 :
341 : bool
342 : CallNPN_GetValue_NPNVjavascriptEnabledBool(
343 : bool* value,
344 : NPError* result);
345 :
346 : bool
347 : CallNPN_GetValue_NPNVisOfflineBool(
348 : bool* value,
349 : NPError* result);
350 :
351 : bool
352 : CallNPN_GetValue_NPNVWindowNPObject(
353 : PPluginScriptableObjectChild** value,
354 : NPError* result);
355 :
356 : bool
357 : CallNPN_GetValue_NPNVPluginElementNPObject(
358 : PPluginScriptableObjectChild** value,
359 : NPError* result);
360 :
361 : bool
362 : CallNPN_GetValue_NPNVprivateModeBool(
363 : bool* value,
364 : NPError* result);
365 :
366 : bool
367 : CallNPN_GetValue_NPNVnetscapeWindow(
368 : NativeWindowHandle* value,
369 : NPError* result);
370 :
371 : bool
372 : CallNPN_GetValue_NPNVdocumentOrigin(
373 : nsCString* value,
374 : NPError* result);
375 :
376 : bool
377 : CallNPN_SetValue_NPPVpluginWindow(
378 : const bool& windowed,
379 : NPError* result);
380 :
381 : bool
382 : CallNPN_SetValue_NPPVpluginTransparent(
383 : const bool& transparent,
384 : NPError* result);
385 :
386 : bool
387 : CallNPN_SetValue_NPPVpluginUsesDOMForCursor(
388 : const bool& useDOMForCursor,
389 : NPError* result);
390 :
391 : bool
392 : CallNPN_SetValue_NPPVpluginDrawingModel(
393 : const int& drawingModel,
394 : OptionalShmem* remoteImageData,
395 : CrossProcessMutexHandle* mutex,
396 : NPError* result);
397 :
398 : bool
399 : CallNPN_SetValue_NPPVpluginEventModel(
400 : const int& eventModel,
401 : NPError* result);
402 :
403 : bool
404 : CallNPN_GetURL(
405 : const nsCString& url,
406 : const nsCString& target,
407 : NPError* result);
408 :
409 : bool
410 : CallNPN_PostURL(
411 : const nsCString& url,
412 : const nsCString& target,
413 : const nsCString& buffer,
414 : const bool& file,
415 : NPError* result);
416 :
417 : PStreamNotifyChild*
418 : CallPStreamNotifyConstructor(
419 : const nsCString& url,
420 : const nsCString& target,
421 : const bool& post,
422 : const nsCString& buffer,
423 : const bool& file,
424 : NPError* result);
425 :
426 : PStreamNotifyChild*
427 : CallPStreamNotifyConstructor(
428 : PStreamNotifyChild* actor,
429 : const nsCString& url,
430 : const nsCString& target,
431 : const bool& post,
432 : const nsCString& buffer,
433 : const bool& file,
434 : NPError* result);
435 :
436 : bool
437 : SendNPN_InvalidateRect(const NPRect& rect);
438 :
439 : bool
440 : SendShow(
441 : const NPRect& updatedRect,
442 : const SurfaceDescriptor& newSurface,
443 : SurfaceDescriptor* prevSurface);
444 :
445 : PPluginSurfaceChild*
446 : SendPPluginSurfaceConstructor(
447 : const WindowsSharedMemoryHandle& handle,
448 : const gfxIntSize& size,
449 : const bool& transparent);
450 :
451 : PPluginSurfaceChild*
452 : SendPPluginSurfaceConstructor(
453 : PPluginSurfaceChild* actor,
454 : const WindowsSharedMemoryHandle& handle,
455 : const gfxIntSize& size,
456 : const bool& transparent);
457 :
458 : bool
459 : CallNPN_PushPopupsEnabledState(const bool& aState);
460 :
461 : bool
462 : CallNPN_PopPopupsEnabledState();
463 :
464 : bool
465 : CallNPN_GetValueForURL(
466 : const NPNURLVariable& variable,
467 : const nsCString& url,
468 : nsCString* value,
469 : NPError* result);
470 :
471 : bool
472 : CallNPN_SetValueForURL(
473 : const NPNURLVariable& variable,
474 : const nsCString& url,
475 : const nsCString& value,
476 : NPError* result);
477 :
478 : bool
479 : CallNPN_GetAuthenticationInfo(
480 : const nsCString& protocol_,
481 : const nsCString& host,
482 : const int32_t& port,
483 : const nsCString& scheme,
484 : const nsCString& realm,
485 : nsCString* username,
486 : nsCString* password,
487 : NPError* result);
488 :
489 : bool
490 : CallNPN_ConvertPoint(
491 : const double& sourceX,
492 : const bool& ignoreDestX,
493 : const double& sourceY,
494 : const bool& ignoreDestY,
495 : const NPCoordinateSpace& sourceSpace,
496 : const NPCoordinateSpace& destSpace,
497 : double* destX,
498 : double* destY,
499 : bool* result);
500 :
501 : bool
502 : SendRedrawPlugin();
503 :
504 : bool
505 : CallNPN_InitAsyncSurface(
506 : const gfxIntSize& size,
507 : const NPImageFormat& format,
508 : NPRemoteAsyncSurface* surfData,
509 : bool* result);
510 :
511 : bool
512 : SendNegotiatedCarbon();
513 :
514 : PPluginScriptableObjectChild*
515 : SendPPluginScriptableObjectConstructor();
516 :
517 : PPluginScriptableObjectChild*
518 : SendPPluginScriptableObjectConstructor(PPluginScriptableObjectChild* actor);
519 :
520 : PPluginStreamChild*
521 : CallPPluginStreamConstructor(
522 : const nsCString& mimeType,
523 : const nsCString& target,
524 : NPError* result);
525 :
526 : PPluginStreamChild*
527 : CallPPluginStreamConstructor(
528 : PPluginStreamChild* actor,
529 : const nsCString& mimeType,
530 : const nsCString& target,
531 : NPError* result);
532 :
533 : bool
534 : CallPluginFocusChange(const bool& gotFocus);
535 :
536 : virtual int32
537 : Register(ChannelListener* aRouted);
538 : virtual int32
539 : RegisterID(
540 : ChannelListener* aRouted,
541 : int32 aId);
542 : virtual ChannelListener*
543 : Lookup(int32 aId);
544 : virtual void
545 : Unregister(int32 aId);
546 : virtual void
547 : RemoveManagee(
548 : int32 aProtocolId,
549 : ChannelListener* aListener);
550 : virtual Shmem::SharedMemory*
551 : CreateSharedMemory(
552 : size_t aSize,
553 : Shmem::SharedMemory::SharedMemoryType type,
554 : bool unsafe,
555 : Shmem::id_t* aId);
556 : virtual bool
557 : AdoptSharedMemory(
558 : Shmem::SharedMemory* segment,
559 : Shmem::id_t* aId);
560 : virtual Shmem::SharedMemory*
561 : LookupSharedMemory(Shmem::id_t aId);
562 : virtual bool
563 : IsTrackingSharedMemory(Shmem::SharedMemory* segment);
564 : virtual bool
565 : DestroySharedMemory(Shmem& aShmem);
566 : virtual ProcessHandle
567 : OtherProcess() const;
568 : virtual AsyncChannel*
569 : GetIPCChannel();
570 :
571 : virtual Result
572 : OnMessageReceived(const Message& __msg);
573 :
574 : virtual Result
575 : OnMessageReceived(
576 : const Message& __msg,
577 : Message*& __reply);
578 :
579 : virtual Result
580 : OnCallReceived(
581 : const Message& __msg,
582 : Message*& __reply);
583 :
584 : void
585 : OnProcessingError(Result code);
586 :
587 : bool
588 : OnReplyTimeout();
589 :
590 : void
591 : OnChannelClose();
592 :
593 : void
594 : OnChannelError();
595 :
596 : void
597 : OnChannelConnected(int32 pid);
598 :
599 : // Methods for managing shmem
600 : bool
601 : AllocShmem(
602 : size_t aSize,
603 : Shmem::SharedMemory::SharedMemoryType aType,
604 : Shmem* aMem);
605 :
606 : bool
607 : AllocUnsafeShmem(
608 : size_t aSize,
609 : Shmem::SharedMemory::SharedMemoryType aType,
610 : Shmem* aMem);
611 :
612 : bool
613 : AdoptShmem(
614 : Shmem& aMem,
615 : Shmem* aOutMem);
616 :
617 : bool
618 : DeallocShmem(Shmem& aMem);
619 :
620 : private:
621 : virtual void
622 : FatalError(const char* const msg) const;
623 :
624 : void
625 : DestroySubtree(ActorDestroyReason why);
626 :
627 : void
628 : DeallocSubtree();
629 :
630 : template<typename T>
631 : void
632 0 : Write(
633 : const T& __v,
634 : Message* __msg)
635 : {
636 0 : IPC::WriteParam(__msg, __v);
637 0 : }
638 :
639 : template<typename T>
640 : bool
641 0 : Read(
642 : T* __v,
643 : const Message* __msg,
644 : void** __iter)
645 : {
646 0 : return IPC::ReadParam(__msg, __iter, __v);
647 : }
648 :
649 : void
650 : Write(
651 : const SurfaceDescriptor& __v,
652 : Message* __msg);
653 :
654 : bool
655 : Read(
656 : SurfaceDescriptor* __v,
657 : const Message* __msg,
658 : void** __iter) NS_WARN_UNUSED_RESULT;
659 :
660 : void
661 : Write(
662 : PPluginStreamChild* __v,
663 : Message* __msg,
664 : bool __nullable);
665 :
666 : bool
667 : Read(
668 : PPluginStreamChild** __v,
669 : const Message* __msg,
670 : void** __iter,
671 : bool __nullable) NS_WARN_UNUSED_RESULT;
672 :
673 : void
674 : Write(
675 : const NPRemoteAsyncSurface& __v,
676 : Message* __msg);
677 :
678 : bool
679 : Read(
680 : NPRemoteAsyncSurface* __v,
681 : const Message* __msg,
682 : void** __iter) NS_WARN_UNUSED_RESULT;
683 :
684 : void
685 : Write(
686 : Shmem& __v,
687 : Message* __msg);
688 :
689 : bool
690 : Read(
691 : Shmem* __v,
692 : const Message* __msg,
693 : void** __iter) NS_WARN_UNUSED_RESULT;
694 :
695 : void
696 : Write(
697 : PPluginSurfaceChild* __v,
698 : Message* __msg,
699 : bool __nullable);
700 :
701 : bool
702 : Read(
703 : PPluginSurfaceChild** __v,
704 : const Message* __msg,
705 : void** __iter,
706 : bool __nullable) NS_WARN_UNUSED_RESULT;
707 :
708 : void
709 : Write(
710 : PPluginBackgroundDestroyerChild* __v,
711 : Message* __msg,
712 : bool __nullable);
713 :
714 : bool
715 : Read(
716 : PPluginBackgroundDestroyerChild** __v,
717 : const Message* __msg,
718 : void** __iter,
719 : bool __nullable) NS_WARN_UNUSED_RESULT;
720 :
721 : void
722 : Write(
723 : const IOSurfaceDescriptor& __v,
724 : Message* __msg);
725 :
726 : bool
727 : Read(
728 : IOSurfaceDescriptor* __v,
729 : const Message* __msg,
730 : void** __iter) NS_WARN_UNUSED_RESULT;
731 :
732 : void
733 : Write(
734 : PBrowserStreamChild* __v,
735 : Message* __msg,
736 : bool __nullable);
737 :
738 : bool
739 : Read(
740 : PBrowserStreamChild** __v,
741 : const Message* __msg,
742 : void** __iter,
743 : bool __nullable) NS_WARN_UNUSED_RESULT;
744 :
745 : void
746 : Write(
747 : PPluginInstanceChild* __v,
748 : Message* __msg,
749 : bool __nullable);
750 :
751 : bool
752 : Read(
753 : PPluginInstanceChild** __v,
754 : const Message* __msg,
755 : void** __iter,
756 : bool __nullable) NS_WARN_UNUSED_RESULT;
757 :
758 : void
759 : Write(
760 : const OptionalShmem& __v,
761 : Message* __msg);
762 :
763 : bool
764 : Read(
765 : OptionalShmem* __v,
766 : const Message* __msg,
767 : void** __iter) NS_WARN_UNUSED_RESULT;
768 :
769 : void
770 : Write(
771 : PStreamNotifyChild* __v,
772 : Message* __msg,
773 : bool __nullable);
774 :
775 : bool
776 : Read(
777 : PStreamNotifyChild** __v,
778 : const Message* __msg,
779 : void** __iter,
780 : bool __nullable) NS_WARN_UNUSED_RESULT;
781 :
782 : void
783 : Write(
784 : const AsyncSurfaceDescriptor& __v,
785 : Message* __msg);
786 :
787 : bool
788 : Read(
789 : AsyncSurfaceDescriptor* __v,
790 : const Message* __msg,
791 : void** __iter) NS_WARN_UNUSED_RESULT;
792 :
793 : void
794 : Write(
795 : PPluginScriptableObjectChild* __v,
796 : Message* __msg,
797 : bool __nullable);
798 :
799 : bool
800 : Read(
801 : PPluginScriptableObjectChild** __v,
802 : const Message* __msg,
803 : void** __iter,
804 : bool __nullable) NS_WARN_UNUSED_RESULT;
805 :
806 : Channel* mChannel;
807 : int32 mId;
808 : mozilla::ipc::IProtocolManager<mozilla::ipc::RPCChannel::RPCListener>* mManager;
809 : State mState;
810 : // Sorted by pointer value
811 : InfallibleTArray<PPluginBackgroundDestroyerChild*> mManagedPPluginBackgroundDestroyerChild;
812 : // Sorted by pointer value
813 : InfallibleTArray<PPluginScriptableObjectChild*> mManagedPPluginScriptableObjectChild;
814 : // Sorted by pointer value
815 : InfallibleTArray<PBrowserStreamChild*> mManagedPBrowserStreamChild;
816 : // Sorted by pointer value
817 : InfallibleTArray<PPluginStreamChild*> mManagedPPluginStreamChild;
818 : // Sorted by pointer value
819 : InfallibleTArray<PStreamNotifyChild*> mManagedPStreamNotifyChild;
820 : // Sorted by pointer value
821 : InfallibleTArray<PPluginSurfaceChild*> mManagedPPluginSurfaceChild;
822 : };
823 :
824 :
825 : } // namespace plugins
826 : } // namespace mozilla
827 :
828 : #if 0
829 :
830 : //-----------------------------------------------------------------------------
831 : // Skeleton implementation of abstract actor class
832 :
833 : // Header file contents
834 : namespace mozilla {
835 : namespace plugins {
836 : class PluginInstanceChild :
837 : public PPluginInstanceChild
838 : {
839 : virtual bool
840 : AnswerNPP_SetWindow(const NPRemoteWindow& window);
841 :
842 : virtual bool
843 : AnswerNPP_GetValue_NPPVpluginWantsAllNetworkStreams(
844 : bool* value,
845 : NPError* result);
846 :
847 : virtual bool
848 : AnswerNPP_GetValue_NPPVpluginNeedsXEmbed(
849 : bool* value,
850 : NPError* result);
851 :
852 : virtual bool
853 : AnswerNPP_GetValue_NPPVpluginScriptableNPObject(
854 : PPluginScriptableObjectChild** value,
855 : NPError* result);
856 :
857 : virtual bool
858 : AnswerNPP_SetValue_NPNVprivateModeBool(
859 : const bool& value,
860 : NPError* result);
861 :
862 : virtual bool
863 : AnswerNPP_GetValue_NPPVpluginNativeAccessibleAtkPlugId(
864 : nsCString* plug_id,
865 : NPError* result);
866 :
867 : virtual bool
868 : AnswerNPP_HandleEvent(
869 : const NPRemoteEvent& event,
870 : int16_t* handled);
871 :
872 : virtual bool
873 : AnswerNPP_HandleEvent_Shmem(
874 : const NPRemoteEvent& event,
875 : Shmem& buffer,
876 : int16_t* handled,
877 : Shmem* rtnbuffer);
878 :
879 : virtual bool
880 : AnswerNPP_HandleEvent_IOSurface(
881 : const NPRemoteEvent& event,
882 : const uint32_t& surfaceid,
883 : int16_t* handled);
884 :
885 : virtual bool
886 : AnswerPaint(
887 : const NPRemoteEvent& event,
888 : int16_t* handled);
889 :
890 : virtual bool
891 : RecvWindowPosChanged(const NPRemoteEvent& event);
892 :
893 : virtual bool
894 : RecvAsyncSetWindow(
895 : const gfxSurfaceType& surfaceType,
896 : const NPRemoteWindow& window);
897 :
898 : virtual bool
899 : RecvUpdateBackground(
900 : const SurfaceDescriptor& background,
901 : const nsIntRect& rect);
902 :
903 : virtual bool
904 : AnswerHandleTextEvent(
905 : const nsTextEvent& event,
906 : bool* handled);
907 :
908 : virtual bool
909 : AnswerHandleKeyEvent(
910 : const nsKeyEvent& event,
911 : bool* handled);
912 :
913 : virtual bool
914 : RecvNPP_DidComposite();
915 :
916 : virtual bool
917 : AnswerNPP_Destroy(NPError* rv);
918 :
919 : virtual bool
920 : AnswerSetPluginFocus();
921 :
922 : virtual bool
923 : AnswerUpdateWindow();
924 :
925 : virtual PStreamNotifyChild*
926 : AllocPStreamNotify(
927 : const nsCString& url,
928 : const nsCString& target,
929 : const bool& post,
930 : const nsCString& buffer,
931 : const bool& file,
932 : NPError* result);
933 :
934 : virtual bool
935 : DeallocPStreamNotify(PStreamNotifyChild* actor);
936 :
937 : virtual PPluginSurfaceChild*
938 : AllocPPluginSurface(
939 : const WindowsSharedMemoryHandle& handle,
940 : const gfxIntSize& size,
941 : const bool& transparent);
942 :
943 : virtual bool
944 : DeallocPPluginSurface(PPluginSurfaceChild* actor);
945 :
946 : virtual PPluginScriptableObjectChild*
947 : AllocPPluginScriptableObject();
948 :
949 : virtual bool
950 : DeallocPPluginScriptableObject(PPluginScriptableObjectChild* actor);
951 :
952 : virtual PBrowserStreamChild*
953 : AllocPBrowserStream(
954 : const nsCString& url,
955 : const uint32_t& length,
956 : const uint32_t& lastmodified,
957 : PStreamNotifyChild* notifyData,
958 : const nsCString& headers,
959 : const nsCString& mimeType,
960 : const bool& seekable,
961 : NPError* rv,
962 : uint16_t* stype);
963 :
964 : virtual bool
965 : DeallocPBrowserStream(PBrowserStreamChild* actor);
966 :
967 : virtual PPluginStreamChild*
968 : AllocPPluginStream(
969 : const nsCString& mimeType,
970 : const nsCString& target,
971 : NPError* result);
972 :
973 : virtual bool
974 : DeallocPPluginStream(PPluginStreamChild* actor);
975 :
976 : virtual PPluginBackgroundDestroyerChild*
977 : AllocPPluginBackgroundDestroyer();
978 :
979 : virtual bool
980 : DeallocPPluginBackgroundDestroyer(PPluginBackgroundDestroyerChild* actor);
981 :
982 : PluginInstanceChild();
983 : virtual ~PluginInstanceChild();
984 : };
985 : } // namespace plugins
986 : } // namespace mozilla
987 :
988 :
989 : // C++ file contents
990 : namespace mozilla {
991 : namespace plugins {
992 : bool
993 : PluginInstanceChild::AnswerNPP_SetWindow(const NPRemoteWindow& window)
994 : {
995 : return false;
996 : }
997 :
998 : bool
999 : PluginInstanceChild::AnswerNPP_GetValue_NPPVpluginWantsAllNetworkStreams(
1000 : bool* value,
1001 : NPError* result)
1002 : {
1003 : return false;
1004 : }
1005 :
1006 : bool
1007 : PluginInstanceChild::AnswerNPP_GetValue_NPPVpluginNeedsXEmbed(
1008 : bool* value,
1009 : NPError* result)
1010 : {
1011 : return false;
1012 : }
1013 :
1014 : bool
1015 : PluginInstanceChild::AnswerNPP_GetValue_NPPVpluginScriptableNPObject(
1016 : PPluginScriptableObjectChild** value,
1017 : NPError* result)
1018 : {
1019 : return false;
1020 : }
1021 :
1022 : bool
1023 : PluginInstanceChild::AnswerNPP_SetValue_NPNVprivateModeBool(
1024 : const bool& value,
1025 : NPError* result)
1026 : {
1027 : return false;
1028 : }
1029 :
1030 : bool
1031 : PluginInstanceChild::AnswerNPP_GetValue_NPPVpluginNativeAccessibleAtkPlugId(
1032 : nsCString* plug_id,
1033 : NPError* result)
1034 : {
1035 : return false;
1036 : }
1037 :
1038 : bool
1039 : PluginInstanceChild::AnswerNPP_HandleEvent(
1040 : const NPRemoteEvent& event,
1041 : int16_t* handled)
1042 : {
1043 : return false;
1044 : }
1045 :
1046 : bool
1047 : PluginInstanceChild::AnswerNPP_HandleEvent_Shmem(
1048 : const NPRemoteEvent& event,
1049 : Shmem& buffer,
1050 : int16_t* handled,
1051 : Shmem* rtnbuffer)
1052 : {
1053 : return false;
1054 : }
1055 :
1056 : bool
1057 : PluginInstanceChild::AnswerNPP_HandleEvent_IOSurface(
1058 : const NPRemoteEvent& event,
1059 : const uint32_t& surfaceid,
1060 : int16_t* handled)
1061 : {
1062 : return false;
1063 : }
1064 :
1065 : bool
1066 : PluginInstanceChild::AnswerPaint(
1067 : const NPRemoteEvent& event,
1068 : int16_t* handled)
1069 : {
1070 : return false;
1071 : }
1072 :
1073 : bool
1074 : PluginInstanceChild::RecvWindowPosChanged(const NPRemoteEvent& event)
1075 : {
1076 : return false;
1077 : }
1078 :
1079 : bool
1080 : PluginInstanceChild::RecvAsyncSetWindow(
1081 : const gfxSurfaceType& surfaceType,
1082 : const NPRemoteWindow& window)
1083 : {
1084 : return false;
1085 : }
1086 :
1087 : bool
1088 : PluginInstanceChild::RecvUpdateBackground(
1089 : const SurfaceDescriptor& background,
1090 : const nsIntRect& rect)
1091 : {
1092 : return false;
1093 : }
1094 :
1095 : bool
1096 : PluginInstanceChild::AnswerHandleTextEvent(
1097 : const nsTextEvent& event,
1098 : bool* handled)
1099 : {
1100 : return false;
1101 : }
1102 :
1103 : bool
1104 : PluginInstanceChild::AnswerHandleKeyEvent(
1105 : const nsKeyEvent& event,
1106 : bool* handled)
1107 : {
1108 : return false;
1109 : }
1110 :
1111 : bool
1112 : PluginInstanceChild::RecvNPP_DidComposite()
1113 : {
1114 : return false;
1115 : }
1116 :
1117 : bool
1118 : PluginInstanceChild::AnswerNPP_Destroy(NPError* rv)
1119 : {
1120 : return false;
1121 : }
1122 :
1123 : bool
1124 : PluginInstanceChild::AnswerSetPluginFocus()
1125 : {
1126 : return false;
1127 : }
1128 :
1129 : bool
1130 : PluginInstanceChild::AnswerUpdateWindow()
1131 : {
1132 : return false;
1133 : }
1134 :
1135 : PStreamNotifyChild*
1136 : PluginInstanceChild::AllocPStreamNotify(
1137 : const nsCString& url,
1138 : const nsCString& target,
1139 : const bool& post,
1140 : const nsCString& buffer,
1141 : const bool& file,
1142 : NPError* result)
1143 : {
1144 : return 0;
1145 : }
1146 :
1147 : bool
1148 : PluginInstanceChild::DeallocPStreamNotify(PStreamNotifyChild* actor)
1149 : {
1150 : return false;
1151 : }
1152 :
1153 : PPluginSurfaceChild*
1154 : PluginInstanceChild::AllocPPluginSurface(
1155 : const WindowsSharedMemoryHandle& handle,
1156 : const gfxIntSize& size,
1157 : const bool& transparent)
1158 : {
1159 : return 0;
1160 : }
1161 :
1162 : bool
1163 : PluginInstanceChild::DeallocPPluginSurface(PPluginSurfaceChild* actor)
1164 : {
1165 : return false;
1166 : }
1167 :
1168 : PPluginScriptableObjectChild*
1169 : PluginInstanceChild::AllocPPluginScriptableObject()
1170 : {
1171 : return 0;
1172 : }
1173 :
1174 : bool
1175 : PluginInstanceChild::DeallocPPluginScriptableObject(PPluginScriptableObjectChild* actor)
1176 : {
1177 : return false;
1178 : }
1179 :
1180 : PBrowserStreamChild*
1181 : PluginInstanceChild::AllocPBrowserStream(
1182 : const nsCString& url,
1183 : const uint32_t& length,
1184 : const uint32_t& lastmodified,
1185 : PStreamNotifyChild* notifyData,
1186 : const nsCString& headers,
1187 : const nsCString& mimeType,
1188 : const bool& seekable,
1189 : NPError* rv,
1190 : uint16_t* stype)
1191 : {
1192 : return 0;
1193 : }
1194 :
1195 : bool
1196 : PluginInstanceChild::DeallocPBrowserStream(PBrowserStreamChild* actor)
1197 : {
1198 : return false;
1199 : }
1200 :
1201 : PPluginStreamChild*
1202 : PluginInstanceChild::AllocPPluginStream(
1203 : const nsCString& mimeType,
1204 : const nsCString& target,
1205 : NPError* result)
1206 : {
1207 : return 0;
1208 : }
1209 :
1210 : bool
1211 : PluginInstanceChild::DeallocPPluginStream(PPluginStreamChild* actor)
1212 : {
1213 : return false;
1214 : }
1215 :
1216 : PPluginBackgroundDestroyerChild*
1217 : PluginInstanceChild::AllocPPluginBackgroundDestroyer()
1218 : {
1219 : return 0;
1220 : }
1221 :
1222 : bool
1223 : PluginInstanceChild::DeallocPPluginBackgroundDestroyer(PPluginBackgroundDestroyerChild* actor)
1224 : {
1225 : return false;
1226 : }
1227 :
1228 : PluginInstanceChild::PluginInstanceChild()
1229 : {
1230 : MOZ_COUNT_CTOR(PluginInstanceChild);
1231 : }
1232 :
1233 : PluginInstanceChild::~PluginInstanceChild()
1234 : {
1235 : MOZ_COUNT_DTOR(PluginInstanceChild);
1236 : }
1237 :
1238 : } // namespace plugins
1239 : } // namespace mozilla
1240 : #endif // if 0
1241 :
1242 : #endif // ifndef PPluginInstanceChild_h
|