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 | #include "config.h" |
26 | |
27 | #include "WebPasteboardProxy.h" |
28 | |
29 | #include "ArgumentCoders.h" |
30 | #include "Decoder.h" |
31 | #include "HandleMessage.h" |
32 | #if PLATFORM(COCOA) |
33 | #include "SandboxExtension.h" |
34 | #endif |
35 | #if PLATFORM(COCOA) || PLATFORM(IOS_FAMILY) |
36 | #include "SharedMemory.h" |
37 | #endif |
38 | #include "WebCoreArgumentCoders.h" |
39 | #include "WebPasteboardProxyMessages.h" |
40 | #if PLATFORM(GTK) |
41 | #include "WebSelectionData.h" |
42 | #endif |
43 | #if PLATFORM(COCOA) |
44 | #include <WebCore/Color.h> |
45 | #endif |
46 | #include <WebCore/Pasteboard.h> |
47 | #if PLATFORM(IOS_FAMILY) |
48 | #include <WebCore/PasteboardItemInfo.h> |
49 | #endif |
50 | #include <wtf/Vector.h> |
51 | #include <wtf/text/WTFString.h> |
52 | |
53 | namespace Messages { |
54 | |
55 | namespace WebPasteboardProxy { |
56 | |
57 | #if PLATFORM(IOS_FAMILY) |
58 | |
59 | void ReadStringFromPasteboard::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const String& string) |
60 | { |
61 | *encoder << string; |
62 | connection.sendSyncReply(WTFMove(encoder)); |
63 | } |
64 | |
65 | #endif |
66 | |
67 | #if PLATFORM(IOS_FAMILY) |
68 | |
69 | void ReadURLFromPasteboard::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const String& url, const String& title) |
70 | { |
71 | *encoder << url; |
72 | *encoder << title; |
73 | connection.sendSyncReply(WTFMove(encoder)); |
74 | } |
75 | |
76 | #endif |
77 | |
78 | #if PLATFORM(IOS_FAMILY) |
79 | |
80 | void ReadBufferFromPasteboard::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const WebKit::SharedMemory::Handle& handle, uint64_t size) |
81 | { |
82 | *encoder << handle; |
83 | *encoder << size; |
84 | connection.sendSyncReply(WTFMove(encoder)); |
85 | } |
86 | |
87 | #endif |
88 | |
89 | #if PLATFORM(IOS_FAMILY) |
90 | |
91 | void GetPasteboardItemsCount::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, uint64_t itemsCount) |
92 | { |
93 | *encoder << itemsCount; |
94 | connection.sendSyncReply(WTFMove(encoder)); |
95 | } |
96 | |
97 | #endif |
98 | |
99 | #if PLATFORM(IOS_FAMILY) |
100 | |
101 | void AllPasteboardItemInfo::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const Vector<WebCore::PasteboardItemInfo>& allInfo) |
102 | { |
103 | *encoder << allInfo; |
104 | connection.sendSyncReply(WTFMove(encoder)); |
105 | } |
106 | |
107 | #endif |
108 | |
109 | #if PLATFORM(IOS_FAMILY) |
110 | |
111 | void InformationForItemAtIndex::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const WebCore::PasteboardItemInfo& info) |
112 | { |
113 | *encoder << info; |
114 | connection.sendSyncReply(WTFMove(encoder)); |
115 | } |
116 | |
117 | #endif |
118 | |
119 | void WriteCustomData::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, uint64_t changeCount) |
120 | { |
121 | *encoder << changeCount; |
122 | connection.sendSyncReply(WTFMove(encoder)); |
123 | } |
124 | |
125 | void TypesSafeForDOMToReadAndWrite::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const Vector<String>& types) |
126 | { |
127 | *encoder << types; |
128 | connection.sendSyncReply(WTFMove(encoder)); |
129 | } |
130 | |
131 | #if PLATFORM(COCOA) |
132 | |
133 | void GetNumberOfFiles::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, uint64_t numberOfFiles) |
134 | { |
135 | *encoder << numberOfFiles; |
136 | connection.sendSyncReply(WTFMove(encoder)); |
137 | } |
138 | |
139 | #endif |
140 | |
141 | #if PLATFORM(COCOA) |
142 | |
143 | void GetPasteboardTypes::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const Vector<String>& types) |
144 | { |
145 | *encoder << types; |
146 | connection.sendSyncReply(WTFMove(encoder)); |
147 | } |
148 | |
149 | #endif |
150 | |
151 | #if PLATFORM(COCOA) |
152 | |
153 | void GetPasteboardPathnamesForType::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const Vector<String>& pathnames, const WebKit::SandboxExtension::HandleArray& sandboxExtensions) |
154 | { |
155 | *encoder << pathnames; |
156 | *encoder << sandboxExtensions; |
157 | connection.sendSyncReply(WTFMove(encoder)); |
158 | } |
159 | |
160 | #endif |
161 | |
162 | #if PLATFORM(COCOA) |
163 | |
164 | void GetPasteboardStringForType::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const String& string) |
165 | { |
166 | *encoder << string; |
167 | connection.sendSyncReply(WTFMove(encoder)); |
168 | } |
169 | |
170 | #endif |
171 | |
172 | #if PLATFORM(COCOA) |
173 | |
174 | void GetPasteboardStringsForType::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const Vector<String>& strings) |
175 | { |
176 | *encoder << strings; |
177 | connection.sendSyncReply(WTFMove(encoder)); |
178 | } |
179 | |
180 | #endif |
181 | |
182 | #if PLATFORM(COCOA) |
183 | |
184 | void GetPasteboardBufferForType::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const WebKit::SharedMemory::Handle& handle, uint64_t size) |
185 | { |
186 | *encoder << handle; |
187 | *encoder << size; |
188 | connection.sendSyncReply(WTFMove(encoder)); |
189 | } |
190 | |
191 | #endif |
192 | |
193 | #if PLATFORM(COCOA) |
194 | |
195 | void PasteboardCopy::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, uint64_t changeCount) |
196 | { |
197 | *encoder << changeCount; |
198 | connection.sendSyncReply(WTFMove(encoder)); |
199 | } |
200 | |
201 | #endif |
202 | |
203 | #if PLATFORM(COCOA) |
204 | |
205 | void GetPasteboardChangeCount::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, uint64_t changeCount) |
206 | { |
207 | *encoder << changeCount; |
208 | connection.sendSyncReply(WTFMove(encoder)); |
209 | } |
210 | |
211 | #endif |
212 | |
213 | #if PLATFORM(COCOA) |
214 | |
215 | void GetPasteboardUniqueName::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const String& pasteboardName) |
216 | { |
217 | *encoder << pasteboardName; |
218 | connection.sendSyncReply(WTFMove(encoder)); |
219 | } |
220 | |
221 | #endif |
222 | |
223 | #if PLATFORM(COCOA) |
224 | |
225 | void GetPasteboardColor::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const WebCore::Color& color) |
226 | { |
227 | *encoder << color; |
228 | connection.sendSyncReply(WTFMove(encoder)); |
229 | } |
230 | |
231 | #endif |
232 | |
233 | #if PLATFORM(COCOA) |
234 | |
235 | void GetPasteboardURL::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const String& urlString) |
236 | { |
237 | *encoder << urlString; |
238 | connection.sendSyncReply(WTFMove(encoder)); |
239 | } |
240 | |
241 | #endif |
242 | |
243 | #if PLATFORM(COCOA) |
244 | |
245 | void AddPasteboardTypes::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, uint64_t changeCount) |
246 | { |
247 | *encoder << changeCount; |
248 | connection.sendSyncReply(WTFMove(encoder)); |
249 | } |
250 | |
251 | #endif |
252 | |
253 | #if PLATFORM(COCOA) |
254 | |
255 | void SetPasteboardTypes::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, uint64_t changeCount) |
256 | { |
257 | *encoder << changeCount; |
258 | connection.sendSyncReply(WTFMove(encoder)); |
259 | } |
260 | |
261 | #endif |
262 | |
263 | #if PLATFORM(COCOA) |
264 | |
265 | void SetPasteboardURL::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, uint64_t changeCount) |
266 | { |
267 | *encoder << changeCount; |
268 | connection.sendSyncReply(WTFMove(encoder)); |
269 | } |
270 | |
271 | #endif |
272 | |
273 | #if PLATFORM(COCOA) |
274 | |
275 | void SetPasteboardColor::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, uint64_t changeCount) |
276 | { |
277 | *encoder << changeCount; |
278 | connection.sendSyncReply(WTFMove(encoder)); |
279 | } |
280 | |
281 | #endif |
282 | |
283 | #if PLATFORM(COCOA) |
284 | |
285 | void SetPasteboardStringForType::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, uint64_t changeCount) |
286 | { |
287 | *encoder << changeCount; |
288 | connection.sendSyncReply(WTFMove(encoder)); |
289 | } |
290 | |
291 | #endif |
292 | |
293 | #if PLATFORM(COCOA) |
294 | |
295 | void SetPasteboardBufferForType::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, uint64_t changeCount) |
296 | { |
297 | *encoder << changeCount; |
298 | connection.sendSyncReply(WTFMove(encoder)); |
299 | } |
300 | |
301 | #endif |
302 | |
303 | #if PLATFORM(GTK) |
304 | |
305 | void ReadFromClipboard::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const WebKit::WebSelectionData& pasteboardContent) |
306 | { |
307 | *encoder << pasteboardContent; |
308 | connection.sendSyncReply(WTFMove(encoder)); |
309 | } |
310 | |
311 | #endif |
312 | |
313 | #if USE(LIBWPE) |
314 | |
315 | void GetPasteboardTypes::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const Vector<String>& types) |
316 | { |
317 | *encoder << types; |
318 | connection.sendSyncReply(WTFMove(encoder)); |
319 | } |
320 | |
321 | #endif |
322 | |
323 | #if USE(LIBWPE) |
324 | |
325 | void ReadStringFromPasteboard::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const String& string) |
326 | { |
327 | *encoder << string; |
328 | connection.sendSyncReply(WTFMove(encoder)); |
329 | } |
330 | |
331 | #endif |
332 | |
333 | } // namespace WebPasteboardProxy |
334 | |
335 | } // namespace Messages |
336 | |
337 | namespace WebKit { |
338 | |
339 | void WebPasteboardProxy::didReceiveMessage(IPC::Connection& connection, IPC::Decoder& decoder) |
340 | { |
341 | #if PLATFORM(IOS_FAMILY) |
342 | if (decoder.messageName() == Messages::WebPasteboardProxy::WriteURLToPasteboard::name()) { |
343 | IPC::handleMessage<Messages::WebPasteboardProxy::WriteURLToPasteboard>(decoder, this, &WebPasteboardProxy::writeURLToPasteboard); |
344 | return; |
345 | } |
346 | #endif |
347 | #if PLATFORM(IOS_FAMILY) |
348 | if (decoder.messageName() == Messages::WebPasteboardProxy::WriteWebContentToPasteboard::name()) { |
349 | IPC::handleMessage<Messages::WebPasteboardProxy::WriteWebContentToPasteboard>(decoder, this, &WebPasteboardProxy::writeWebContentToPasteboard); |
350 | return; |
351 | } |
352 | #endif |
353 | #if PLATFORM(IOS_FAMILY) |
354 | if (decoder.messageName() == Messages::WebPasteboardProxy::WriteImageToPasteboard::name()) { |
355 | IPC::handleMessage<Messages::WebPasteboardProxy::WriteImageToPasteboard>(decoder, this, &WebPasteboardProxy::writeImageToPasteboard); |
356 | return; |
357 | } |
358 | #endif |
359 | #if PLATFORM(IOS_FAMILY) |
360 | if (decoder.messageName() == Messages::WebPasteboardProxy::WriteStringToPasteboard::name()) { |
361 | IPC::handleMessage<Messages::WebPasteboardProxy::WriteStringToPasteboard>(decoder, this, &WebPasteboardProxy::writeStringToPasteboard); |
362 | return; |
363 | } |
364 | #endif |
365 | #if PLATFORM(IOS_FAMILY) |
366 | if (decoder.messageName() == Messages::WebPasteboardProxy::UpdateSupportedTypeIdentifiers::name()) { |
367 | IPC::handleMessage<Messages::WebPasteboardProxy::UpdateSupportedTypeIdentifiers>(decoder, this, &WebPasteboardProxy::updateSupportedTypeIdentifiers); |
368 | return; |
369 | } |
370 | #endif |
371 | #if PLATFORM(GTK) |
372 | if (decoder.messageName() == Messages::WebPasteboardProxy::WriteToClipboard::name()) { |
373 | IPC::handleMessage<Messages::WebPasteboardProxy::WriteToClipboard>(decoder, this, &WebPasteboardProxy::writeToClipboard); |
374 | return; |
375 | } |
376 | #endif |
377 | #if USE(LIBWPE) |
378 | if (decoder.messageName() == Messages::WebPasteboardProxy::WriteWebContentToPasteboard::name()) { |
379 | IPC::handleMessage<Messages::WebPasteboardProxy::WriteWebContentToPasteboard>(decoder, this, &WebPasteboardProxy::writeWebContentToPasteboard); |
380 | return; |
381 | } |
382 | #endif |
383 | #if USE(LIBWPE) |
384 | if (decoder.messageName() == Messages::WebPasteboardProxy::WriteStringToPasteboard::name()) { |
385 | IPC::handleMessage<Messages::WebPasteboardProxy::WriteStringToPasteboard>(decoder, this, &WebPasteboardProxy::writeStringToPasteboard); |
386 | return; |
387 | } |
388 | #endif |
389 | UNUSED_PARAM(connection); |
390 | UNUSED_PARAM(decoder); |
391 | ASSERT_NOT_REACHED(); |
392 | } |
393 | |
394 | void WebPasteboardProxy::didReceiveSyncMessage(IPC::Connection& connection, IPC::Decoder& decoder, std::unique_ptr<IPC::Encoder>& replyEncoder) |
395 | { |
396 | #if PLATFORM(IOS_FAMILY) |
397 | if (decoder.messageName() == Messages::WebPasteboardProxy::ReadStringFromPasteboard::name()) { |
398 | IPC::handleMessageSynchronous<Messages::WebPasteboardProxy::ReadStringFromPasteboard>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::readStringFromPasteboard); |
399 | return; |
400 | } |
401 | #endif |
402 | #if PLATFORM(IOS_FAMILY) |
403 | if (decoder.messageName() == Messages::WebPasteboardProxy::ReadURLFromPasteboard::name()) { |
404 | IPC::handleMessageSynchronous<Messages::WebPasteboardProxy::ReadURLFromPasteboard>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::readURLFromPasteboard); |
405 | return; |
406 | } |
407 | #endif |
408 | #if PLATFORM(IOS_FAMILY) |
409 | if (decoder.messageName() == Messages::WebPasteboardProxy::ReadBufferFromPasteboard::name()) { |
410 | IPC::handleMessageSynchronous<Messages::WebPasteboardProxy::ReadBufferFromPasteboard>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::readBufferFromPasteboard); |
411 | return; |
412 | } |
413 | #endif |
414 | #if PLATFORM(IOS_FAMILY) |
415 | if (decoder.messageName() == Messages::WebPasteboardProxy::GetPasteboardItemsCount::name()) { |
416 | IPC::handleMessageSynchronous<Messages::WebPasteboardProxy::GetPasteboardItemsCount>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::getPasteboardItemsCount); |
417 | return; |
418 | } |
419 | #endif |
420 | #if PLATFORM(IOS_FAMILY) |
421 | if (decoder.messageName() == Messages::WebPasteboardProxy::AllPasteboardItemInfo::name()) { |
422 | IPC::handleMessageSynchronous<Messages::WebPasteboardProxy::AllPasteboardItemInfo>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::allPasteboardItemInfo); |
423 | return; |
424 | } |
425 | #endif |
426 | #if PLATFORM(IOS_FAMILY) |
427 | if (decoder.messageName() == Messages::WebPasteboardProxy::InformationForItemAtIndex::name()) { |
428 | IPC::handleMessageSynchronous<Messages::WebPasteboardProxy::InformationForItemAtIndex>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::informationForItemAtIndex); |
429 | return; |
430 | } |
431 | #endif |
432 | if (decoder.messageName() == Messages::WebPasteboardProxy::WriteCustomData::name()) { |
433 | IPC::handleMessageSynchronous<Messages::WebPasteboardProxy::WriteCustomData>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::writeCustomData); |
434 | return; |
435 | } |
436 | if (decoder.messageName() == Messages::WebPasteboardProxy::TypesSafeForDOMToReadAndWrite::name()) { |
437 | IPC::handleMessageSynchronous<Messages::WebPasteboardProxy::TypesSafeForDOMToReadAndWrite>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::typesSafeForDOMToReadAndWrite); |
438 | return; |
439 | } |
440 | #if PLATFORM(COCOA) |
441 | if (decoder.messageName() == Messages::WebPasteboardProxy::GetNumberOfFiles::name()) { |
442 | IPC::handleMessageSynchronous<Messages::WebPasteboardProxy::GetNumberOfFiles>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::getNumberOfFiles); |
443 | return; |
444 | } |
445 | #endif |
446 | #if PLATFORM(COCOA) |
447 | if (decoder.messageName() == Messages::WebPasteboardProxy::GetPasteboardTypes::name()) { |
448 | IPC::handleMessageSynchronous<Messages::WebPasteboardProxy::GetPasteboardTypes>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::getPasteboardTypes); |
449 | return; |
450 | } |
451 | #endif |
452 | #if PLATFORM(COCOA) |
453 | if (decoder.messageName() == Messages::WebPasteboardProxy::GetPasteboardPathnamesForType::name()) { |
454 | IPC::handleMessageSynchronousWantsConnection<Messages::WebPasteboardProxy::GetPasteboardPathnamesForType>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::getPasteboardPathnamesForType); |
455 | return; |
456 | } |
457 | #endif |
458 | #if PLATFORM(COCOA) |
459 | if (decoder.messageName() == Messages::WebPasteboardProxy::GetPasteboardStringForType::name()) { |
460 | IPC::handleMessageSynchronous<Messages::WebPasteboardProxy::GetPasteboardStringForType>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::getPasteboardStringForType); |
461 | return; |
462 | } |
463 | #endif |
464 | #if PLATFORM(COCOA) |
465 | if (decoder.messageName() == Messages::WebPasteboardProxy::GetPasteboardStringsForType::name()) { |
466 | IPC::handleMessageSynchronous<Messages::WebPasteboardProxy::GetPasteboardStringsForType>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::getPasteboardStringsForType); |
467 | return; |
468 | } |
469 | #endif |
470 | #if PLATFORM(COCOA) |
471 | if (decoder.messageName() == Messages::WebPasteboardProxy::GetPasteboardBufferForType::name()) { |
472 | IPC::handleMessageSynchronous<Messages::WebPasteboardProxy::GetPasteboardBufferForType>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::getPasteboardBufferForType); |
473 | return; |
474 | } |
475 | #endif |
476 | #if PLATFORM(COCOA) |
477 | if (decoder.messageName() == Messages::WebPasteboardProxy::PasteboardCopy::name()) { |
478 | IPC::handleMessageSynchronous<Messages::WebPasteboardProxy::PasteboardCopy>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::pasteboardCopy); |
479 | return; |
480 | } |
481 | #endif |
482 | #if PLATFORM(COCOA) |
483 | if (decoder.messageName() == Messages::WebPasteboardProxy::GetPasteboardChangeCount::name()) { |
484 | IPC::handleMessageSynchronous<Messages::WebPasteboardProxy::GetPasteboardChangeCount>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::getPasteboardChangeCount); |
485 | return; |
486 | } |
487 | #endif |
488 | #if PLATFORM(COCOA) |
489 | if (decoder.messageName() == Messages::WebPasteboardProxy::GetPasteboardUniqueName::name()) { |
490 | IPC::handleMessageSynchronous<Messages::WebPasteboardProxy::GetPasteboardUniqueName>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::getPasteboardUniqueName); |
491 | return; |
492 | } |
493 | #endif |
494 | #if PLATFORM(COCOA) |
495 | if (decoder.messageName() == Messages::WebPasteboardProxy::GetPasteboardColor::name()) { |
496 | IPC::handleMessageSynchronous<Messages::WebPasteboardProxy::GetPasteboardColor>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::getPasteboardColor); |
497 | return; |
498 | } |
499 | #endif |
500 | #if PLATFORM(COCOA) |
501 | if (decoder.messageName() == Messages::WebPasteboardProxy::GetPasteboardURL::name()) { |
502 | IPC::handleMessageSynchronous<Messages::WebPasteboardProxy::GetPasteboardURL>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::getPasteboardURL); |
503 | return; |
504 | } |
505 | #endif |
506 | #if PLATFORM(COCOA) |
507 | if (decoder.messageName() == Messages::WebPasteboardProxy::AddPasteboardTypes::name()) { |
508 | IPC::handleMessageSynchronous<Messages::WebPasteboardProxy::AddPasteboardTypes>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::addPasteboardTypes); |
509 | return; |
510 | } |
511 | #endif |
512 | #if PLATFORM(COCOA) |
513 | if (decoder.messageName() == Messages::WebPasteboardProxy::SetPasteboardTypes::name()) { |
514 | IPC::handleMessageSynchronous<Messages::WebPasteboardProxy::SetPasteboardTypes>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::setPasteboardTypes); |
515 | return; |
516 | } |
517 | #endif |
518 | #if PLATFORM(COCOA) |
519 | if (decoder.messageName() == Messages::WebPasteboardProxy::SetPasteboardURL::name()) { |
520 | IPC::handleMessageSynchronousWantsConnection<Messages::WebPasteboardProxy::SetPasteboardURL>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::setPasteboardURL); |
521 | return; |
522 | } |
523 | #endif |
524 | #if PLATFORM(COCOA) |
525 | if (decoder.messageName() == Messages::WebPasteboardProxy::SetPasteboardColor::name()) { |
526 | IPC::handleMessageSynchronous<Messages::WebPasteboardProxy::SetPasteboardColor>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::setPasteboardColor); |
527 | return; |
528 | } |
529 | #endif |
530 | #if PLATFORM(COCOA) |
531 | if (decoder.messageName() == Messages::WebPasteboardProxy::SetPasteboardStringForType::name()) { |
532 | IPC::handleMessageSynchronous<Messages::WebPasteboardProxy::SetPasteboardStringForType>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::setPasteboardStringForType); |
533 | return; |
534 | } |
535 | #endif |
536 | #if PLATFORM(COCOA) |
537 | if (decoder.messageName() == Messages::WebPasteboardProxy::SetPasteboardBufferForType::name()) { |
538 | IPC::handleMessageSynchronous<Messages::WebPasteboardProxy::SetPasteboardBufferForType>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::setPasteboardBufferForType); |
539 | return; |
540 | } |
541 | #endif |
542 | #if PLATFORM(GTK) |
543 | if (decoder.messageName() == Messages::WebPasteboardProxy::ReadFromClipboard::name()) { |
544 | IPC::handleMessageSynchronous<Messages::WebPasteboardProxy::ReadFromClipboard>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::readFromClipboard); |
545 | return; |
546 | } |
547 | #endif |
548 | #if USE(LIBWPE) |
549 | if (decoder.messageName() == Messages::WebPasteboardProxy::GetPasteboardTypes::name()) { |
550 | IPC::handleMessageSynchronous<Messages::WebPasteboardProxy::GetPasteboardTypes>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::getPasteboardTypes); |
551 | return; |
552 | } |
553 | #endif |
554 | #if USE(LIBWPE) |
555 | if (decoder.messageName() == Messages::WebPasteboardProxy::ReadStringFromPasteboard::name()) { |
556 | IPC::handleMessageSynchronous<Messages::WebPasteboardProxy::ReadStringFromPasteboard>(connection, decoder, replyEncoder, this, &WebPasteboardProxy::readStringFromPasteboard); |
557 | return; |
558 | } |
559 | #endif |
560 | UNUSED_PARAM(connection); |
561 | UNUSED_PARAM(decoder); |
562 | UNUSED_PARAM(replyEncoder); |
563 | ASSERT_NOT_REACHED(); |
564 | } |
565 | |
566 | } // namespace WebKit |
567 | |
568 | |