Title: [130316] trunk/Source/WebKit2
Revision
130316
Author
aes...@apple.com
Date
2012-10-03 13:09:18 -0700 (Wed, 03 Oct 2012)

Log Message

[WebKit2] Add the ability to send messages to the WebPageGroupProxy
https://bugs.webkit.org/show_bug.cgi?id=98233

Reviewed by Anders Carlsson.

Add a WebPageGroupProxy.messages.in, implement a stub message receiver
in WebPageGroupProxy, and teach WebProcess how to route messages to the
appropriate WebPageGroupProxy.

* CMakeLists.txt: Tell a build system about added files.
* DerivedSources.make: Ditto.
* DerivedSources.pri: Ditto.
* GNUmakefile.list.am: Ditto.
* WebKit2.xcodeproj/project.pbxproj: Ditto.
* win/WebKit2.vcproj: Ditto.
* Platform/CoreIPC/MessageID.h: Add MessageClassWebPageGroupProxy.
* WebProcess/WebPage/WebPageGroupProxy.cpp:
(WebKit::WebPageGroupProxy::didReceiveMessage): Stub out the method
that will receive messages.
(WebKit::WebPageGroupProxy::didReceiveWebPageGroupProxyMessage): Stub
out a method that will exist in WebPageGroupProxyMessageReceiver.cpp
once WebPageGroupProxy.messages.in contains messages.
* WebProcess/WebPage/WebPageGroupProxy.h:
* WebProcess/WebPage/WebPageGroupProxy.messages.in: Added.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didReceiveMessage): Route messages to the
WebPageGroupProxy matching destinationID if the message is of class
MessageClassWebPageGroupProxy.

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebKit2/CMakeLists.txt (130315 => 130316)


--- trunk/Source/WebKit2/CMakeLists.txt	2012-10-03 20:03:20 UTC (rev 130315)
+++ trunk/Source/WebKit2/CMakeLists.txt	2012-10-03 20:09:18 UTC (rev 130316)
@@ -560,6 +560,7 @@
     WebProcess/WebPage/EventDispatcher.messages.in
     WebProcess/WebPage/WebInspector.messages.in
     WebProcess/WebPage/WebPage.messages.in
+    WebProcess/WebPage/WebPageGroupProxy.messages.in
 
     WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.messages.in
 )

Modified: trunk/Source/WebKit2/ChangeLog (130315 => 130316)


--- trunk/Source/WebKit2/ChangeLog	2012-10-03 20:03:20 UTC (rev 130315)
+++ trunk/Source/WebKit2/ChangeLog	2012-10-03 20:09:18 UTC (rev 130316)
@@ -1,3 +1,34 @@
+2012-10-02  Andy Estes  <aes...@apple.com>
+
+        [WebKit2] Add the ability to send messages to the WebPageGroupProxy
+        https://bugs.webkit.org/show_bug.cgi?id=98233
+
+        Reviewed by Anders Carlsson.
+
+        Add a WebPageGroupProxy.messages.in, implement a stub message receiver
+        in WebPageGroupProxy, and teach WebProcess how to route messages to the
+        appropriate WebPageGroupProxy.
+
+        * CMakeLists.txt: Tell a build system about added files.
+        * DerivedSources.make: Ditto.
+        * DerivedSources.pri: Ditto.
+        * GNUmakefile.list.am: Ditto.
+        * WebKit2.xcodeproj/project.pbxproj: Ditto.
+        * win/WebKit2.vcproj: Ditto.
+        * Platform/CoreIPC/MessageID.h: Add MessageClassWebPageGroupProxy.
+        * WebProcess/WebPage/WebPageGroupProxy.cpp:
+        (WebKit::WebPageGroupProxy::didReceiveMessage): Stub out the method
+        that will receive messages.
+        (WebKit::WebPageGroupProxy::didReceiveWebPageGroupProxyMessage): Stub
+        out a method that will exist in WebPageGroupProxyMessageReceiver.cpp
+        once WebPageGroupProxy.messages.in contains messages.
+        * WebProcess/WebPage/WebPageGroupProxy.h:
+        * WebProcess/WebPage/WebPageGroupProxy.messages.in: Added.
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::didReceiveMessage): Route messages to the
+        WebPageGroupProxy matching destinationID if the message is of class
+        MessageClassWebPageGroupProxy.
+
 2012-10-02  Anders Carlsson  <ander...@apple.com>
 
         Change most GraphicsLayer::create calls to use the version that takes a GraphicsLayerFactory

