1/*
2 * Copyright (C) 2010-2018 Apple Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
14 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16 * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
17 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
20 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
21 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
25#pragma once
26
27#if ENABLE(NETSCAPE_PLUGIN_API)
28
29#include "ArgumentCoders.h"
30#include "Connection.h"
31#include "ShareableBitmap.h"
32#include <wtf/Forward.h>
33#include <wtf/ThreadSafeRefCounted.h>
34#include <wtf/text/WTFString.h>
35
36namespace IPC {
37class DataReference;
38}
39
40namespace WebCore {
41class IntRect;
42class AffineTransform;
43class IntSize;
44}
45
46namespace WebKit {
47class WebWheelEvent;
48class WebMouseEvent;
49class WebKeyboardEvent;
50}
51
52namespace Messages {
53namespace PluginControllerProxy {
54
55static inline IPC::StringReference messageReceiverName()
56{
57 return IPC::StringReference("PluginControllerProxy");
58}
59
60class GeometryDidChange {
61public:
62 typedef std::tuple<const WebCore::IntSize&, const WebCore::IntRect&, const WebCore::AffineTransform&, float, const WebKit::ShareableBitmap::Handle&> Arguments;
63
64 static IPC::StringReference receiverName() { return messageReceiverName(); }
65 static IPC::StringReference name() { return IPC::StringReference("GeometryDidChange"); }
66 static const bool isSync = false;
67
68 GeometryDidChange(const WebCore::IntSize& pluginSize, const WebCore::IntRect& clipRect, const WebCore::AffineTransform& pluginToRootViewTransform, float scaleFactor, const WebKit::ShareableBitmap::Handle& backingStoreHandle)
69 : m_arguments(pluginSize, clipRect, pluginToRootViewTransform, scaleFactor, backingStoreHandle)
70 {
71 }
72
73 const Arguments& arguments() const
74 {
75 return m_arguments;
76 }
77
78private:
79 Arguments m_arguments;
80};
81
82class VisibilityDidChange {
83public:
84 typedef std::tuple<bool> Arguments;
85
86 static IPC::StringReference receiverName() { return messageReceiverName(); }
87 static IPC::StringReference name() { return IPC::StringReference("VisibilityDidChange"); }
88 static const bool isSync = false;
89
90 explicit VisibilityDidChange(bool isVisible)
91 : m_arguments(isVisible)
92 {
93 }
94
95 const Arguments& arguments() const
96 {
97 return m_arguments;
98 }
99
100private:
101 Arguments m_arguments;
102};
103
104class FrameDidFinishLoading {
105public:
106 typedef std::tuple<uint64_t> Arguments;
107
108 static IPC::StringReference receiverName() { return messageReceiverName(); }
109 static IPC::StringReference name() { return IPC::StringReference("FrameDidFinishLoading"); }
110 static const bool isSync = false;
111
112 explicit FrameDidFinishLoading(uint64_t requestID)
113 : m_arguments(requestID)
114 {
115 }
116
117 const Arguments& arguments() const
118 {
119 return m_arguments;
120 }
121
122private:
123 Arguments m_arguments;
124};
125
126class FrameDidFail {
127public:
128 typedef std::tuple<uint64_t, bool> Arguments;
129
130 static IPC::StringReference receiverName() { return messageReceiverName(); }
131 static IPC::StringReference name() { return IPC::StringReference("FrameDidFail"); }
132 static const bool isSync = false;
133
134 FrameDidFail(uint64_t requestID, bool wasCancelled)
135 : m_arguments(requestID, wasCancelled)
136 {
137 }
138
139 const Arguments& arguments() const
140 {
141 return m_arguments;
142 }
143
144private:
145 Arguments m_arguments;
146};
147
148class DidEvaluateJavaScript {
149public:
150 typedef std::tuple<uint64_t, const String&> Arguments;
151
152 static IPC::StringReference receiverName() { return messageReceiverName(); }
153 static IPC::StringReference name() { return IPC::StringReference("DidEvaluateJavaScript"); }
154 static const bool isSync = false;
155
156 DidEvaluateJavaScript(uint64_t requestID, const String& result)
157 : m_arguments(requestID, result)
158 {
159 }
160
161 const Arguments& arguments() const
162 {
163 return m_arguments;
164 }
165
166private:
167 Arguments m_arguments;
168};
169
170class StreamWillSendRequest {
171public:
172 typedef std::tuple<uint64_t, const String&, const String&, uint32_t> Arguments;
173
174 static IPC::StringReference receiverName() { return messageReceiverName(); }
175 static IPC::StringReference name() { return IPC::StringReference("StreamWillSendRequest"); }
176 static const bool isSync = false;
177
178 StreamWillSendRequest(uint64_t streamID, const String& requestURLString, const String& redirectResponseURLString, uint32_t redirectResponseStatusCode)
179 : m_arguments(streamID, requestURLString, redirectResponseURLString, redirectResponseStatusCode)
180 {
181 }
182
183 const Arguments& arguments() const
184 {
185 return m_arguments;
186 }
187
188private:
189 Arguments m_arguments;
190};
191
192class StreamDidReceiveResponse {
193public:
194 typedef std::tuple<uint64_t, const String&, uint32_t, uint32_t, const String&, const String&> Arguments;
195
196 static IPC::StringReference receiverName() { return messageReceiverName(); }
197 static IPC::StringReference name() { return IPC::StringReference("StreamDidReceiveResponse"); }
198 static const bool isSync = false;
199
200 StreamDidReceiveResponse(uint64_t streamID, const String& responseURLString, uint32_t streamLength, uint32_t lastModifiedTime, const String& mimeType, const String& headers)
201 : m_arguments(streamID, responseURLString, streamLength, lastModifiedTime, mimeType, headers)
202 {
203 }
204
205 const Arguments& arguments() const
206 {
207 return m_arguments;
208 }
209
210private:
211 Arguments m_arguments;
212};
213
214class StreamDidReceiveData {
215public:
216 typedef std::tuple<uint64_t, const IPC::DataReference&> Arguments;
217
218 static IPC::StringReference receiverName() { return messageReceiverName(); }
219 static IPC::StringReference name() { return IPC::StringReference("StreamDidReceiveData"); }
220 static const bool isSync = false;
221
222 StreamDidReceiveData(uint64_t streamID, const IPC::DataReference& data)
223 : m_arguments(streamID, data)
224 {
225 }
226
227 const Arguments& arguments() const
228 {
229 return m_arguments;
230 }
231
232private:
233 Arguments m_arguments;
234};
235
236class StreamDidFinishLoading {
237public:
238 typedef std::tuple<uint64_t> Arguments;
239
240 static IPC::StringReference receiverName() { return messageReceiverName(); }
241 static IPC::StringReference name() { return IPC::StringReference("StreamDidFinishLoading"); }
242 static const bool isSync = false;
243
244 explicit StreamDidFinishLoading(uint64_t streamID)
245 : m_arguments(streamID)
246 {
247 }
248
249 const Arguments& arguments() const
250 {
251 return m_arguments;
252 }
253
254private:
255 Arguments m_arguments;
256};
257
258class StreamDidFail {
259public:
260 typedef std::tuple<uint64_t, bool> Arguments;
261
262 static IPC::StringReference receiverName() { return messageReceiverName(); }
263 static IPC::StringReference name() { return IPC::StringReference("StreamDidFail"); }
264 static const bool isSync = false;
265
266 StreamDidFail(uint64_t streamID, bool wasCancelled)
267 : m_arguments(streamID, wasCancelled)
268 {
269 }
270
271 const Arguments& arguments() const
272 {
273 return m_arguments;
274 }
275
276private:
277 Arguments m_arguments;
278};
279
280class ManualStreamDidReceiveResponse {
281public:
282 typedef std::tuple<const String&, uint32_t, uint32_t, const String&, const String&> Arguments;
283
284 static IPC::StringReference receiverName() { return messageReceiverName(); }
285 static IPC::StringReference name() { return IPC::StringReference("ManualStreamDidReceiveResponse"); }
286 static const bool isSync = false;
287
288 ManualStreamDidReceiveResponse(const String& responseURLString, uint32_t streamLength, uint32_t lastModifiedTime, const String& mimeType, const String& headers)
289 : m_arguments(responseURLString, streamLength, lastModifiedTime, mimeType, headers)
290 {
291 }
292
293 const Arguments& arguments() const
294 {
295 return m_arguments;
296 }
297
298private:
299 Arguments m_arguments;
300};
301
302class ManualStreamDidReceiveData {
303public:
304 typedef std::tuple<const IPC::DataReference&> Arguments;
305
306 static IPC::StringReference receiverName() { return messageReceiverName(); }
307 static IPC::StringReference name() { return IPC::StringReference("ManualStreamDidReceiveData"); }
308 static const bool isSync = false;
309
310 explicit ManualStreamDidReceiveData(const IPC::DataReference& data)
311 : m_arguments(data)
312 {
313 }
314
315 const Arguments& arguments() const
316 {
317 return m_arguments;
318 }
319
320private:
321 Arguments m_arguments;
322};
323
324class ManualStreamDidFinishLoading {
325public:
326 typedef std::tuple<> Arguments;
327
328 static IPC::StringReference receiverName() { return messageReceiverName(); }
329 static IPC::StringReference name() { return IPC::StringReference("ManualStreamDidFinishLoading"); }
330 static const bool isSync = false;
331
332 const Arguments& arguments() const
333 {
334 return m_arguments;
335 }
336
337private:
338 Arguments m_arguments;
339};
340
341class ManualStreamDidFail {
342public:
343 typedef std::tuple<bool> Arguments;
344
345 static IPC::StringReference receiverName() { return messageReceiverName(); }
346 static IPC::StringReference name() { return IPC::StringReference("ManualStreamDidFail"); }
347 static const bool isSync = false;
348
349 explicit ManualStreamDidFail(bool wasCancelled)
350 : m_arguments(wasCancelled)
351 {
352 }
353
354 const Arguments& arguments() const
355 {
356 return m_arguments;
357 }
358
359private:
360 Arguments m_arguments;
361};
362
363class HandleMouseEvent {
364public:
365 typedef std::tuple<const WebKit::WebMouseEvent&> Arguments;
366
367 static IPC::StringReference receiverName() { return messageReceiverName(); }
368 static IPC::StringReference name() { return IPC::StringReference("HandleMouseEvent"); }
369 static const bool isSync = false;
370
371 explicit HandleMouseEvent(const WebKit::WebMouseEvent& mouseEvent)
372 : m_arguments(mouseEvent)
373 {
374 }
375
376 const Arguments& arguments() const
377 {
378 return m_arguments;
379 }
380
381private:
382 Arguments m_arguments;
383};
384
385class HandleWheelEvent {
386public:
387 typedef std::tuple<const WebKit::WebWheelEvent&> Arguments;
388
389 static IPC::StringReference receiverName() { return messageReceiverName(); }
390 static IPC::StringReference name() { return IPC::StringReference("HandleWheelEvent"); }
391 static const bool isSync = true;
392
393 using DelayedReply = CompletionHandler<void(bool handled)>;
394 static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, bool handled);
395 using Reply = std::tuple<bool&>;
396 using ReplyArguments = std::tuple<bool>;
397 explicit HandleWheelEvent(const WebKit::WebWheelEvent& wheelEvent)
398 : m_arguments(wheelEvent)
399 {
400 }
401
402 const Arguments& arguments() const
403 {
404 return m_arguments;
405 }
406
407private:
408 Arguments m_arguments;
409};
410
411class HandleMouseEnterEvent {
412public:
413 typedef std::tuple<const WebKit::WebMouseEvent&> Arguments;
414
415 static IPC::StringReference receiverName() { return messageReceiverName(); }
416 static IPC::StringReference name() { return IPC::StringReference("HandleMouseEnterEvent"); }
417 static const bool isSync = true;
418
419 using DelayedReply = CompletionHandler<void(bool handled)>;
420 static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, bool handled);
421 using Reply = std::tuple<bool&>;
422 using ReplyArguments = std::tuple<bool>;
423 explicit HandleMouseEnterEvent(const WebKit::WebMouseEvent& mouseEvent)
424 : m_arguments(mouseEvent)
425 {
426 }
427
428 const Arguments& arguments() const
429 {
430 return m_arguments;
431 }
432
433private:
434 Arguments m_arguments;
435};
436
437class HandleMouseLeaveEvent {
438public:
439 typedef std::tuple<const WebKit::WebMouseEvent&> Arguments;
440
441 static IPC::StringReference receiverName() { return messageReceiverName(); }
442 static IPC::StringReference name() { return IPC::StringReference("HandleMouseLeaveEvent"); }
443 static const bool isSync = true;
444
445 using DelayedReply = CompletionHandler<void(bool handled)>;
446 static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, bool handled);
447 using Reply = std::tuple<bool&>;
448 using ReplyArguments = std::tuple<bool>;
449 explicit HandleMouseLeaveEvent(const WebKit::WebMouseEvent& mouseEvent)
450 : m_arguments(mouseEvent)
451 {
452 }
453
454 const Arguments& arguments() const
455 {
456 return m_arguments;
457 }
458
459private:
460 Arguments m_arguments;
461};
462
463class HandleKeyboardEvent {
464public:
465 typedef std::tuple<const WebKit::WebKeyboardEvent&> Arguments;
466
467 static IPC::StringReference receiverName() { return messageReceiverName(); }
468 static IPC::StringReference name() { return IPC::StringReference("HandleKeyboardEvent"); }
469 static const bool isSync = true;
470
471 using DelayedReply = CompletionHandler<void(bool handled)>;
472 static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, bool handled);
473 using Reply = std::tuple<bool&>;
474 using ReplyArguments = std::tuple<bool>;
475 explicit HandleKeyboardEvent(const WebKit::WebKeyboardEvent& keyboardEvent)
476 : m_arguments(keyboardEvent)
477 {
478 }
479
480 const Arguments& arguments() const
481 {
482 return m_arguments;
483 }
484
485private:
486 Arguments m_arguments;
487};
488
489class HandleEditingCommand {
490public:
491 typedef std::tuple<const String&, const String&> Arguments;
492
493 static IPC::StringReference receiverName() { return messageReceiverName(); }
494 static IPC::StringReference name() { return IPC::StringReference("HandleEditingCommand"); }
495 static const bool isSync = true;
496
497 using DelayedReply = CompletionHandler<void(bool handled)>;
498 static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, bool handled);
499 using Reply = std::tuple<bool&>;
500 using ReplyArguments = std::tuple<bool>;
501 HandleEditingCommand(const String& commandName, const String& argument)
502 : m_arguments(commandName, argument)
503 {
504 }
505
506 const Arguments& arguments() const
507 {
508 return m_arguments;
509 }
510
511private:
512 Arguments m_arguments;
513};
514
515class IsEditingCommandEnabled {
516public:
517 typedef std::tuple<const String&> Arguments;
518
519 static IPC::StringReference receiverName() { return messageReceiverName(); }
520 static IPC::StringReference name() { return IPC::StringReference("IsEditingCommandEnabled"); }
521 static const bool isSync = true;
522
523 using DelayedReply = CompletionHandler<void(bool enabled)>;
524 static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, bool enabled);
525 using Reply = std::tuple<bool&>;
526 using ReplyArguments = std::tuple<bool>;
527 explicit IsEditingCommandEnabled(const String& commandName)
528 : m_arguments(commandName)
529 {
530 }
531
532 const Arguments& arguments() const
533 {
534 return m_arguments;
535 }
536
537private:
538 Arguments m_arguments;
539};
540
541class HandlesPageScaleFactor {
542public:
543 typedef std::tuple<> Arguments;
544
545 static IPC::StringReference receiverName() { return messageReceiverName(); }
546 static IPC::StringReference name() { return IPC::StringReference("HandlesPageScaleFactor"); }
547 static const bool isSync = true;
548
549 using DelayedReply = CompletionHandler<void(bool enabled)>;
550 static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, bool enabled);
551 using Reply = std::tuple<bool&>;
552 using ReplyArguments = std::tuple<bool>;
553 const Arguments& arguments() const
554 {
555 return m_arguments;
556 }
557
558private:
559 Arguments m_arguments;
560};
561
562class RequiresUnifiedScaleFactor {
563public:
564 typedef std::tuple<> Arguments;
565
566 static IPC::StringReference receiverName() { return messageReceiverName(); }
567 static IPC::StringReference name() { return IPC::StringReference("RequiresUnifiedScaleFactor"); }
568 static const bool isSync = true;
569
570 using DelayedReply = CompletionHandler<void(bool required)>;
571 static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, bool required);
572 using Reply = std::tuple<bool&>;
573 using ReplyArguments = std::tuple<bool>;
574 const Arguments& arguments() const
575 {
576 return m_arguments;
577 }
578
579private:
580 Arguments m_arguments;
581};
582
583class SetFocus {
584public:
585 typedef std::tuple<bool> Arguments;
586
587 static IPC::StringReference receiverName() { return messageReceiverName(); }
588 static IPC::StringReference name() { return IPC::StringReference("SetFocus"); }
589 static const bool isSync = false;
590
591 explicit SetFocus(bool isFocused)
592 : m_arguments(isFocused)
593 {
594 }
595
596 const Arguments& arguments() const
597 {
598 return m_arguments;
599 }
600
601private:
602 Arguments m_arguments;
603};
604
605class DidUpdate {
606public:
607 typedef std::tuple<> Arguments;
608
609 static IPC::StringReference receiverName() { return messageReceiverName(); }
610 static IPC::StringReference name() { return IPC::StringReference("DidUpdate"); }
611 static const bool isSync = false;
612
613 const Arguments& arguments() const
614 {
615 return m_arguments;
616 }
617
618private:
619 Arguments m_arguments;
620};
621
622class PaintEntirePlugin {
623public:
624 typedef std::tuple<> Arguments;
625
626 static IPC::StringReference receiverName() { return messageReceiverName(); }
627 static IPC::StringReference name() { return IPC::StringReference("PaintEntirePlugin"); }
628 static const bool isSync = true;
629
630 using DelayedReply = CompletionHandler<void()>;
631 static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&);
632 using Reply = std::tuple<>;
633 using ReplyArguments = std::tuple<>;
634 const Arguments& arguments() const
635 {
636 return m_arguments;
637 }
638
639private:
640 Arguments m_arguments;
641};
642
643class GetPluginScriptableNPObject {
644public:
645 typedef std::tuple<> Arguments;
646
647 static IPC::StringReference receiverName() { return messageReceiverName(); }
648 static IPC::StringReference name() { return IPC::StringReference("GetPluginScriptableNPObject"); }
649 static const bool isSync = true;
650
651 using DelayedReply = CompletionHandler<void(uint64_t pluginScriptableNPObjectID)>;
652 static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, uint64_t pluginScriptableNPObjectID);
653 using Reply = std::tuple<uint64_t&>;
654 using ReplyArguments = std::tuple<uint64_t>;
655 const Arguments& arguments() const
656 {
657 return m_arguments;
658 }
659
660private:
661 Arguments m_arguments;
662};
663
664class WindowFocusChanged {
665public:
666 typedef std::tuple<bool> Arguments;
667
668 static IPC::StringReference receiverName() { return messageReceiverName(); }
669 static IPC::StringReference name() { return IPC::StringReference("WindowFocusChanged"); }
670 static const bool isSync = false;
671
672 explicit WindowFocusChanged(bool hasFocus)
673 : m_arguments(hasFocus)
674 {
675 }
676
677 const Arguments& arguments() const
678 {
679 return m_arguments;
680 }
681
682private:
683 Arguments m_arguments;
684};
685
686class WindowVisibilityChanged {
687public:
688 typedef std::tuple<bool> Arguments;
689
690 static IPC::StringReference receiverName() { return messageReceiverName(); }
691 static IPC::StringReference name() { return IPC::StringReference("WindowVisibilityChanged"); }
692 static const bool isSync = false;
693
694 explicit WindowVisibilityChanged(bool isVisible)
695 : m_arguments(isVisible)
696 {
697 }
698
699 const Arguments& arguments() const
700 {
701 return m_arguments;
702 }
703
704private:
705 Arguments m_arguments;
706};
707
708#if PLATFORM(COCOA)
709class SendComplexTextInput {
710public:
711 typedef std::tuple<const String&> Arguments;
712
713 static IPC::StringReference receiverName() { return messageReceiverName(); }
714 static IPC::StringReference name() { return IPC::StringReference("SendComplexTextInput"); }
715 static const bool isSync = false;
716
717 explicit SendComplexTextInput(const String& textInput)
718 : m_arguments(textInput)
719 {
720 }
721
722 const Arguments& arguments() const
723 {
724 return m_arguments;
725 }
726
727private:
728 Arguments m_arguments;
729};
730#endif
731
732#if PLATFORM(COCOA)
733class WindowAndViewFramesChanged {
734public:
735 typedef std::tuple<const WebCore::IntRect&, const WebCore::IntRect&> Arguments;
736
737 static IPC::StringReference receiverName() { return messageReceiverName(); }
738 static IPC::StringReference name() { return IPC::StringReference("WindowAndViewFramesChanged"); }
739 static const bool isSync = false;
740
741 WindowAndViewFramesChanged(const WebCore::IntRect& windowFrameInScreenCoordinates, const WebCore::IntRect& viewFrameInWindowCoordinates)
742 : m_arguments(windowFrameInScreenCoordinates, viewFrameInWindowCoordinates)
743 {
744 }
745
746 const Arguments& arguments() const
747 {
748 return m_arguments;
749 }
750
751private:
752 Arguments m_arguments;
753};
754#endif
755
756#if PLATFORM(COCOA)
757class SetLayerHostingMode {
758public:
759 typedef std::tuple<uint32_t> Arguments;
760
761 static IPC::StringReference receiverName() { return messageReceiverName(); }
762 static IPC::StringReference name() { return IPC::StringReference("SetLayerHostingMode"); }
763 static const bool isSync = false;
764
765 explicit SetLayerHostingMode(uint32_t layerHostingMode)
766 : m_arguments(layerHostingMode)
767 {
768 }
769
770 const Arguments& arguments() const
771 {
772 return m_arguments;
773 }
774
775private:
776 Arguments m_arguments;
777};
778#endif
779
780class SupportsSnapshotting {
781public:
782 typedef std::tuple<> Arguments;
783
784 static IPC::StringReference receiverName() { return messageReceiverName(); }
785 static IPC::StringReference name() { return IPC::StringReference("SupportsSnapshotting"); }
786 static const bool isSync = true;
787
788 using DelayedReply = CompletionHandler<void(bool isSupported)>;
789 static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, bool isSupported);
790 using Reply = std::tuple<bool&>;
791 using ReplyArguments = std::tuple<bool>;
792 const Arguments& arguments() const
793 {
794 return m_arguments;
795 }
796
797private:
798 Arguments m_arguments;
799};
800
801class Snapshot {
802public:
803 typedef std::tuple<> Arguments;
804
805 static IPC::StringReference receiverName() { return messageReceiverName(); }
806 static IPC::StringReference name() { return IPC::StringReference("Snapshot"); }
807 static const bool isSync = true;
808
809 using DelayedReply = CompletionHandler<void(const WebKit::ShareableBitmap::Handle& backingStoreHandle)>;
810 static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, const WebKit::ShareableBitmap::Handle& backingStoreHandle);
811 using Reply = std::tuple<WebKit::ShareableBitmap::Handle&>;
812 using ReplyArguments = std::tuple<WebKit::ShareableBitmap::Handle>;
813 const Arguments& arguments() const
814 {
815 return m_arguments;
816 }
817
818private:
819 Arguments m_arguments;
820};
821
822class StorageBlockingStateChanged {
823public:
824 typedef std::tuple<bool> Arguments;
825
826 static IPC::StringReference receiverName() { return messageReceiverName(); }
827 static IPC::StringReference name() { return IPC::StringReference("StorageBlockingStateChanged"); }
828 static const bool isSync = false;
829
830 explicit StorageBlockingStateChanged(bool storageBlockingEnabled)
831 : m_arguments(storageBlockingEnabled)
832 {
833 }
834
835 const Arguments& arguments() const
836 {
837 return m_arguments;
838 }
839
840private:
841 Arguments m_arguments;
842};
843
844class PrivateBrowsingStateChanged {
845public:
846 typedef std::tuple<bool> Arguments;
847
848 static IPC::StringReference receiverName() { return messageReceiverName(); }
849 static IPC::StringReference name() { return IPC::StringReference("PrivateBrowsingStateChanged"); }
850 static const bool isSync = false;
851
852 explicit PrivateBrowsingStateChanged(bool isPrivateBrowsingEnabled)
853 : m_arguments(isPrivateBrowsingEnabled)
854 {
855 }
856
857 const Arguments& arguments() const
858 {
859 return m_arguments;
860 }
861
862private:
863 Arguments m_arguments;
864};
865
866class GetFormValue {
867public:
868 typedef std::tuple<> Arguments;
869
870 static IPC::StringReference receiverName() { return messageReceiverName(); }
871 static IPC::StringReference name() { return IPC::StringReference("GetFormValue"); }
872 static const bool isSync = true;
873
874 using DelayedReply = CompletionHandler<void(bool returnValue, const String& formValue)>;
875 static void send(std::unique_ptr<IPC::Encoder>&&, IPC::Connection&, bool returnValue, const String& formValue);
876 using Reply = std::tuple<bool&, String&>;
877 using ReplyArguments = std::tuple<bool, String>;
878 const Arguments& arguments() const
879 {
880 return m_arguments;
881 }
882
883private:
884 Arguments m_arguments;
885};
886
887class MutedStateChanged {
888public:
889 typedef std::tuple<bool> Arguments;
890
891 static IPC::StringReference receiverName() { return messageReceiverName(); }
892 static IPC::StringReference name() { return IPC::StringReference("MutedStateChanged"); }
893 static const bool isSync = false;
894
895 explicit MutedStateChanged(bool muted)
896 : m_arguments(muted)
897 {
898 }
899
900 const Arguments& arguments() const
901 {
902 return m_arguments;
903 }
904
905private:
906 Arguments m_arguments;
907};
908
909} // namespace PluginControllerProxy
910} // namespace Messages
911
912#endif // ENABLE(NETSCAPE_PLUGIN_API)
913