Changeset 224351 in webkit
- Timestamp:
- Nov 2, 2017 1:18:31 PM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 3 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r224346 r224351 1 2017-11-02 Yousuke Kimoto <yousuke.kimoto@sony.com> 2 3 [WinCairo] Add IPC files for wincairo webkit 4 https://bugs.webkit.org/show_bug.cgi?id=177919 5 6 Reviewed by Alex Christensen. 7 8 * Platform/IPC/Attachment.cpp: 9 * Platform/IPC/Attachment.h: 10 (IPC::Attachment::Attachment): 11 (IPC::Attachment::handle): 12 * Platform/IPC/Connection.h: 13 (IPC::Connection::identifierIsNull): 14 (IPC::Connection::sendWithReply): 15 * Platform/IPC/win/AttachmentWin.cpp: Added. 16 (IPC::Attachment::encode const): 17 (IPC::getDuplicatedHandle): 18 (IPC::Attachment::decode): 19 * Platform/IPC/win/ConnectionWin.cpp: Added. 20 (IPC::Connection::createServerAndClientIdentifiers): 21 (IPC::Connection::platformInitialize): 22 (IPC::Connection::platformInvalidate): 23 (IPC::Connection::readEventHandler): 24 (IPC::Connection::writeEventHandler): 25 (IPC::Connection::open): 26 (IPC::Connection::platformCanSendOutgoingMessages const): 27 (IPC::Connection::sendOutgoingMessage): 28 (IPC::Connection::willSendSyncMessage): 29 (IPC::Connection::didReceiveSyncReply): 30 * PlatformWin.cmake: 31 1 32 2017-11-02 Megan Gardner <megan_gardner@apple.com> 2 33 -
trunk/Source/WebKit/Platform/IPC/Attachment.cpp
r204668 r224351 51 51 #endif 52 52 53 #if !OS(WINDOWS) 53 54 void Attachment::encode(Encoder& encoder) const 54 55 { … … 62 63 return true; 63 64 } 65 #endif 64 66 65 67 } // namespace IPC -
trunk/Source/WebKit/Platform/IPC/Attachment.h
r204668 r224351 1 1 /* 2 2 * Copyright (C) 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2017 Sony Interactive Entertainment Inc. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 24 25 */ 25 26 26 #ifndef Attachment_h 27 #define Attachment_h 27 # pragma once 28 28 29 29 #if OS(DARWIN) && !USE(UNIX_DOMAIN_SOCKETS) … … 59 59 #elif OS(DARWIN) 60 60 Attachment(mach_port_name_t, mach_msg_type_name_t disposition); 61 #elif OS(WINDOWS) 62 Attachment(HANDLE handle) 63 : m_handle(handle) 64 { } 61 65 #endif 62 66 … … 74 78 mach_port_name_t port() const { return m_port; } 75 79 mach_msg_type_name_t disposition() const { return m_disposition; } 80 #elif OS(WINDOWS) 81 HANDLE handle() { return m_handle; } 76 82 #endif 77 83 … … 88 94 mach_port_name_t m_port; 89 95 mach_msg_type_name_t m_disposition; 96 #elif OS(WINDOWS) 97 HANDLE m_handle; 90 98 #endif 91 99 }; 92 100 93 101 } // namespace IPC 94 95 #endif // Attachment_h -
trunk/Source/WebKit/Platform/IPC/Connection.h
r219050 r224351 3 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 4 4 * Portions Copyright (c) 2010 Motorola Mobility, Inc. All rights reserved. 5 * Copyright (C) 2017 Sony Interactive Entertainment Inc. 5 6 * 6 7 * Redistribution and use in source and binary forms, with or without … … 136 137 bool getAuditToken(audit_token_t&); 137 138 pid_t remoteProcessID() const; 139 #elif OS(WINDOWS) 140 typedef HANDLE Identifier; 141 static bool createServerAndClientIdentifiers(Identifier& serverIdentifier, Identifier& clientIdentifier); 142 static bool identifierIsNull(Identifier identifier) { return !identifier; } 138 143 #endif 139 144 … … 145 150 146 151 void setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage(bool); 147 void setShouldExitOnSyncMessageSendFailure(bool shouldExitOnSyncMessageSendFailure);152 void setShouldExitOnSyncMessageSendFailure(bool); 148 153 149 154 // The set callback will be called on the connection work queue when the connection is closed, … … 153 158 // handling the message on the client thread first. 154 159 typedef void (*DidCloseOnConnectionWorkQueueCallback)(Connection*); 155 void setDidCloseOnConnectionWorkQueueCallback(DidCloseOnConnectionWorkQueueCallback callback);160 void setDidCloseOnConnectionWorkQueueCallback(DidCloseOnConnectionWorkQueueCallback); 156 161 157 162 void addWorkQueueMessageReceiver(StringReference messageReceiverName, WorkQueue&, WorkQueueMessageReceiver*); … … 165 170 166 171 template<typename T> bool send(T&& message, uint64_t destinationID, OptionSet<SendOption> sendOptions = { }); 167 template<typename T> void sendWithReply(T&& message, uint64_t destinationID, FunctionDispatcher& replyDispatcher, Function<void 172 template<typename T> void sendWithReply(T&& message, uint64_t destinationID, FunctionDispatcher& replyDispatcher, Function<void(std::optional<typename CodingType<typename T::Reply>::Type>)>&& replyHandler); 168 173 template<typename T> bool sendSync(T&& message, typename T::Reply&& reply, uint64_t destinationID, Seconds timeout = Seconds::infinity(), OptionSet<SendSyncOption> sendSyncOptions = { }); 169 174 template<typename T> bool waitForAndDispatchImmediately(uint64_t destinationID, Seconds timeout, OptionSet<WaitForOption> waitForOptions = { }); 170 175 171 176 bool sendMessage(std::unique_ptr<Encoder>, OptionSet<SendOption> sendOptions); 172 void sendMessageWithReply(uint64_t requestID, std::unique_ptr<Encoder>, FunctionDispatcher& replyDispatcher, Function<void 177 void sendMessageWithReply(uint64_t requestID, std::unique_ptr<Encoder>, FunctionDispatcher& replyDispatcher, Function<void(std::unique_ptr<Decoder>)>&& replyHandler); 173 178 std::unique_ptr<Encoder> createSyncMessageEncoder(StringReference messageReceiverName, StringReference messageName, uint64_t destinationID, uint64_t& syncRequestID); 174 179 std::unique_ptr<Decoder> sendSyncMessage(uint64_t syncRequestID, std::unique_ptr<Encoder>, Seconds timeout, OptionSet<SendSyncOption> sendSyncOptions); … … 195 200 #endif 196 201 197 uint64_t installIncomingSyncMessageCallback(WTF::Function<void 202 uint64_t installIncomingSyncMessageCallback(WTF::Function<void()>&&); 198 203 void uninstallIncomingSyncMessageCallback(uint64_t); 199 204 bool hasIncomingSyncMessage(); … … 293 298 294 299 Lock m_incomingSyncMessageCallbackMutex; 295 HashMap<uint64_t, WTF::Function<void 300 HashMap<uint64_t, WTF::Function<void()>> m_incomingSyncMessageCallbacks; 296 301 RefPtr<WorkQueue> m_incomingSyncMessageCallbackQueue; 297 302 uint64_t m_nextIncomingSyncMessageCallbackID { 0 }; … … 331 336 332 337 OSObjectPtr<xpc_connection_t> m_xpcConnection; 338 #elif OS(WINDOWS) 339 // Called on the connection queue. 340 void readEventHandler(); 341 void writeEventHandler(); 342 343 Vector<uint8_t> m_readBuffer; 344 OVERLAPPED m_readState; 345 std::unique_ptr<Encoder> m_pendingWriteEncoder; 346 OVERLAPPED m_writeState; 347 HANDLE m_connectionPipe; 333 348 #endif 334 349 }; … … 346 361 347 362 template<typename T> 348 void Connection::sendWithReply(T&& message, uint64_t destinationID, FunctionDispatcher& replyDispatcher, Function<void 363 void Connection::sendWithReply(T&& message, uint64_t destinationID, FunctionDispatcher& replyDispatcher, Function<void(std::optional<typename CodingType<typename T::Reply>::Type>)>&& replyHandler) 349 364 { 350 365 uint64_t requestID = 0; -
trunk/Source/WebKit/PlatformWin.cmake
r223966 r224351 25 25 26 26 Shared/curl/WebCoreArgumentCodersCurl.cpp 27 28 Platform/IPC/win/AttachmentWin.cpp 29 Platform/IPC/win/ConnectionWin.cpp 27 30 28 31 StorageProcess/win/StorageProcessMainWin.cpp
Note: See TracChangeset
for help on using the changeset viewer.