Modified: trunk/Source/WebKit2/DerivedSources.make (130315 => 130316)


--- trunk/Source/WebKit2/DerivedSources.make	2012-10-03 20:03:20 UTC (rev 130315)
+++ trunk/Source/WebKit2/DerivedSources.make	2012-10-03 20:09:18 UTC (rev 130316)
@@ -79,6 +79,7 @@
     WebNotificationManagerProxy \
     WebNotificationManager \
     WebPage \
+    WebPageGroupProxy \
     WebPageProxy \
     WebProcess \
     WebProcessConnection \

Modified: trunk/Source/WebKit2/DerivedSources.pri (130315 => 130316)


--- trunk/Source/WebKit2/DerivedSources.pri	2012-10-03 20:03:20 UTC (rev 130315)
+++ trunk/Source/WebKit2/DerivedSources.pri	2012-10-03 20:09:18 UTC (rev 130316)
@@ -100,6 +100,7 @@
     LayerTreeCoordinator.messages.in \
     WebInspector.messages.in \
     WebPage.messages.in \
+    WebPageGroupProxy.messages.in \
     WebPageProxy.messages.in \
     WebProcess.messages.in \
     WebProcessConnection.messages.in \

Modified: trunk/Source/WebKit2/GNUmakefile.list.am (130315 => 130316)


--- trunk/Source/WebKit2/GNUmakefile.list.am	2012-10-03 20:03:20 UTC (rev 130315)
+++ trunk/Source/WebKit2/GNUmakefile.list.am	2012-10-03 20:09:18 UTC (rev 130316)
@@ -205,6 +205,8 @@
 	DerivedSources/WebKit2/WebNotificationManagerMessages.h \
 	DerivedSources/WebKit2/WebNotificationManagerProxyMessageReceiver.cpp \
 	DerivedSources/WebKit2/WebNotificationManagerProxyMessages.h \
+	DerivedSources/WebKit2/WebPageGroupProxyMessageReceiver.cpp \
+	DerivedSources/WebKit2/WebPageGroupProxyMessages.h \
 	DerivedSources/WebKit2/WebPageProxyMessageReceiver.cpp \
 	DerivedSources/WebKit2/WebPageProxyMessages.h \
 	DerivedSources/WebKit2/WebPageMessageReceiver.cpp \

Modified: trunk/Source/WebKit2/Platform/CoreIPC/MessageID.h (130315 => 130316)


--- trunk/Source/WebKit2/Platform/CoreIPC/MessageID.h	2012-10-03 20:03:20 UTC (rev 130315)
+++ trunk/Source/WebKit2/Platform/CoreIPC/MessageID.h	2012-10-03 20:09:18 UTC (rev 130316)
@@ -52,6 +52,7 @@
     MessageClassWebNetworkInfoManagerProxy,
     MessageClassWebNotificationManager,
     MessageClassWebPage,
+    MessageClassWebPageGroupProxy,
     MessageClassWebProcess,
     MessageClassWebResourceCacheManager,
     MessageClassEventDispatcher,

Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (130315 => 130316)


--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2012-10-03 20:03:20 UTC (rev 130315)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2012-10-03 20:09:18 UTC (rev 130316)
@@ -254,6 +254,8 @@
 		296BD85E15019BC30071F424 /* StringUtilities.mm in Sources */ = {isa = PBXBuildFile; fileRef = 296BD85C15019BC30071F424 /* StringUtilities.mm */; };
 		29CD55AA128E294F00133C85 /* WKAccessibilityWebPageObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 29CD55A8128E294F00133C85 /* WKAccessibilityWebPageObject.h */; };
 		29CD55AB128E294F00133C85 /* WKAccessibilityWebPageObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29CD55A9128E294F00133C85 /* WKAccessibilityWebPageObject.mm */; };
