Changeset 150669 in webkit
- Timestamp:
- May 24, 2013 5:17:20 PM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 40 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r150666 r150669 1 2013-05-24 Anders Carlsson <andersca@apple.com> 2 3 MessageSender shouldn't be a class template 4 https://bugs.webkit.org/show_bug.cgi?id=116743 5 6 Reviewed by Andreas Kling. 7 8 Change MessageSender to be a proper abstract base class. Subclasses of MessageSender must 9 implement messageSenderConnection() as well as messageSenderDestinationID(). 10 11 This reduces code size and will allow us to be more flexible with MessageSender in the future. 12 13 * NetworkProcess/NetworkResourceLoader.cpp: 14 (WebKit::NetworkResourceLoader::sendAbortingOnFailure): 15 (WebKit::NetworkResourceLoader::messageSenderConnection): 16 (WebKit): 17 (WebKit::NetworkResourceLoader::messageSenderDestinationID): 18 * NetworkProcess/NetworkResourceLoader.h: 19 (NetworkResourceLoader): 20 * NetworkProcess/mac/DiskCacheMonitor.h: 21 (DiskCacheMonitor): 22 * NetworkProcess/mac/DiskCacheMonitor.mm: 23 (WebKit::DiskCacheMonitor::messageSenderConnection): 24 (WebKit::DiskCacheMonitor::messageSenderDestinationID): 25 (WebKit): 26 * Platform/CoreIPC/MessageSender.h: 27 (CoreIPC): 28 (MessageSender): 29 (CoreIPC::MessageSender::send): 30 (CoreIPC::MessageSender::sendSync): 31 * Shared/ChildProcess.cpp: 32 (WebKit::ChildProcess::messageSenderConnection): 33 (WebKit): 34 (WebKit::ChildProcess::messageSenderDestinationID): 35 * Shared/ChildProcess.h: 36 (ChildProcess): 37 * Shared/Downloads/Download.cpp: 38 (WebKit::Download::messageSenderConnection): 39 (WebKit): 40 (WebKit::Download::messageSenderDestinationID): 41 * Shared/Downloads/Download.h: 42 (Download): 43 * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm: 44 (WebKit::CustomProtocolManager::initialize): 45 * Shared/WebConnection.h: 46 (WebConnection): 47 * Shared/mac/SecItemShim.cpp: 48 (WebKit::sendSecItemRequest): 49 * UIProcess/WebConnectionToWebProcess.cpp: 50 (WebKit::WebConnectionToWebProcess::hasValidConnection): 51 (WebKit::WebConnectionToWebProcess::messageSenderConnection): 52 (WebKit::WebConnectionToWebProcess::messageSenderDestinationID): 53 * UIProcess/WebConnectionToWebProcess.h: 54 (WebConnectionToWebProcess): 55 * WebKit2.xcodeproj/project.pbxproj: 56 * WebProcess/Geolocation/WebGeolocationManager.cpp: 57 (WebKit::WebGeolocationManager::registerWebPage): 58 (WebKit::WebGeolocationManager::unregisterWebPage): 59 * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp: 60 (WebKit::WebIconDatabaseProxy::retainIconForPageURL): 61 (WebKit::WebIconDatabaseProxy::releaseIconForPageURL): 62 (WebKit::WebIconDatabaseProxy::synchronousIconForPageURL): 63 (WebKit::WebIconDatabaseProxy::loadDecisionForIconURL): 64 (WebKit::WebIconDatabaseProxy::setIconURLForPageURL): 65 (WebKit::WebIconDatabaseProxy::setIconDataForIconURL): 66 * WebProcess/InjectedBundle/InjectedBundle.cpp: 67 (WebKit::InjectedBundle::postMessage): 68 (WebKit::InjectedBundle::postSynchronousMessage): 69 * WebProcess/Network/WebResourceLoader.cpp: 70 (WebKit::WebResourceLoader::messageSenderConnection): 71 (WebKit::WebResourceLoader::messageSenderDestinationID): 72 * WebProcess/Network/WebResourceLoader.h: 73 (WebResourceLoader): 74 * WebProcess/Notifications/WebNotificationManager.cpp: 75 (WebKit::WebNotificationManager::show): 76 (WebKit::WebNotificationManager::cancel): 77 (WebKit::WebNotificationManager::clearNotifications): 78 (WebKit::WebNotificationManager::didDestroyNotification): 79 * WebProcess/Plugins/PDF/PDFPlugin.mm: 80 (WebKit::PDFPlugin::writeItemsToPasteboard): 81 * WebProcess/Plugins/PluginProcessConnectionManager.cpp: 82 (WebKit::PluginProcessConnectionManager::getPluginProcessConnection): 83 * WebProcess/Storage/StorageAreaMap.cpp: 84 (WebKit::StorageAreaMap::StorageAreaMap): 85 (WebKit::StorageAreaMap::~StorageAreaMap): 86 (WebKit::StorageAreaMap::setItem): 87 (WebKit::StorageAreaMap::removeItem): 88 (WebKit::StorageAreaMap::clear): 89 (WebKit::StorageAreaMap::loadValuesIfNeeded): 90 * WebProcess/WebConnectionToUIProcess.cpp: 91 (WebKit::WebConnectionToUIProcess::hasValidConnection): 92 (WebKit::WebConnectionToUIProcess::messageSenderConnection): 93 (WebKit::WebConnectionToUIProcess::messageSenderDestinationID): 94 * WebProcess/WebConnectionToUIProcess.h: 95 (WebConnectionToUIProcess): 96 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 97 (WebKit::WebChromeClient::windowRect): 98 (WebKit::WebChromeClient::focusedFrameChanged): 99 (WebKit::WebChromeClient::createWindow): 100 (WebKit::WebChromeClient::toolbarsVisible): 101 (WebKit::WebChromeClient::statusbarVisible): 102 (WebKit::WebChromeClient::menubarVisible): 103 (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel): 104 (WebKit::WebChromeClient::runJavaScriptAlert): 105 (WebKit::WebChromeClient::runJavaScriptConfirm): 106 (WebKit::WebChromeClient::runJavaScriptPrompt): 107 (WebKit::WebChromeClient::shouldInterruptJavaScript): 108 (WebKit::WebChromeClient::exceededDatabaseQuota): 109 * WebProcess/WebCoreSupport/WebColorChooser.cpp: 110 (WebKit::WebColorChooser::WebColorChooser): 111 (WebKit::WebColorChooser::setSelectedColor): 112 (WebKit::WebColorChooser::endChooser): 113 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 114 (WebKit::WebFrameLoaderClient::dispatchDidReceiveIcon): 115 (WebKit::WebFrameLoaderClient::updateGlobalHistory): 116 (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks): 117 (WebKit::WebFrameLoaderClient::setTitle): 118 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: 119 (WebKit::WebPlatformStrategies::populatePluginCache): 120 (WebKit::WebPlatformStrategies::getTypes): 121 (WebKit::WebPlatformStrategies::bufferForType): 122 (WebKit::WebPlatformStrategies::getPathnamesForType): 123 (WebKit::WebPlatformStrategies::stringForType): 124 (WebKit::WebPlatformStrategies::copy): 125 (WebKit::WebPlatformStrategies::changeCount): 126 (WebKit::WebPlatformStrategies::uniqueName): 127 (WebKit::WebPlatformStrategies::color): 128 (WebKit::WebPlatformStrategies::url): 129 (WebKit::WebPlatformStrategies::addTypes): 130 (WebKit::WebPlatformStrategies::setTypes): 131 (WebKit::WebPlatformStrategies::setBufferForType): 132 (WebKit::WebPlatformStrategies::setPathnamesForType): 133 (WebKit::WebPlatformStrategies::setStringForType): 134 * WebProcess/WebCoreSupport/WebPopupMenu.cpp: 135 (WebKit::WebPopupMenu::show): 136 (WebKit::WebPopupMenu::hide): 137 * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp: 138 (WebKit::WebSearchPopupMenu::saveRecentSearches): 139 (WebKit::WebSearchPopupMenu::loadRecentSearches): 140 * WebProcess/WebPage/EventDispatcher.cpp: 141 (WebKit::EventDispatcher::sendDidReceiveEvent): 142 * WebProcess/WebPage/WebBackForwardListProxy.cpp: 143 (WebKit::updateBackForwardItem): 144 (WebKit::WebBackForwardListProxy::itemAtIndex): 145 (WebKit::WebBackForwardListProxy::backListCount): 146 (WebKit::WebBackForwardListProxy::forwardListCount): 147 * WebProcess/WebPage/WebInspector.cpp: 148 (WebKit::WebInspector::createInspectorPage): 149 (WebKit::WebInspector::didClose): 150 (WebKit::WebInspector::bringToFront): 151 (WebKit::WebInspector::inspectedURLChanged): 152 (WebKit::WebInspector::save): 153 (WebKit::WebInspector::append): 154 (WebKit::WebInspector::attachBottom): 155 (WebKit::WebInspector::attachRight): 156 (WebKit::WebInspector::detach): 157 (WebKit::WebInspector::setAttachedWindowHeight): 158 (WebKit::WebInspector::setAttachedWindowWidth): 159 (WebKit::WebInspector::setToolbarHeight): 160 (WebKit::WebInspector::updateDockingAvailability): 161 (WebKit::WebInspector::sendMessageToRemoteFrontend): 162 * WebProcess/WebPage/WebPage.cpp: 163 (WebKit::WebPage::messageSenderConnection): 164 (WebKit): 165 (WebKit::WebPage::messageSenderDestinationID): 166 * WebProcess/WebPage/WebPage.h: 167 (WebPage): 168 * WebProcess/WebPage/mac/WebPageMac.mm: 169 (WebKit::WebPage::executeKeypressCommandsInternal): 170 (WebKit::WebPage::handleEditingKeyboardEvent): 171 * WebProcess/WebProcess.cpp: 172 (WebKit::WebProcess::ensureNetworkProcessConnection): 173 (WebKit::WebProcess::shouldTerminate): 174 1 175 2013-05-24 Tim Horton <timothy_horton@apple.com> 2 176 -
trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp
r149499 r150669 66 66 } 67 67 68 CoreIPC::Connection* NetworkResourceLoader::connection() const69 {70 return connectionToWebProcess()->connection();71 }72 73 uint64_t NetworkResourceLoader::destinationID() const74 {75 return identifier();76 }77 78 68 void NetworkResourceLoader::start() 79 69 { … … 112 102 template<typename U> bool NetworkResourceLoader::sendAbortingOnFailure(const U& message, unsigned messageSendFlags) 113 103 { 114 bool result = connection()->send(message, destinationID(), messageSendFlags);104 bool result = messageSenderConnection()->send(message, messageSenderDestinationID(), messageSendFlags); 115 105 if (!result) 116 106 abort(); … … 305 295 } 306 296 297 CoreIPC::Connection* NetworkResourceLoader::messageSenderConnection() 298 { 299 return connectionToWebProcess()->connection(); 300 } 301 302 uint64_t NetworkResourceLoader::messageSenderDestinationID() 303 { 304 return identifier(); 305 } 306 307 307 #if USE(PROTECTION_SPACE_AUTH_CALLBACK) 308 308 void NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync(ResourceHandle* handle, const ProtectionSpace& protectionSpace) -
trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h
r149499 r150669 48 48 class RemoteNetworkingContext; 49 49 50 class NetworkResourceLoader : public SchedulableLoader, public WebCore::ResourceHandleClient, public CoreIPC::MessageSender <NetworkResourceLoader>{50 class NetworkResourceLoader : public SchedulableLoader, public WebCore::ResourceHandleClient, public CoreIPC::MessageSender { 51 51 public: 52 52 static RefPtr<NetworkResourceLoader> create(const NetworkResourceLoadParameters& parameters, NetworkConnectionToWebProcess* connection) … … 56 56 57 57 ~NetworkResourceLoader(); 58 59 // Used by MessageSender.60 CoreIPC::Connection* connection() const;61 uint64_t destinationID() const;62 58 63 59 WebCore::ResourceHandle* handle() const { return m_handle.get(); } … … 108 104 NetworkResourceLoader(const NetworkResourceLoadParameters&, NetworkConnectionToWebProcess*); 109 105 106 // CoreIPC::MessageSender 107 virtual CoreIPC::Connection* messageSenderConnection() OVERRIDE; 108 virtual uint64_t messageSenderDestinationID() OVERRIDE; 109 110 110 void continueWillSendRequest(const WebCore::ResourceRequest& newRequest); 111 111 void continueDidReceiveResponse(); -
trunk/Source/WebKit2/NetworkProcess/mac/DiskCacheMonitor.h
r147006 r150669 38 38 class NetworkResourceLoader; 39 39 40 class DiskCacheMonitor : public CoreIPC::MessageSender <DiskCacheMonitor>{40 class DiskCacheMonitor : public CoreIPC::MessageSender { 41 41 public: 42 42 static void monitorFileBackingStoreCreation(CFCachedURLResponseRef, NetworkResourceLoader*); 43 43 44 // Used by MessageSender.45 CoreIPC::Connection* connection() const;46 uint64_t destinationID() const { return 0; }47 48 44 const WebCore::ResourceRequest& resourceRequest() const { return m_resourceRequest; } 49 45 50 46 private: 51 47 DiskCacheMonitor(CFCachedURLResponseRef, NetworkResourceLoader*); 52 48 49 // CoreIPC::MessageSender 50 virtual CoreIPC::Connection* messageSenderConnection() OVERRIDE; 51 virtual uint64_t messageSenderDestinationID() OVERRIDE; 52 53 53 RefPtr<NetworkConnectionToWebProcess> m_connectionToWebProcess; 54 54 WebCore::ResourceRequest m_resourceRequest; -
trunk/Source/WebKit2/NetworkProcess/mac/DiskCacheMonitor.mm
r149678 r150669 95 95 } 96 96 97 CoreIPC::Connection* DiskCacheMonitor:: connection() const97 CoreIPC::Connection* DiskCacheMonitor::messageSenderConnection() 98 98 { 99 99 return m_connectionToWebProcess->connection(); 100 } 101 102 uint64_t DiskCacheMonitor::messageSenderDestinationID() 103 { 104 return 0; 100 105 } 101 106 -
trunk/Source/WebKit2/Platform/CoreIPC/MessageSender.cpp
r150668 r150669 1 1 /* 2 * Copyright (C) 201 1Apple Inc. All rights reserved.2 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #i fndef WebConnectionToUIProcess_h27 # define WebConnectionToUIProcess_h26 #include "config.h" 27 #include "MessageSender.h" 28 28 29 #include "WebConnection.h" 29 namespace CoreIPC { 30 30 31 namespace WebKit { 31 MessageSender::~MessageSender() 32 { 33 } 32 34 33 class WebProcess; 35 bool MessageSender::sendMessage(PassOwnPtr<MessageEncoder> encoder) 36 { 37 ASSERT(messageSenderConnection()); 34 38 35 class WebConnectionToUIProcess : public WebConnection { 36 public: 37 static PassRefPtr<WebConnectionToUIProcess> create(WebProcess*); 39 return messageSenderConnection()->sendMessage(encoder); 40 } 38 41 39 void invalidate(); 40 41 private: 42 WebConnectionToUIProcess(WebProcess*); 43 44 // WebConnection 45 virtual void encodeMessageBody(CoreIPC::ArgumentEncoder&, APIObject*) OVERRIDE; 46 virtual bool decodeMessageBody(CoreIPC::ArgumentDecoder&, RefPtr<APIObject>&) OVERRIDE; 47 virtual CoreIPC::Connection* connection() const OVERRIDE; 48 virtual uint64_t destinationID() const OVERRIDE; 49 virtual bool hasValidConnection() const OVERRIDE; 50 51 WebProcess* m_process; 52 }; 53 54 } // namespace WebKit 55 56 #endif // WebConnectionToUIProcess_h 42 } // namespace CoreIPC -
trunk/Source/WebKit2/Platform/CoreIPC/MessageSender.h
r141191 r150669 31 31 32 32 namespace CoreIPC { 33 34 template<typename T>class MessageSender {33 34 class MessageSender { 35 35 public: 36 virtual ~MessageSender(); 37 36 38 template<typename U> bool send(const U& message) 37 39 { 38 return send(message, static_cast<T*>(this)->destinationID());40 return send(message, messageSenderDestinationID()); 39 41 } 40 42 … … 45 47 encoder->encode(message); 46 48 47 return static_cast<T*>(this)->sendMessage(encoder.release()); 48 } 49 50 bool sendMessage(PassOwnPtr<MessageEncoder> encoder) 51 { 52 Connection* connection = static_cast<T*>(this)->connection(); 53 ASSERT(connection); 54 55 return connection->sendMessage(encoder); 49 return sendMessage(encoder.release()); 56 50 } 57 51 … … 59 53 { 60 54 COMPILE_ASSERT(U::isSync, SyncMessageExpected); 61 return sendSync(message, reply, static_cast<T*>(this)->destinationID(), timeout);55 return sendSync(message, reply, messageSenderDestinationID(), timeout); 62 56 } 63 57 64 58 template<typename U> bool sendSync(const U& message, const typename U::Reply& reply, uint64_t destinationID, double timeout = Connection::NoTimeout) 65 59 { 66 Connection* connection = static_cast<T*>(this)->connection(); 67 ASSERT(connection); 60 ASSERT(messageSenderConnection()); 68 61 69 return connection->sendSync(message, reply, destinationID, timeout);62 return messageSenderConnection()->sendSync(message, reply, destinationID, timeout); 70 63 } 64 65 bool sendMessage(PassOwnPtr<MessageEncoder>); 66 67 private: 68 virtual Connection* messageSenderConnection() = 0; 69 virtual uint64_t messageSenderDestinationID() = 0; 71 70 }; 72 71 -
trunk/Source/WebKit2/Shared/ChildProcess.cpp
r141796 r150669 130 130 } 131 131 132 CoreIPC::Connection* ChildProcess::messageSenderConnection() 133 { 134 return m_connection.get(); 135 } 136 137 uint64_t ChildProcess::messageSenderDestinationID() 138 { 139 return 0; 140 } 141 132 142 void ChildProcess::terminationTimerFired() 133 143 { -
trunk/Source/WebKit2/Shared/ChildProcess.h
r149413 r150669 47 47 }; 48 48 49 class ChildProcess : protected CoreIPC::Connection::Client, public CoreIPC::MessageSender <ChildProcess>{49 class ChildProcess : protected CoreIPC::Connection::Client, public CoreIPC::MessageSender { 50 50 WTF_MAKE_NONCOPYABLE(ChildProcess); 51 51 … … 71 71 CoreIPC::Connection* parentProcessConnection() const { return m_connection.get(); } 72 72 73 // Used by CoreIPC::MessageSender74 CoreIPC::Connection* connection() const { return m_connection.get(); }75 uint64_t destinationID() const { return 0; }76 77 73 CoreIPC::MessageReceiverMap& messageReceiverMap() { return m_messageReceiverMap; } 78 74 … … 92 88 93 89 private: 90 // CoreIPC::MessageSender 91 virtual CoreIPC::Connection* messageSenderConnection() OVERRIDE; 92 virtual uint64_t messageSenderDestinationID() OVERRIDE; 93 94 94 void terminationTimerFired(); 95 95 -
trunk/Source/WebKit2/Shared/Downloads/Download.cpp
r145369 r150669 66 66 67 67 m_downloadManager.didDestroyDownload(); 68 }69 70 CoreIPC::Connection* Download::connection() const71 {72 return m_downloadManager.downloadProxyConnection();73 68 } 74 69 … … 166 161 } 167 162 163 CoreIPC::Connection* Download::messageSenderConnection() 164 { 165 return m_downloadManager.downloadProxyConnection(); 166 } 167 168 uint64_t Download::messageSenderDestinationID() 169 { 170 return m_downloadID; 171 } 172 168 173 } // namespace WebKit -
trunk/Source/WebKit2/Shared/Downloads/Download.h
r140752 r150669 71 71 #endif 72 72 73 class Download : public CoreIPC::MessageSender <Download>{73 class Download : public CoreIPC::MessageSender { 74 74 WTF_MAKE_NONCOPYABLE(Download); 75 75 public: 76 76 static PassOwnPtr<Download> create(DownloadManager&, uint64_t downloadID, const WebCore::ResourceRequest&); 77 77 ~Download(); 78 79 // Used by MessageSender.80 CoreIPC::Connection* connection() const;81 uint64_t destinationID() const { return downloadID(); }82 78 83 79 void start(); … … 121 117 Download(DownloadManager&, uint64_t downloadID, const WebCore::ResourceRequest&); 122 118 119 // CoreIPC::MessageSender 120 virtual CoreIPC::Connection* messageSenderConnection() OVERRIDE; 121 virtual uint64_t messageSenderDestinationID() OVERRIDE; 122 123 123 void platformInvalidate(); 124 124 -
trunk/Source/WebKit2/Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm
r149774 r150669 143 143 ASSERT(parameters.urlSchemesRegisteredForCustomProtocols.isEmpty() || !parameters.usesNetworkProcess); 144 144 if (parameters.usesNetworkProcess) { 145 m_childProcess-> connection()->removeWorkQueueMessageReceiver(Messages::CustomProtocolManager::messageReceiverName());145 m_childProcess->parentProcessConnection()->removeWorkQueueMessageReceiver(Messages::CustomProtocolManager::messageReceiverName()); 146 146 m_messageQueue = nullptr; 147 147 return; -
trunk/Source/WebKit2/Shared/WebConnection.h
r147403 r150669 35 35 namespace WebKit { 36 36 37 class WebConnection : public TypedAPIObject<APIObject::TypeConnection>, public CoreIPC::MessageReceiver, public CoreIPC::MessageSender <WebConnection>{37 class WebConnection : public TypedAPIObject<APIObject::TypeConnection>, public CoreIPC::MessageReceiver, public CoreIPC::MessageSender { 38 38 public: 39 39 virtual ~WebConnection(); … … 42 42 void postMessage(const String&, APIObject*); 43 43 void didClose(); 44 45 // Used by CoreIPC::MessageSender46 virtual CoreIPC::Connection* connection() const = 0;47 virtual uint64_t destinationID() const = 0;48 44 49 45 protected: -
trunk/Source/WebKit2/Shared/mac/SecItemShim.cpp
r142696 r150669 74 74 { 75 75 uint64_t requestID = generateSecItemRequestID(); 76 if (!sharedProcess-> connection()->send(Messages::SecItemShimProxy::SecItemRequest(requestID, SecItemRequestData(requestType, query, attributesToMatch)), 0))76 if (!sharedProcess->parentProcessConnection()->send(Messages::SecItemShimProxy::SecItemRequest(requestID, SecItemRequestData(requestType, query, attributesToMatch)), 0)) 77 77 return nullptr; 78 78 -
trunk/Source/WebKit2/UIProcess/WebConnectionToWebProcess.cpp
r135347 r150669 62 62 } 63 63 64 CoreIPC::Connection* WebConnectionToWebProcess::connection() const65 {66 return m_process->connection();67 }68 69 uint64_t WebConnectionToWebProcess::destinationID() const70 {71 return 0;72 }73 74 64 bool WebConnectionToWebProcess::hasValidConnection() const 75 65 { … … 77 67 } 78 68 69 CoreIPC::Connection* WebConnectionToWebProcess::messageSenderConnection() 70 { 71 return m_process->connection(); 72 } 73 74 uint64_t WebConnectionToWebProcess::messageSenderDestinationID() 75 { 76 return 0; 77 } 78 79 79 } // namespace WebKit -
trunk/Source/WebKit2/UIProcess/WebConnectionToWebProcess.h
r135347 r150669 47 47 virtual void encodeMessageBody(CoreIPC::ArgumentEncoder&, APIObject*) OVERRIDE; 48 48 virtual bool decodeMessageBody(CoreIPC::ArgumentDecoder&, RefPtr<APIObject>&) OVERRIDE; 49 virtual CoreIPC::Connection* connection() const OVERRIDE;50 virtual uint64_t destinationID() const OVERRIDE;51 49 virtual bool hasValidConnection() const OVERRIDE; 50 51 // CoreIPC::MessageSender 52 virtual CoreIPC::Connection* messageSenderConnection() OVERRIDE; 53 virtual uint64_t messageSenderDestinationID() OVERRIDE; 52 54 53 55 WebProcessProxy* m_process; -
trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
r150484 r150669 173 173 1A64256912DE42EC00CAAE2C /* BackingStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A64256712DE42EC00CAAE2C /* BackingStore.cpp */; }; 174 174 1A64292D12DE5F9800CAAE2C /* BackingStoreMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A64292C12DE5F9800CAAE2C /* BackingStoreMac.mm */; }; 175 1A6506D2175015E700174518 /* MessageSender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6506D1175015E700174518 /* MessageSender.cpp */; }; 175 176 1A6F9F9011E13EFC00DB1371 /* CommandLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6F9F8E11E13EFC00DB1371 /* CommandLine.h */; }; 176 177 1A6F9FB711E1408500DB1371 /* CommandLineMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6F9FB611E1408500DB1371 /* CommandLineMac.cpp */; }; … … 1601 1602 1A64256712DE42EC00CAAE2C /* BackingStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BackingStore.cpp; sourceTree = "<group>"; }; 1602 1603 1A64292C12DE5F9800CAAE2C /* BackingStoreMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = BackingStoreMac.mm; sourceTree = "<group>"; }; 1604 1A6506D1175015E700174518 /* MessageSender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MessageSender.cpp; sourceTree = "<group>"; }; 1603 1605 1A6F9F8E11E13EFC00DB1371 /* CommandLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommandLine.h; sourceTree = "<group>"; }; 1604 1606 1A6F9FB611E1408500DB1371 /* CommandLineMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CommandLineMac.cpp; sourceTree = "<group>"; }; … … 3456 3458 1A3EED0C161A535300AEB4F5 /* MessageReceiverMap.cpp */, 3457 3459 1A3EED0D161A535300AEB4F5 /* MessageReceiverMap.h */, 3460 1A6506D1175015E700174518 /* MessageSender.cpp */, 3458 3461 1A119A94127B796200A9ECB1 /* MessageSender.h */, 3459 3462 1A13BEB11635A9C800F19C03 /* StringReference.cpp */, … … 6753 6756 E1EDFDA9162886AC0039ECDA /* SharedWorkerProcess.cpp in Sources */, 6754 6757 E1EDFDB0162889820039ECDA /* SharedWorkerProcessCreationParameters.cpp in Sources */, 6758 1A6506D2175015E700174518 /* MessageSender.cpp in Sources */, 6755 6759 E1EDFDA8162886990039ECDA /* SharedWorkerProcessMac.mm in Sources */, 6756 6760 BC82839516B4608300A278FE /* SharedWorkerProcessMain.mm in Sources */, -
trunk/Source/WebKit2/WebProcess/Geolocation/WebGeolocationManager.cpp
r149848 r150669 63 63 64 64 if (wasEmpty) 65 m_process-> connection()->send(Messages::WebGeolocationManagerProxy::StartUpdating(), 0);65 m_process->parentProcessConnection()->send(Messages::WebGeolocationManagerProxy::StartUpdating(), 0); 66 66 } 67 67 … … 71 71 72 72 if (m_pageSet.isEmpty()) 73 m_process-> connection()->send(Messages::WebGeolocationManagerProxy::StopUpdating(), 0);73 m_process->parentProcessConnection()->send(Messages::WebGeolocationManagerProxy::StopUpdating(), 0); 74 74 } 75 75 -
trunk/Source/WebKit2/WebProcess/IconDatabase/WebIconDatabaseProxy.cpp
r148233 r150669 65 65 void WebIconDatabaseProxy::retainIconForPageURL(const String& pageURL) 66 66 { 67 m_process-> connection()->send(Messages::WebIconDatabase::RetainIconForPageURL(pageURL), 0);67 m_process->parentProcessConnection()->send(Messages::WebIconDatabase::RetainIconForPageURL(pageURL), 0); 68 68 } 69 69 70 70 void WebIconDatabaseProxy::releaseIconForPageURL(const String& pageURL) 71 71 { 72 m_process-> connection()->send(Messages::WebIconDatabase::ReleaseIconForPageURL(pageURL), 0);72 m_process->parentProcessConnection()->send(Messages::WebIconDatabase::ReleaseIconForPageURL(pageURL), 0); 73 73 } 74 74 … … 76 76 { 77 77 CoreIPC::DataReference result; 78 if (!m_process-> connection()->sendSync(Messages::WebIconDatabase::SynchronousIconDataForPageURL(pageURL), Messages::WebIconDatabase::SynchronousIconDataForPageURL::Reply(result), 0))78 if (!m_process->parentProcessConnection()->sendSync(Messages::WebIconDatabase::SynchronousIconDataForPageURL(pageURL), Messages::WebIconDatabase::SynchronousIconDataForPageURL::Reply(result), 0)) 79 79 return 0; 80 80 … … 115 115 m_iconLoadDecisionCallbacks.add(id, callback); 116 116 117 m_process-> connection()->send(Messages::WebIconDatabase::GetLoadDecisionForIconURL(iconURL, id), 0);117 m_process->parentProcessConnection()->send(Messages::WebIconDatabase::GetLoadDecisionForIconURL(iconURL, id), 0); 118 118 } 119 119 … … 131 131 void WebIconDatabaseProxy::setIconURLForPageURL(const String& iconURL, const String& pageURL) 132 132 { 133 m_process-> connection()->send(Messages::WebIconDatabase::SetIconURLForPageURL(iconURL, pageURL), 0);133 m_process->parentProcessConnection()->send(Messages::WebIconDatabase::SetIconURLForPageURL(iconURL, pageURL), 0); 134 134 } 135 135 … … 137 137 { 138 138 CoreIPC::DataReference data(reinterpret_cast<const uint8_t*>(iconData ? iconData->data() : 0), iconData ? iconData->size() : 0); 139 m_process-> connection()->send(Messages::WebIconDatabase::SetIconDataForIconURL(data, iconURL), 0);139 m_process->parentProcessConnection()->send(Messages::WebIconDatabase::SetIconDataForIconURL(data, iconURL), 0); 140 140 } 141 141 -
trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
r150663 r150669 113 113 encoder->encode(InjectedBundleUserMessageEncoder(messageBody)); 114 114 115 WebProcess::shared(). connection()->sendMessage(encoder.release());115 WebProcess::shared().parentProcessConnection()->sendMessage(encoder.release()); 116 116 } 117 117 … … 121 121 122 122 uint64_t syncRequestID; 123 OwnPtr<CoreIPC::MessageEncoder> encoder = WebProcess::shared(). connection()->createSyncMessageEncoder(WebContextLegacyMessages::messageReceiverName(), WebContextLegacyMessages::postSynchronousMessageMessageName(), 0, syncRequestID);123 OwnPtr<CoreIPC::MessageEncoder> encoder = WebProcess::shared().parentProcessConnection()->createSyncMessageEncoder(WebContextLegacyMessages::messageReceiverName(), WebContextLegacyMessages::postSynchronousMessageMessageName(), 0, syncRequestID); 124 124 encoder->encode(messageName); 125 125 encoder->encode(InjectedBundleUserMessageEncoder(messageBody)); 126 126 127 OwnPtr<CoreIPC::MessageDecoder> replyDecoder = WebProcess::shared(). connection()->sendSyncMessage(syncRequestID, encoder.release(), CoreIPC::Connection::NoTimeout);127 OwnPtr<CoreIPC::MessageDecoder> replyDecoder = WebProcess::shared().parentProcessConnection()->sendSyncMessage(syncRequestID, encoder.release(), CoreIPC::Connection::NoTimeout); 128 128 if (!replyDecoder || !replyDecoder->decode(messageDecoder)) { 129 129 returnData = nullptr; -
trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp
r149389 r150669 60 60 } 61 61 62 CoreIPC::Connection* WebResourceLoader:: connection() const62 CoreIPC::Connection* WebResourceLoader::messageSenderConnection() 63 63 { 64 64 return WebProcess::shared().networkConnection()->connection(); 65 65 } 66 66 67 uint64_t WebResourceLoader:: destinationID() const67 uint64_t WebResourceLoader::messageSenderDestinationID() 68 68 { 69 69 return m_coreLoader->identifier(); -
trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.h
r149251 r150669 54 54 typedef uint64_t ResourceLoadIdentifier; 55 55 56 class WebResourceLoader : public RefCounted<WebResourceLoader>, public CoreIPC::MessageSender <WebResourceLoader>{56 class WebResourceLoader : public RefCounted<WebResourceLoader>, public CoreIPC::MessageSender { 57 57 public: 58 58 static PassRefPtr<WebResourceLoader> create(PassRefPtr<WebCore::ResourceLoader>); 59 59 60 60 ~WebResourceLoader(); 61 62 // Used by MessageSender.63 CoreIPC::Connection* connection() const;64 uint64_t destinationID() const;65 61 66 62 void didReceiveWebResourceLoaderMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&); … … 72 68 private: 73 69 WebResourceLoader(PassRefPtr<WebCore::ResourceLoader>); 70 71 // CoreIPC::MessageSender 72 virtual CoreIPC::Connection* messageSenderConnection() OVERRIDE; 73 virtual uint64_t messageSenderDestinationID() OVERRIDE; 74 74 75 75 void cancelResourceLoader(); -
trunk/Source/WebKit2/WebProcess/Notifications/WebNotificationManager.cpp
r145453 r150669 154 154 155 155 #if ENABLE(NOTIFICATIONS) 156 m_process-> connection()->send(Messages::WebPageProxy::ShowNotification(notification->title(), notification->body(), notification->iconURL().string(), notification->tag(), notification->lang(), notification->dir(), notification->scriptExecutionContext()->securityOrigin()->toString(), notificationID), page->pageID());157 #else 158 m_process-> connection()->send(Messages::WebPageProxy::ShowNotification(notification->title(), notification->body(), notification->iconURL().string(), notification->replaceId(), notification->lang(), notification->dir(), notification->scriptExecutionContext()->securityOrigin()->toString(), notificationID), page->pageID());156 m_process->parentProcessConnection()->send(Messages::WebPageProxy::ShowNotification(notification->title(), notification->body(), notification->iconURL().string(), notification->tag(), notification->lang(), notification->dir(), notification->scriptExecutionContext()->securityOrigin()->toString(), notificationID), page->pageID()); 157 #else 158 m_process->parentProcessConnection()->send(Messages::WebPageProxy::ShowNotification(notification->title(), notification->body(), notification->iconURL().string(), notification->replaceId(), notification->lang(), notification->dir(), notification->scriptExecutionContext()->securityOrigin()->toString(), notificationID), page->pageID()); 159 159 #endif 160 160 return true; … … 176 176 return; 177 177 178 m_process-> connection()->send(Messages::WebNotificationManagerProxy::Cancel(notificationID), 0);178 m_process->parentProcessConnection()->send(Messages::WebNotificationManagerProxy::Cancel(notificationID), 0); 179 179 #else 180 180 UNUSED_PARAM(notification); … … 191 191 192 192 Vector<uint64_t>& notificationIDs = it->value; 193 m_process-> connection()->send(Messages::WebNotificationManagerProxy::ClearNotifications(notificationIDs), 0);193 m_process->parentProcessConnection()->send(Messages::WebNotificationManagerProxy::ClearNotifications(notificationIDs), 0); 194 194 size_t count = notificationIDs.size(); 195 195 for (size_t i = 0; i < count; ++i) { … … 217 217 m_notificationIDMap.remove(notificationID); 218 218 removeNotificationFromContextMap(notificationID, notification); 219 m_process-> connection()->send(Messages::WebNotificationManagerProxy::DidDestroyNotification(notificationID), 0);219 m_process->parentProcessConnection()->send(Messages::WebNotificationManagerProxy::DidDestroyNotification(notificationID), 0); 220 220 #else 221 221 UNUSED_PARAM(notification); -
trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm
r150064 r150669 882 882 pasteboardTypes.append(type); 883 883 884 WebProcess::shared(). connection()->send(Messages::WebContext::SetPasteboardTypes(NSGeneralPboard, pasteboardTypes), 0);884 WebProcess::shared().parentProcessConnection()->send(Messages::WebContext::SetPasteboardTypes(NSGeneralPboard, pasteboardTypes), 0); 885 885 886 886 for (NSUInteger i = 0, count = items.count; i < count; ++i) { … … 896 896 if ([type isEqualToString:NSStringPboardType] || [type isEqualToString:NSPasteboardTypeString]) { 897 897 RetainPtr<NSString> plainTextString = adoptNS([[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]); 898 WebProcess::shared(). connection()->send(Messages::WebContext::SetPasteboardStringForType(NSGeneralPboard, type, plainTextString.get()), 0);898 WebProcess::shared().parentProcessConnection()->send(Messages::WebContext::SetPasteboardStringForType(NSGeneralPboard, type, plainTextString.get()), 0); 899 899 } else { 900 900 RefPtr<SharedBuffer> buffer = SharedBuffer::wrapNSData(data); … … 907 907 memcpy(sharedMemory->data(), buffer->data(), buffer->size()); 908 908 sharedMemory->createHandle(handle, SharedMemory::ReadOnly); 909 WebProcess::shared(). connection()->send(Messages::WebContext::SetPasteboardBufferForType(NSGeneralPboard, type, handle, buffer->size()), 0);909 WebProcess::shared().parentProcessConnection()->send(Messages::WebContext::SetPasteboardBufferForType(NSGeneralPboard, type, handle, buffer->size()), 0); 910 910 } 911 911 } -
trunk/Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.cpp
r150486 r150669 71 71 CoreIPC::Attachment encodedConnectionIdentifier; 72 72 bool supportsAsynchronousInitialization; 73 if (!WebProcess::shared(). connection()->sendSync(Messages::WebProcessProxy::GetPluginProcessConnection(pluginProcessToken),73 if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessProxy::GetPluginProcessConnection(pluginProcessToken), 74 74 Messages::WebProcessProxy::GetPluginProcessConnection::Reply(encodedConnectionIdentifier, supportsAsynchronousInitialization), 0)) 75 75 return 0; -
trunk/Source/WebKit2/WebProcess/Storage/StorageAreaMap.cpp
r150313 r150669 69 69 { 70 70 if (m_storageType == LocalStorage) 71 WebProcess::shared(). connection()->send(Messages::StorageManager::CreateLocalStorageMap(m_storageMapID, storageNamespace->storageNamespaceID(), SecurityOriginData::fromSecurityOrigin(m_securityOrigin.get())), 0);71 WebProcess::shared().parentProcessConnection()->send(Messages::StorageManager::CreateLocalStorageMap(m_storageMapID, storageNamespace->storageNamespaceID(), SecurityOriginData::fromSecurityOrigin(m_securityOrigin.get())), 0); 72 72 else 73 WebProcess::shared(). connection()->send(Messages::StorageManager::CreateSessionStorageMap(m_storageMapID, storageNamespace->storageNamespaceID(), SecurityOriginData::fromSecurityOrigin(m_securityOrigin.get())), 0);73 WebProcess::shared().parentProcessConnection()->send(Messages::StorageManager::CreateSessionStorageMap(m_storageMapID, storageNamespace->storageNamespaceID(), SecurityOriginData::fromSecurityOrigin(m_securityOrigin.get())), 0); 74 74 WebProcess::shared().addMessageReceiver(Messages::StorageAreaMap::messageReceiverName(), m_storageMapID, this); 75 75 } … … 77 77 StorageAreaMap::~StorageAreaMap() 78 78 { 79 WebProcess::shared(). connection()->send(Messages::StorageManager::DestroyStorageMap(m_storageMapID), 0);79 WebProcess::shared().parentProcessConnection()->send(Messages::StorageManager::DestroyStorageMap(m_storageMapID), 0); 80 80 WebProcess::shared().removeMessageReceiver(Messages::StorageAreaMap::messageReceiverName(), m_storageMapID); 81 81 } … … 119 119 m_pendingValueChanges.add(key); 120 120 121 WebProcess::shared(). connection()->send(Messages::StorageManager::SetItem(m_storageMapID, sourceArea->storageAreaID(), m_currentSeed, key, value, sourceFrame->document()->url()), 0);121 WebProcess::shared().parentProcessConnection()->send(Messages::StorageManager::SetItem(m_storageMapID, sourceArea->storageAreaID(), m_currentSeed, key, value, sourceFrame->document()->url()), 0); 122 122 } 123 123 … … 135 135 m_pendingValueChanges.add(key); 136 136 137 WebProcess::shared(). connection()->send(Messages::StorageManager::RemoveItem(m_storageMapID, sourceArea->storageAreaID(), m_currentSeed, key, sourceFrame->document()->url()), 0);137 WebProcess::shared().parentProcessConnection()->send(Messages::StorageManager::RemoveItem(m_storageMapID, sourceArea->storageAreaID(), m_currentSeed, key, sourceFrame->document()->url()), 0); 138 138 } 139 139 … … 144 144 m_hasPendingClear = true; 145 145 m_storageMap = StorageMap::create(m_quotaInBytes); 146 WebProcess::shared(). connection()->send(Messages::StorageManager::Clear(m_storageMapID, sourceArea->storageAreaID(), m_currentSeed, sourceFrame->document()->url()), 0);146 WebProcess::shared().parentProcessConnection()->send(Messages::StorageManager::Clear(m_storageMapID, sourceArea->storageAreaID(), m_currentSeed, sourceFrame->document()->url()), 0); 147 147 } 148 148 … … 173 173 // (This flag does not yet exist). Since loadValuesIfNeeded() ends up being called from within JavaScript code, processing incoming synchronous messages 174 174 // could lead to weird reentrency bugs otherwise. 175 WebProcess::shared(). connection()->sendSync(Messages::StorageManager::GetValues(m_storageMapID, m_currentSeed), Messages::StorageManager::GetValues::Reply(values), 0);175 WebProcess::shared().parentProcessConnection()->sendSync(Messages::StorageManager::GetValues(m_storageMapID, m_currentSeed), Messages::StorageManager::GetValues::Reply(values), 0); 176 176 177 177 m_storageMap = StorageMap::create(m_quotaInBytes); -
trunk/Source/WebKit2/WebProcess/WebConnectionToUIProcess.cpp
r135347 r150669 64 64 } 65 65 66 CoreIPC::Connection* WebConnectionToUIProcess::connection() const67 {68 return m_process->connection();69 }70 71 uint64_t WebConnectionToUIProcess::destinationID() const72 {73 return 0;74 }75 76 66 bool WebConnectionToUIProcess::hasValidConnection() const 77 67 { … … 79 69 } 80 70 71 CoreIPC::Connection* WebConnectionToUIProcess::messageSenderConnection() 72 { 73 return m_process->parentProcessConnection(); 74 } 75 76 uint64_t WebConnectionToUIProcess::messageSenderDestinationID() 77 { 78 return 0; 79 } 80 81 81 } // namespace WebKit -
trunk/Source/WebKit2/WebProcess/WebConnectionToUIProcess.h
r135347 r150669 45 45 virtual void encodeMessageBody(CoreIPC::ArgumentEncoder&, APIObject*) OVERRIDE; 46 46 virtual bool decodeMessageBody(CoreIPC::ArgumentDecoder&, RefPtr<APIObject>&) OVERRIDE; 47 virtual CoreIPC::Connection* connection() const OVERRIDE;48 virtual uint64_t destinationID() const OVERRIDE;49 47 virtual bool hasValidConnection() const OVERRIDE; 48 49 // CoreIPC::MessageSender 50 virtual CoreIPC::Connection* messageSenderConnection() OVERRIDE; 51 virtual uint64_t messageSenderDestinationID() OVERRIDE; 50 52 51 53 WebProcess* m_process; -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
r150441 r150669 122 122 FloatRect newWindowFrame; 123 123 124 if (!WebProcess::shared(). connection()->sendSync(Messages::WebPageProxy::GetWindowFrame(), Messages::WebPageProxy::GetWindowFrame::Reply(newWindowFrame), m_page->pageID()))124 if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::GetWindowFrame(), Messages::WebPageProxy::GetWindowFrame::Reply(newWindowFrame), m_page->pageID())) 125 125 return FloatRect(); 126 126 … … 183 183 WebFrame* webFrame = webFrameLoaderClient ? webFrameLoaderClient->webFrame() : 0; 184 184 185 WebProcess::shared(). connection()->send(Messages::WebPageProxy::FocusedFrameChanged(webFrame ? webFrame->frameID() : 0), m_page->pageID());185 WebProcess::shared().parentProcessConnection()->send(Messages::WebPageProxy::FocusedFrameChanged(webFrame ? webFrame->frameID() : 0), m_page->pageID()); 186 186 } 187 187 … … 193 193 uint64_t newPageID = 0; 194 194 WebPageCreationParameters parameters; 195 if (!WebProcess::shared(). connection()->sendSync(Messages::WebPageProxy::CreateNewPage(request.resourceRequest(), windowFeatures, modifiers, mouseButton), Messages::WebPageProxy::CreateNewPage::Reply(newPageID, parameters), m_page->pageID()))195 if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::CreateNewPage(request.resourceRequest(), windowFeatures, modifiers, mouseButton), Messages::WebPageProxy::CreateNewPage::Reply(newPageID, parameters), m_page->pageID())) 196 196 return 0; 197 197 … … 230 230 231 231 bool toolbarsAreVisible = true; 232 if (!WebProcess::shared(). connection()->sendSync(Messages::WebPageProxy::GetToolbarsAreVisible(), Messages::WebPageProxy::GetToolbarsAreVisible::Reply(toolbarsAreVisible), m_page->pageID()))232 if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::GetToolbarsAreVisible(), Messages::WebPageProxy::GetToolbarsAreVisible::Reply(toolbarsAreVisible), m_page->pageID())) 233 233 return true; 234 234 … … 248 248 249 249 bool statusBarIsVisible = true; 250 if (!WebProcess::shared(). connection()->sendSync(Messages::WebPageProxy::GetStatusBarIsVisible(), Messages::WebPageProxy::GetStatusBarIsVisible::Reply(statusBarIsVisible), m_page->pageID()))250 if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::GetStatusBarIsVisible(), Messages::WebPageProxy::GetStatusBarIsVisible::Reply(statusBarIsVisible), m_page->pageID())) 251 251 return true; 252 252 … … 277 277 278 278 bool menuBarIsVisible = true; 279 if (!WebProcess::shared(). connection()->sendSync(Messages::WebPageProxy::GetMenuBarIsVisible(), Messages::WebPageProxy::GetMenuBarIsVisible::Reply(menuBarIsVisible), m_page->pageID()))279 if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::GetMenuBarIsVisible(), Messages::WebPageProxy::GetMenuBarIsVisible::Reply(menuBarIsVisible), m_page->pageID())) 280 280 return true; 281 281 … … 308 308 309 309 bool shouldClose = false; 310 if (!WebProcess::shared(). connection()->sendSync(Messages::WebPageProxy::RunBeforeUnloadConfirmPanel(message, webFrame->frameID()), Messages::WebPageProxy::RunBeforeUnloadConfirmPanel::Reply(shouldClose), m_page->pageID()))310 if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::RunBeforeUnloadConfirmPanel(message, webFrame->frameID()), Messages::WebPageProxy::RunBeforeUnloadConfirmPanel::Reply(shouldClose), m_page->pageID())) 311 311 return false; 312 312 … … 343 343 344 344 unsigned syncSendFlags = (WebCore::AXObjectCache::accessibilityEnabled()) ? CoreIPC::SpinRunLoopWhileWaitingForReply : 0; 345 WebProcess::shared(). connection()->sendSync(Messages::WebPageProxy::RunJavaScriptAlert(webFrame->frameID(), alertText), Messages::WebPageProxy::RunJavaScriptAlert::Reply(), m_page->pageID(), CoreIPC::Connection::NoTimeout, syncSendFlags);345 WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::RunJavaScriptAlert(webFrame->frameID(), alertText), Messages::WebPageProxy::RunJavaScriptAlert::Reply(), m_page->pageID(), CoreIPC::Connection::NoTimeout, syncSendFlags); 346 346 } 347 347 … … 357 357 unsigned syncSendFlags = (WebCore::AXObjectCache::accessibilityEnabled()) ? CoreIPC::SpinRunLoopWhileWaitingForReply : 0; 358 358 bool result = false; 359 if (!WebProcess::shared(). connection()->sendSync(Messages::WebPageProxy::RunJavaScriptConfirm(webFrame->frameID(), message), Messages::WebPageProxy::RunJavaScriptConfirm::Reply(result), m_page->pageID(), CoreIPC::Connection::NoTimeout, syncSendFlags))359 if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::RunJavaScriptConfirm(webFrame->frameID(), message), Messages::WebPageProxy::RunJavaScriptConfirm::Reply(result), m_page->pageID(), CoreIPC::Connection::NoTimeout, syncSendFlags)) 360 360 return false; 361 361 … … 373 373 374 374 unsigned syncSendFlags = (WebCore::AXObjectCache::accessibilityEnabled()) ? CoreIPC::SpinRunLoopWhileWaitingForReply : 0; 375 if (!WebProcess::shared(). connection()->sendSync(Messages::WebPageProxy::RunJavaScriptPrompt(webFrame->frameID(), message, defaultValue), Messages::WebPageProxy::RunJavaScriptPrompt::Reply(result), m_page->pageID(), CoreIPC::Connection::NoTimeout, syncSendFlags))375 if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::RunJavaScriptPrompt(webFrame->frameID(), message, defaultValue), Messages::WebPageProxy::RunJavaScriptPrompt::Reply(result), m_page->pageID(), CoreIPC::Connection::NoTimeout, syncSendFlags)) 376 376 return false; 377 377 … … 390 390 { 391 391 bool shouldInterrupt = false; 392 if (!WebProcess::shared(). connection()->sendSync(Messages::WebPageProxy::ShouldInterruptJavaScript(), Messages::WebPageProxy::ShouldInterruptJavaScript::Reply(shouldInterrupt), m_page->pageID()))392 if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::ShouldInterruptJavaScript(), Messages::WebPageProxy::ShouldInterruptJavaScript::Reply(shouldInterrupt), m_page->pageID())) 393 393 return false; 394 394 … … 596 596 597 597 if (!newQuota) { 598 WebProcess::shared(). connection()->sendSync(598 WebProcess::shared().parentProcessConnection()->sendSync( 599 599 Messages::WebPageProxy::ExceededDatabaseQuota(webFrame->frameID(), origin->databaseIdentifier(), databaseName, details.displayName(), currentQuota, currentOriginUsage, details.currentUsage(), details.expectedUsage()), 600 600 Messages::WebPageProxy::ExceededDatabaseQuota::Reply(newQuota), m_page->pageID()); -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebColorChooser.cpp
r127988 r150669 44 44 { 45 45 m_page->setActiveColorChooser(this); 46 WebProcess::shared(). connection()->send(Messages::WebPageProxy::ShowColorChooser(initialColor, client->elementRectRelativeToRootView()), m_page->pageID());46 WebProcess::shared().parentProcessConnection()->send(Messages::WebPageProxy::ShowColorChooser(initialColor, client->elementRectRelativeToRootView()), m_page->pageID()); 47 47 } 48 48 … … 75 75 return; 76 76 77 WebProcess::shared(). connection()->send(Messages::WebPageProxy::SetColorChooserColor(color), m_page->pageID());77 WebProcess::shared().parentProcessConnection()->send(Messages::WebPageProxy::SetColorChooserColor(color), m_page->pageID()); 78 78 } 79 79 … … 83 83 return; 84 84 85 WebProcess::shared(). connection()->send(Messages::WebPageProxy::EndColorChooser(), m_page->pageID());85 WebProcess::shared().parentProcessConnection()->send(Messages::WebPageProxy::EndColorChooser(), m_page->pageID()); 86 86 } 87 87 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
r150388 r150669 376 376 void WebFrameLoaderClient::dispatchDidReceiveIcon() 377 377 { 378 WebProcess::shared(). connection()->send(Messages::WebIconDatabase::DidReceiveIconForPageURL(m_frame->url()), 0);378 WebProcess::shared().parentProcessConnection()->send(Messages::WebIconDatabase::DidReceiveIconForPageURL(m_frame->url()), 0); 379 379 } 380 380 … … 921 921 data.originalRequest = loader->originalRequestCopy(); 922 922 923 WebProcess::shared(). connection()->send(Messages::WebProcessProxy::DidNavigateWithNavigationData(webPage->pageID(), data, m_frame->frameID()), 0);923 WebProcess::shared().parentProcessConnection()->send(Messages::WebProcessProxy::DidNavigateWithNavigationData(webPage->pageID(), data, m_frame->frameID()), 0); 924 924 } 925 925 … … 935 935 // Client redirect 936 936 if (!loader->clientRedirectSourceForHistory().isNull()) { 937 WebProcess::shared(). connection()->send(Messages::WebProcessProxy::DidPerformClientRedirect(webPage->pageID(),937 WebProcess::shared().parentProcessConnection()->send(Messages::WebProcessProxy::DidPerformClientRedirect(webPage->pageID(), 938 938 loader->clientRedirectSourceForHistory(), loader->clientRedirectDestinationForHistory(), m_frame->frameID()), 0); 939 939 } … … 941 941 // Server redirect 942 942 if (!loader->serverRedirectSourceForHistory().isNull()) { 943 WebProcess::shared(). connection()->send(Messages::WebProcessProxy::DidPerformServerRedirect(webPage->pageID(),943 WebProcess::shared().parentProcessConnection()->send(Messages::WebProcessProxy::DidPerformServerRedirect(webPage->pageID(), 944 944 loader->serverRedirectSourceForHistory(), loader->serverRedirectDestinationForHistory(), m_frame->frameID()), 0); 945 945 } … … 1176 1176 1177 1177 // FIXME: use direction of title. 1178 WebProcess::shared(). connection()->send(Messages::WebProcessProxy::DidUpdateHistoryTitle(webPage->pageID(),1178 WebProcess::shared().parentProcessConnection()->send(Messages::WebProcessProxy::DidUpdateHistoryTitle(webPage->pageID(), 1179 1179 title.string(), url.string(), m_frame->frameID()), 0); 1180 1180 } -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
r150322 r150669 297 297 298 298 // FIXME: Should we do something in case of error here? 299 if (!WebProcess::shared(). connection()->sendSync(Messages::WebProcessProxy::GetPlugins(m_shouldRefreshPlugins), Messages::WebProcessProxy::GetPlugins::Reply(m_cachedPlugins), 0))299 if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessProxy::GetPlugins(m_shouldRefreshPlugins), Messages::WebProcessProxy::GetPlugins::Reply(m_cachedPlugins), 0)) 300 300 return; 301 301 … … 364 364 void WebPlatformStrategies::getTypes(Vector<String>& types, const String& pasteboardName) 365 365 { 366 WebProcess::shared(). connection()->sendSync(Messages::WebContext::GetPasteboardTypes(pasteboardName),366 WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::GetPasteboardTypes(pasteboardName), 367 367 Messages::WebContext::GetPasteboardTypes::Reply(types), 0); 368 368 } … … 372 372 SharedMemory::Handle handle; 373 373 uint64_t size = 0; 374 WebProcess::shared(). connection()->sendSync(Messages::WebContext::GetPasteboardBufferForType(pasteboardName, pasteboardType),374 WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::GetPasteboardBufferForType(pasteboardName, pasteboardType), 375 375 Messages::WebContext::GetPasteboardBufferForType::Reply(handle, size), 0); 376 376 if (handle.isNull()) … … 382 382 void WebPlatformStrategies::getPathnamesForType(Vector<String>& pathnames, const String& pasteboardType, const String& pasteboardName) 383 383 { 384 WebProcess::shared(). connection()->sendSync(Messages::WebContext::GetPasteboardPathnamesForType(pasteboardName, pasteboardType),384 WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::GetPasteboardPathnamesForType(pasteboardName, pasteboardType), 385 385 Messages::WebContext::GetPasteboardPathnamesForType::Reply(pathnames), 0); 386 386 } … … 389 389 { 390 390 String value; 391 WebProcess::shared(). connection()->sendSync(Messages::WebContext::GetPasteboardStringForType(pasteboardName, pasteboardType),391 WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::GetPasteboardStringForType(pasteboardName, pasteboardType), 392 392 Messages::WebContext::GetPasteboardStringForType::Reply(value), 0); 393 393 return value; … … 396 396 void WebPlatformStrategies::copy(const String& fromPasteboard, const String& toPasteboard) 397 397 { 398 WebProcess::shared(). connection()->send(Messages::WebContext::PasteboardCopy(fromPasteboard, toPasteboard), 0);398 WebProcess::shared().parentProcessConnection()->send(Messages::WebContext::PasteboardCopy(fromPasteboard, toPasteboard), 0); 399 399 } 400 400 … … 402 402 { 403 403 uint64_t changeCount; 404 WebProcess::shared(). connection()->sendSync(Messages::WebContext::GetPasteboardChangeCount(pasteboardName),404 WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::GetPasteboardChangeCount(pasteboardName), 405 405 Messages::WebContext::GetPasteboardChangeCount::Reply(changeCount), 0); 406 406 return changeCount; … … 410 410 { 411 411 String pasteboardName; 412 WebProcess::shared(). connection()->sendSync(Messages::WebContext::GetPasteboardUniqueName(),412 WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::GetPasteboardUniqueName(), 413 413 Messages::WebContext::GetPasteboardUniqueName::Reply(pasteboardName), 0); 414 414 return pasteboardName; … … 418 418 { 419 419 Color color; 420 WebProcess::shared(). connection()->sendSync(Messages::WebContext::GetPasteboardColor(pasteboardName),420 WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::GetPasteboardColor(pasteboardName), 421 421 Messages::WebContext::GetPasteboardColor::Reply(color), 0); 422 422 return color; … … 426 426 { 427 427 String urlString; 428 WebProcess::shared(). connection()->sendSync(Messages::WebContext::GetPasteboardURL(pasteboardName),428 WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::GetPasteboardURL(pasteboardName), 429 429 Messages::WebContext::GetPasteboardURL::Reply(urlString), 0); 430 430 return KURL(ParsedURLString, urlString); … … 433 433 void WebPlatformStrategies::addTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName) 434 434 { 435 WebProcess::shared(). connection()->send(Messages::WebContext::AddPasteboardTypes(pasteboardName, pasteboardTypes), 0);435 WebProcess::shared().parentProcessConnection()->send(Messages::WebContext::AddPasteboardTypes(pasteboardName, pasteboardTypes), 0); 436 436 } 437 437 438 438 void WebPlatformStrategies::setTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName) 439 439 { 440 WebProcess::shared(). connection()->send(Messages::WebContext::SetPasteboardTypes(pasteboardName, pasteboardTypes), 0);440 WebProcess::shared().parentProcessConnection()->send(Messages::WebContext::SetPasteboardTypes(pasteboardName, pasteboardTypes), 0); 441 441 } 442 442 … … 449 449 sharedMemoryBuffer->createHandle(handle, SharedMemory::ReadOnly); 450 450 } 451 WebProcess::shared(). connection()->send(Messages::WebContext::SetPasteboardBufferForType(pasteboardName, pasteboardType, handle, buffer ? buffer->size() : 0), 0);451 WebProcess::shared().parentProcessConnection()->send(Messages::WebContext::SetPasteboardBufferForType(pasteboardName, pasteboardType, handle, buffer ? buffer->size() : 0), 0); 452 452 } 453 453 454 454 void WebPlatformStrategies::setPathnamesForType(const Vector<String>& pathnames, const String& pasteboardType, const String& pasteboardName) 455 455 { 456 WebProcess::shared(). connection()->send(Messages::WebContext::SetPasteboardPathnamesForType(pasteboardName, pasteboardType, pathnames), 0);456 WebProcess::shared().parentProcessConnection()->send(Messages::WebContext::SetPasteboardPathnamesForType(pasteboardName, pasteboardType, pathnames), 0); 457 457 } 458 458 459 459 void WebPlatformStrategies::setStringForType(const String& string, const String& pasteboardType, const String& pasteboardName) 460 460 { 461 WebProcess::shared(). connection()->send(Messages::WebContext::SetPasteboardStringForType(pasteboardName, pasteboardType, string), 0);461 WebProcess::shared().parentProcessConnection()->send(Messages::WebContext::SetPasteboardStringForType(pasteboardName, pasteboardType, string), 0); 462 462 } 463 463 #endif -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPopupMenu.cpp
r139023 r150669 118 118 setUpPlatformData(pageCoordinates, platformData); 119 119 120 WebProcess::shared(). connection()->send(Messages::WebPageProxy::ShowPopupMenu(pageCoordinates, m_popupClient->menuStyle().textDirection(), items, index, platformData), m_page->pageID());120 WebProcess::shared().parentProcessConnection()->send(Messages::WebPageProxy::ShowPopupMenu(pageCoordinates, m_popupClient->menuStyle().textDirection(), items, index, platformData), m_page->pageID()); 121 121 } 122 122 … … 126 126 return; 127 127 128 WebProcess::shared(). connection()->send(Messages::WebPageProxy::HidePopupMenu(), m_page->pageID());128 WebProcess::shared().parentProcessConnection()->send(Messages::WebPageProxy::HidePopupMenu(), m_page->pageID()); 129 129 m_page->setActivePopupMenu(0); 130 130 } -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp
r84011 r150669 57 57 return; 58 58 59 WebProcess::shared(). connection()->send(Messages::WebPageProxy::SaveRecentSearches(name, searchItems), page->pageID());59 WebProcess::shared().parentProcessConnection()->send(Messages::WebPageProxy::SaveRecentSearches(name, searchItems), page->pageID()); 60 60 } 61 61 … … 69 69 return; 70 70 71 WebProcess::shared(). connection()->sendSync(Messages::WebPageProxy::LoadRecentSearches(name), Messages::WebPageProxy::LoadRecentSearches::Reply(resultItems), page->pageID());71 WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::LoadRecentSearches(name), Messages::WebPageProxy::LoadRecentSearches::Reply(resultItems), page->pageID()); 72 72 } 73 73 -
trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp
r149665 r150669 147 147 void EventDispatcher::sendDidReceiveEvent(uint64_t pageID, const WebEvent& event, bool didHandleEvent) 148 148 { 149 WebProcess::shared(). connection()->send(Messages::WebPageProxy::DidReceiveEvent(static_cast<uint32_t>(event.type()), didHandleEvent), pageID);149 WebProcess::shared().parentProcessConnection()->send(Messages::WebPageProxy::DidReceiveEvent(static_cast<uint32_t>(event.type()), didHandleEvent), pageID); 150 150 } 151 151 #endif -
trunk/Source/WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp
r149848 r150669 90 90 item->encodeBackForwardTree(encoder); 91 91 92 WebProcess::shared(). connection()->send(Messages::WebProcessProxy::AddBackForwardItem(itemID, item->originalURLString(), item->urlString(), item->title(), encoder.dataReference()), 0);92 WebProcess::shared().parentProcessConnection()->send(Messages::WebProcessProxy::AddBackForwardItem(itemID, item->originalURLString(), item->urlString(), item->title(), encoder.dataReference()), 0); 93 93 } 94 94 … … 181 181 182 182 uint64_t itemID = 0; 183 if (!WebProcess::shared(). connection()->sendSync(Messages::WebPageProxy::BackForwardItemAtIndex(itemIndex), Messages::WebPageProxy::BackForwardItemAtIndex::Reply(itemID), m_page->pageID()))183 if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::BackForwardItemAtIndex(itemIndex), Messages::WebPageProxy::BackForwardItemAtIndex::Reply(itemID), m_page->pageID())) 184 184 return 0; 185 185 … … 196 196 197 197 int backListCount = 0; 198 if (!WebProcess::shared(). connection()->sendSync(Messages::WebPageProxy::BackForwardBackListCount(), Messages::WebPageProxy::BackForwardBackListCount::Reply(backListCount), m_page->pageID()))198 if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::BackForwardBackListCount(), Messages::WebPageProxy::BackForwardBackListCount::Reply(backListCount), m_page->pageID())) 199 199 return 0; 200 200 … … 208 208 209 209 int forwardListCount = 0; 210 if (!WebProcess::shared(). connection()->sendSync(Messages::WebPageProxy::BackForwardForwardListCount(), Messages::WebPageProxy::BackForwardForwardListCount::Reply(forwardListCount), m_page->pageID()))210 if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::BackForwardForwardListCount(), Messages::WebPageProxy::BackForwardForwardListCount::Reply(forwardListCount), m_page->pageID())) 211 211 return 0; 212 212 -
trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.cpp
r150041 r150669 79 79 WebPageCreationParameters parameters; 80 80 81 if (!WebProcess::shared(). connection()->sendSync(Messages::WebInspectorProxy::CreateInspectorPage(),81 if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebInspectorProxy::CreateInspectorPage(), 82 82 Messages::WebInspectorProxy::CreateInspectorPage::Reply(inspectorPageID, parameters), 83 83 m_page->pageID(), CoreIPC::Connection::NoTimeout)) { … … 108 108 void WebInspector::didClose() 109 109 { 110 WebProcess::shared(). connection()->send(Messages::WebInspectorProxy::DidClose(), m_page->pageID());110 WebProcess::shared().parentProcessConnection()->send(Messages::WebInspectorProxy::DidClose(), m_page->pageID()); 111 111 destroyInspectorPage(); 112 112 } … … 114 114 void WebInspector::bringToFront() 115 115 { 116 WebProcess::shared(). connection()->send(Messages::WebInspectorProxy::BringToFront(), m_page->pageID());116 WebProcess::shared().parentProcessConnection()->send(Messages::WebInspectorProxy::BringToFront(), m_page->pageID()); 117 117 } 118 118 119 119 void WebInspector::inspectedURLChanged(const String& urlString) 120 120 { 121 WebProcess::shared(). connection()->send(Messages::WebInspectorProxy::InspectedURLChanged(urlString), m_page->pageID());121 WebProcess::shared().parentProcessConnection()->send(Messages::WebInspectorProxy::InspectedURLChanged(urlString), m_page->pageID()); 122 122 } 123 123 124 124 void WebInspector::save(const String& filename, const String& content, bool forceSaveAs) 125 125 { 126 WebProcess::shared(). connection()->send(Messages::WebInspectorProxy::Save(filename, content, forceSaveAs), m_page->pageID());126 WebProcess::shared().parentProcessConnection()->send(Messages::WebInspectorProxy::Save(filename, content, forceSaveAs), m_page->pageID()); 127 127 } 128 128 129 129 void WebInspector::append(const String& filename, const String& content) 130 130 { 131 WebProcess::shared(). connection()->send(Messages::WebInspectorProxy::Append(filename, content), m_page->pageID());131 WebProcess::shared().parentProcessConnection()->send(Messages::WebInspectorProxy::Append(filename, content), m_page->pageID()); 132 132 } 133 133 134 134 void WebInspector::attachBottom() 135 135 { 136 WebProcess::shared(). connection()->send(Messages::WebInspectorProxy::AttachBottom(), m_page->pageID());136 WebProcess::shared().parentProcessConnection()->send(Messages::WebInspectorProxy::AttachBottom(), m_page->pageID()); 137 137 } 138 138 139 139 void WebInspector::attachRight() 140 140 { 141 WebProcess::shared(). connection()->send(Messages::WebInspectorProxy::AttachRight(), m_page->pageID());141 WebProcess::shared().parentProcessConnection()->send(Messages::WebInspectorProxy::AttachRight(), m_page->pageID()); 142 142 } 143 143 144 144 void WebInspector::detach() 145 145 { 146 WebProcess::shared(). connection()->send(Messages::WebInspectorProxy::Detach(), m_page->pageID());146 WebProcess::shared().parentProcessConnection()->send(Messages::WebInspectorProxy::Detach(), m_page->pageID()); 147 147 } 148 148 149 149 void WebInspector::setAttachedWindowHeight(unsigned height) 150 150 { 151 WebProcess::shared(). connection()->send(Messages::WebInspectorProxy::SetAttachedWindowHeight(height), m_page->pageID());151 WebProcess::shared().parentProcessConnection()->send(Messages::WebInspectorProxy::SetAttachedWindowHeight(height), m_page->pageID()); 152 152 } 153 153 154 154 void WebInspector::setAttachedWindowWidth(unsigned width) 155 155 { 156 WebProcess::shared(). connection()->send(Messages::WebInspectorProxy::SetAttachedWindowWidth(width), m_page->pageID());156 WebProcess::shared().parentProcessConnection()->send(Messages::WebInspectorProxy::SetAttachedWindowWidth(width), m_page->pageID()); 157 157 } 158 158 159 159 void WebInspector::setToolbarHeight(unsigned height) 160 160 { 161 WebProcess::shared(). connection()->send(Messages::WebInspectorProxy::SetToolbarHeight(height), m_page->pageID());161 WebProcess::shared().parentProcessConnection()->send(Messages::WebInspectorProxy::SetToolbarHeight(height), m_page->pageID()); 162 162 } 163 163 … … 300 300 301 301 bool canAttachWindow = m_frontendClient->canAttachWindow(); 302 WebProcess::shared(). connection()->send(Messages::WebInspectorProxy::AttachAvailabilityChanged(canAttachWindow), m_page->pageID());302 WebProcess::shared().parentProcessConnection()->send(Messages::WebInspectorProxy::AttachAvailabilityChanged(canAttachWindow), m_page->pageID()); 303 303 m_frontendClient->setDockingUnavailable(!canAttachWindow); 304 304 } … … 308 308 { 309 309 ASSERT(m_remoteFrontendConnected); 310 WebProcess::shared(). connection()->send(Messages::WebInspectorProxy::SendMessageToRemoteFrontend(message), m_page->pageID());310 WebProcess::shared().parentProcessConnection()->send(Messages::WebInspectorProxy::SendMessageToRemoteFrontend(message), m_page->pageID()); 311 311 } 312 312 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r150663 r150669 455 455 } 456 456 457 CoreIPC::Connection* WebPage::connection() const 458 { 459 return WebProcess::shared().connection(); 457 CoreIPC::Connection* WebPage::messageSenderConnection() 458 { 459 return WebProcess::shared().parentProcessConnection(); 460 } 461 462 uint64_t WebPage::messageSenderDestinationID() 463 { 464 return pageID(); 460 465 } 461 466 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h
r150521 r150669 168 168 typedef Vector<RefPtr<PageOverlay>> PageOverlayList; 169 169 170 class WebPage : public TypedAPIObject<APIObject::TypeBundlePage>, public CoreIPC::MessageReceiver, public CoreIPC::MessageSender <WebPage>{170 class WebPage : public TypedAPIObject<APIObject::TypeBundlePage>, public CoreIPC::MessageReceiver, public CoreIPC::MessageSender { 171 171 public: 172 172 static PassRefPtr<WebPage> create(uint64_t pageID, const WebPageCreationParameters&); 173 173 virtual ~WebPage(); 174 175 // Used by MessageSender.176 CoreIPC::Connection* connection() const;177 uint64_t destinationID() const { return pageID(); }178 174 179 175 void close(); … … 664 660 WebPage(uint64_t pageID, const WebPageCreationParameters&); 665 661 662 // CoreIPC::MessageSender 663 virtual CoreIPC::Connection* messageSenderConnection() OVERRIDE; 664 virtual uint64_t messageSenderDestinationID() OVERRIDE; 665 666 666 void platformInitialize(); 667 667 -
trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm
r150653 r150669 188 188 } else { 189 189 bool commandWasHandledByUIProcess = false; 190 WebProcess::shared(). connection()->sendSync(Messages::WebPageProxy::ExecuteSavedCommandBySelector(commands[i].commandName),190 WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::ExecuteSavedCommandBySelector(commands[i].commandName), 191 191 Messages::WebPageProxy::ExecuteSavedCommandBySelector::Reply(commandWasHandledByUIProcess), m_pageID); 192 192 eventWasHandled |= commandWasHandledByUIProcess; … … 216 216 KeyboardEvent* oldEvent = m_keyboardEventBeingInterpreted; 217 217 m_keyboardEventBeingInterpreted = event; 218 bool sendResult = WebProcess::shared(). connection()->sendSync(Messages::WebPageProxy::InterpretQueuedKeyEvent(editorState()),218 bool sendResult = WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebPageProxy::InterpretQueuedKeyEvent(editorState()), 219 219 Messages::WebPageProxy::InterpretQueuedKeyEvent::Reply(eventWasHandled, commands), m_pageID); 220 220 m_keyboardEventBeingInterpreted = oldEvent; -
trunk/Source/WebKit2/WebProcess/WebProcess.cpp
r150314 r150669 371 371 CoreIPC::Attachment encodedConnectionIdentifier; 372 372 373 if (! connection()->sendSync(Messages::WebProcessProxy::GetNetworkProcessConnection(),373 if (!parentProcessConnection()->sendSync(Messages::WebProcessProxy::GetNetworkProcessConnection(), 374 374 Messages::WebProcessProxy::GetNetworkProcessConnection::Reply(encodedConnectionIdentifier), 0)) 375 375 return; … … 606 606 // FIXME: the ShouldTerminate message should also send termination parameters, such as any session cookies that need to be preserved. 607 607 bool shouldTerminate = false; 608 if ( connection()->sendSync(Messages::WebProcessProxy::ShouldTerminate(), Messages::WebProcessProxy::ShouldTerminate::Reply(shouldTerminate), 0)608 if (parentProcessConnection()->sendSync(Messages::WebProcessProxy::ShouldTerminate(), Messages::WebProcessProxy::ShouldTerminate::Reply(shouldTerminate), 0) 609 609 && !shouldTerminate) 610 610 return false;
Note: See TracChangeset
for help on using the changeset viewer.