Changeset 160508 in webkit
- Timestamp:
- Dec 12, 2013 3:12:38 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r160504 r160508 1 2013-12-12 Anders Carlsson <andersca@apple.com> 2 3 WebPageProxy should be a MessageSender 4 https://bugs.webkit.org/show_bug.cgi?id=125654 5 6 Reviewed by Sam Weinig. 7 8 * Platform/CoreIPC/MessageSender.cpp: 9 (CoreIPC::MessageSender::sendMessage): 10 * Platform/CoreIPC/MessageSender.h: 11 (CoreIPC::MessageSender::send): 12 * Shared/ChildProcessProxy.h: 13 * Shared/WebConnection.cpp: 14 (WebKit::WebConnection::postMessage): 15 * UIProcess/WebPageProxy.cpp: 16 (WebKit::WebPageProxy::initializeWebPage): 17 (WebKit::WebPageProxy::sendMessage): 18 (WebKit::WebPageProxy::messageSenderConnection): 19 (WebKit::WebPageProxy::messageSenderDestinationID): 20 * UIProcess/WebPageProxy.h: 21 1 22 2013-12-12 Anders Carlsson <andersca@apple.com> 2 23 -
trunk/Source/WebKit2/Platform/CoreIPC/MessageSender.cpp
r156354 r160508 33 33 } 34 34 35 bool MessageSender::sendMessage(std::unique_ptr<MessageEncoder> encoder )35 bool MessageSender::sendMessage(std::unique_ptr<MessageEncoder> encoder, unsigned messageSendFlags) 36 36 { 37 37 ASSERT(messageSenderConnection()); 38 38 39 return messageSenderConnection()->sendMessage(std::move(encoder) );39 return messageSenderConnection()->sendMessage(std::move(encoder), messageSendFlags); 40 40 } 41 41 -
trunk/Source/WebKit2/Platform/CoreIPC/MessageSender.h
r160197 r160508 38 38 template<typename U> bool send(const U& message) 39 39 { 40 return send(message, messageSenderDestinationID() );40 return send(message, messageSenderDestinationID(), 0); 41 41 } 42 42 43 template<typename U> bool send(const U& message, uint64_t destinationID )43 template<typename U> bool send(const U& message, uint64_t destinationID, unsigned messageSendFlags = 0) 44 44 { 45 45 static_assert(!U::isSync, "Message is sync!"); … … 48 48 encoder->encode(message.arguments()); 49 49 50 return sendMessage(std::move(encoder) );50 return sendMessage(std::move(encoder), messageSendFlags); 51 51 } 52 52 … … 67 67 } 68 68 69 bool sendMessage(std::unique_ptr<MessageEncoder>);69 virtual bool sendMessage(std::unique_ptr<MessageEncoder>, unsigned messageSendFlags); 70 70 71 71 private: -
trunk/Source/WebKit2/Shared/ChildProcessProxy.h
r160464 r160508 67 67 PlatformProcessIdentifier processIdentifier() const { return m_processLauncher->processIdentifier(); } 68 68 69 bool sendMessage(std::unique_ptr<CoreIPC::MessageEncoder>, unsigned messageSendFlags); 70 69 71 protected: 70 72 void clearConnection(); … … 81 83 virtual void connectionWillOpen(CoreIPC::Connection*); 82 84 virtual void connectionWillClose(CoreIPC::Connection*); 83 84 bool sendMessage(std::unique_ptr<CoreIPC::MessageEncoder>, unsigned messageSendFlags);85 85 86 86 Vector<std::pair<std::unique_ptr<CoreIPC::MessageEncoder>, unsigned>> m_pendingMessages; -
trunk/Source/WebKit2/Shared/WebConnection.cpp
r159988 r160508 56 56 encodeMessageBody(*encoder, messageBody); 57 57 58 sendMessage(std::move(encoder) );58 sendMessage(std::move(encoder), 0); 59 59 } 60 60 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r160495 r160508 526 526 527 527 #if ENABLE(PAGE_VISIBILITY_API) 528 process().send(Messages::WebPage::SetVisibilityState(m_visibilityState, /* isInitialState */ true), m_pageID);528 send(Messages::WebPage::SetVisibilityState(m_visibilityState, /* isInitialState */ true)); 529 529 #elif ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING) 530 process().send(Messages::WebPage::SetVisibilityState(isViewVisible() ? PageVisibilityStateVisible : PageVisibilityStateHidden, /* isInitialState */ true), m_pageID);530 send(Messages::WebPage::SetVisibilityState(isViewVisible() ? PageVisibilityStateVisible : PageVisibilityStateHidden, /* isInitialState */ true)); 531 531 #endif 532 532 533 533 #if PLATFORM(MAC) 534 process().send(Messages::WebPage::SetSmartInsertDeleteEnabled(m_isSmartInsertDeleteEnabled), m_pageID);534 send(Messages::WebPage::SetSmartInsertDeleteEnabled(m_isSmartInsertDeleteEnabled)); 535 535 #endif 536 536 } … … 3091 3091 { 3092 3092 m_findClient.didFailToFindString(this, string); 3093 } 3094 3095 bool WebPageProxy::sendMessage(std::unique_ptr<CoreIPC::MessageEncoder> encoder, unsigned messageSendFlags) 3096 { 3097 return m_process->sendMessage(std::move(encoder), messageSendFlags); 3098 } 3099 3100 CoreIPC::Connection* WebPageProxy::messageSenderConnection() 3101 { 3102 return m_process->connection(); 3103 } 3104 3105 uint64_t WebPageProxy::messageSenderDestinationID() 3106 { 3107 return m_pageID; 3093 3108 } 3094 3109 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r160495 r160508 35 35 #include "GeolocationPermissionRequestManagerProxy.h" 36 36 #include "LayerTreeContext.h" 37 #include "MessageSender.h" 37 38 #include "NotificationPermissionRequestManagerProxy.h" 38 39 #include "PageLoadState.h" … … 314 315 #endif 315 316 316 class WebPageProxy 317 : public API::ObjectImpl<API::Object::Type::Page> 317 class WebPageProxy : public API::ObjectImpl<API::Object::Type::Page> 318 318 #if ENABLE(INPUT_TYPE_COLOR) 319 319 , public WebColorPicker::Client 320 320 #endif 321 321 , public WebPopupMenuProxy::Client 322 , public CoreIPC::MessageReceiver { 322 , public CoreIPC::MessageReceiver 323 , public CoreIPC::MessageSender { 323 324 public: 324 325 … … 863 864 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&) OVERRIDE; 864 865 virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&, std::unique_ptr<CoreIPC::MessageEncoder>&) OVERRIDE; 866 867 // CoreIPC::MessageSender 868 virtual bool sendMessage(std::unique_ptr<CoreIPC::MessageEncoder>, unsigned messageSendFlags) OVERRIDE; 869 virtual CoreIPC::Connection* messageSenderConnection() OVERRIDE; 870 virtual uint64_t messageSenderDestinationID() OVERRIDE; 865 871 866 872 // WebPopupMenuProxy::Client
Note: See TracChangeset
for help on using the changeset viewer.