+		29D55DF1161BF9F10031A2E3 /* WebPageGroupProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29D55DEF161BF9F10031A2E3 /* WebPageGroupProxyMessageReceiver.cpp */; };
+		29D55DF2161BF9F10031A2E3 /* WebPageGroupProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 29D55DF0161BF9F10031A2E3 /* WebPageGroupProxyMessages.h */; };
 		31099973146C75A20029DEB9 /* WebNotificationClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31099971146C759B0029DEB9 /* WebNotificationClient.cpp */; };
 		310999C7146C9E3D0029DEB9 /* WebNotificationClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 31099968146C71F50029DEB9 /* WebNotificationClient.h */; };
 		312C0C4A146DDC8A0016C911 /* WKNotificationProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 312C0C49146DDC8A0016C911 /* WKNotificationProvider.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -1313,6 +1315,9 @@
 		296BD85C15019BC30071F424 /* StringUtilities.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = StringUtilities.mm; sourceTree = "<group>"; };
 		29CD55A8128E294F00133C85 /* WKAccessibilityWebPageObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKAccessibilityWebPageObject.h; sourceTree = "<group>"; };
 		29CD55A9128E294F00133C85 /* WKAccessibilityWebPageObject.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKAccessibilityWebPageObject.mm; sourceTree = "<group>"; };
+		29D55DEE161BF8780031A2E3 /* WebPageGroupProxy.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebPageGroupProxy.messages.in; sourceTree = "<group>"; };
+		29D55DEF161BF9F10031A2E3 /* WebPageGroupProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebPageGroupProxyMessageReceiver.cpp; path = WebPageGroupProxyMessageReceiver.cpp; sourceTree = "<group>"; };
+		29D55DF0161BF9F10031A2E3 /* WebPageGroupProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebPageGroupProxyMessages.h; path = WebPageGroupProxyMessages.h; sourceTree = "<group>"; };
 		31099968146C71F50029DEB9 /* WebNotificationClient.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebNotificationClient.h; sourceTree = "<group>"; };
 		31099971146C759B0029DEB9 /* WebNotificationClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebNotificationClient.cpp; sourceTree = "<group>"; };
 		312C0C49146DDC8A0016C911 /* WKNotificationProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNotificationProvider.h; sourceTree = "<group>"; };
@@ -2949,6 +2954,7 @@
 				C0CE72581247E4DA00BC0EC4 /* WebPage.messages.in */,
 				BC7B621412A4219A00D174A4 /* WebPageGroupProxy.cpp */,
 				BC7B621312A4219A00D174A4 /* WebPageGroupProxy.h */,
+				29D55DEE161BF8780031A2E3 /* WebPageGroupProxy.messages.in */,
 				BCA0EF7E12331E78007D3CFB /* WebUndoStep.cpp */,
 				BCA0EF7D12331E78007D3CFB /* WebUndoStep.h */,
 			);
@@ -3785,6 +3791,8 @@
 				31BA9249148830810062EDB5 /* WebNotificationManagerMessages.h */,
 				318BE1651473433700A8FBB2 /* WebNotificationManagerProxyMessageReceiver.cpp */,
 				318BE1661473433700A8FBB2 /* WebNotificationManagerProxyMessages.h */,
+				29D55DEF161BF9F10031A2E3 /* WebPageGroupProxyMessageReceiver.cpp */,
+				29D55DF0161BF9F10031A2E3 /* WebPageGroupProxyMessages.h */,
 				C0CE729E1247E71D00BC0EC4 /* WebPageMessageReceiver.cpp */,
 				C0CE729F1247E71D00BC0EC4 /* WebPageMessages.h */,
 				BCBD3912125BB1A800D2C29F /* WebPageProxyMessageReceiver.cpp */,
@@ -4329,6 +4337,7 @@
 				BC989D85161A9890000D46D3 /* WKWebProcessPlugInInternal.h in Headers */,
 				1A3EED0F161A535400AEB4F5 /* MessageReceiverMap.h in Headers */,
 				1A3EED12161A53D600AEB4F5 /* MessageReceiver.h in Headers */,
+				29D55DF2161BF9F10031A2E3 /* WebPageGroupProxyMessages.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -5187,6 +5196,7 @@
 				BCDC308B15FD6CD1006B6695 /* WebProcessServiceEntryPoints.mm in Sources */,
 				BC989D81161A7E5D000D46D3 /* WKWebProcessPlugIn.mm in Sources */,
 				1A3EED0E161A535400AEB4F5 /* MessageReceiverMap.cpp in Sources */,
+				29D55DF1161BF9F10031A2E3 /* WebPageGroupProxyMessageReceiver.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPageGroupProxy.cpp (130315 => 130316)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPageGroupProxy.cpp	2012-10-03 20:03:20 UTC (rev 130315)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPageGroupProxy.cpp	2012-10-03 20:09:18 UTC (rev 130316)
@@ -44,5 +44,16 @@
 WebPageGroupProxy::~WebPageGroupProxy()
 {
 }
+    
+void WebPageGroupProxy::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
+{
+    didReceiveWebPageGroupProxyMessage(connection, messageID, arguments);
+}
 
+void WebPageGroupProxy::didReceiveWebPageGroupProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*)
+{
+    // FIXME: Remove this once WebPageGroupProxy.messages.in contains messages,
+    // in which case this method will be auto-generated.
+}
+
 } // namespace WebKit

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPageGroupProxy.h (130315 => 130316)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPageGroupProxy.h	2012-10-03 20:03:20 UTC (rev 130315)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPageGroupProxy.h	2012-10-03 20:09:18 UTC (rev 130316)
@@ -30,6 +30,12 @@
 #include "WebPageGroupData.h"
 #include <wtf/PassRefPtr.h>
 
+namespace CoreIPC {
+class ArgumentDecoder;
+class Connection;
+class MessageID;
+}
+
 namespace WebKit {
 
 class WebPageGroupProxy : public APIObject {
@@ -43,6 +49,8 @@
     uint64_t pageGroupID() const { return m_data.pageGroupID; }
     bool isVisibleToInjectedBundle() const { return m_data.visibleToInjectedBundle; }
     bool isVisibleToHistoryClient() const { return m_data.visibleToHistoryClient; }
+    
+    void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
 
 private:
     WebPageGroupProxy(const WebPageGroupData& data)
@@ -51,6 +59,8 @@
     }
 
     virtual Type type() const { return APIType; }
+    
+    void didReceiveWebPageGroupProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
 
     WebPageGroupData m_data;
 };

Added: trunk/Source/WebKit2/WebProcess/WebPage/WebPageGroupProxy.messages.in (0 => 130316)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPageGroupProxy.messages.in	                        (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPageGroupProxy.messages.in	2012-10-03 20:09:18 UTC (rev 130316)
@@ -0,0 +1,24 @@
+# Copyright (C) 2012 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+messages -> WebPageGroupProxy {
+}

Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (130315 => 130316)


--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp	2012-10-03 20:03:20 UTC (rev 130315)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp	2012-10-03 20:09:18 UTC (rev 130316)
@@ -708,6 +708,18 @@
         m_injectedBundle->didReceiveMessage(connection, messageID, arguments);    
         return;
     }
+    
+    if (messageID.is<CoreIPC::MessageClassWebPageGroupProxy>()) {
+        uint64_t pageGroupID = arguments->destinationID();
+        if (!pageGroupID)
+            return;
+        
+        WebPageGroupProxy* pageGroupProxy = webPageGroup(pageGroupID);
+        if (!pageGroupProxy)
+            return;
+        
+        pageGroupProxy->didReceiveMessage(connection, messageID, arguments);
+    }
 
     uint64_t pageID = arguments->destinationID();
     if (!pageID)

Modified: trunk/Source/WebKit2/win/WebKit2.vcproj (130315 => 130316)


--- trunk/Source/WebKit2/win/WebKit2.vcproj	2012-10-03 20:03:20 UTC (rev 130315)
+++ trunk/Source/WebKit2/win/WebKit2.vcproj	2012-10-03 20:09:18 UTC (rev 130316)
@@ -2122,6 +2122,10 @@
 					>
 				</File>
 				<File
+					RelativePath="..\WebProcess\WebPage\WebPageGroupProxy.messages.in"
+					>
+				</File>
+				<File
 					RelativePath="..\WebProcess\WebPage\WebUndoStep.cpp"
 					>
 				</File>
@@ -4443,6 +4447,14 @@
 				>
 			</File>
 			<File
+				RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\WebPageGroupProxyMessageReceiver.cpp"
+				>
+			</File>
+			<File
+				RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\WebPageGroupProxyMessages.h"
+				>
+			</File>
+			<File
 				RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\WebPageMessageReceiver.cpp"
 				>
 			</File>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to