Changeset 130316 in webkit


Ignore:
Timestamp:
Oct 3, 2012, 1:09:18 PM (13 years ago)
Author:
aestes@apple.com
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.

Location:
trunk/Source/WebKit2
Files:
1 added
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/CMakeLists.txt

    r130207 r130316  
    561561    WebProcess/WebPage/WebInspector.messages.in
    562562    WebProcess/WebPage/WebPage.messages.in
     563    WebProcess/WebPage/WebPageGroupProxy.messages.in
    563564
    564565    WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.messages.in
  • trunk/Source/WebKit2/ChangeLog

    r130302 r130316  
     12012-10-02  Andy Estes  <aestes@apple.com>
     2
     3        [WebKit2] Add the ability to send messages to the WebPageGroupProxy
     4        https://bugs.webkit.org/show_bug.cgi?id=98233
     5
     6        Reviewed by Anders Carlsson.
     7
     8        Add a WebPageGroupProxy.messages.in, implement a stub message receiver
     9        in WebPageGroupProxy, and teach WebProcess how to route messages to the
     10        appropriate WebPageGroupProxy.
     11
     12        * CMakeLists.txt: Tell a build system about added files.
     13        * DerivedSources.make: Ditto.
     14        * DerivedSources.pri: Ditto.
     15        * GNUmakefile.list.am: Ditto.
     16        * WebKit2.xcodeproj/project.pbxproj: Ditto.
     17        * win/WebKit2.vcproj: Ditto.
     18        * Platform/CoreIPC/MessageID.h: Add MessageClassWebPageGroupProxy.
     19        * WebProcess/WebPage/WebPageGroupProxy.cpp:
     20        (WebKit::WebPageGroupProxy::didReceiveMessage): Stub out the method
     21        that will receive messages.
     22        (WebKit::WebPageGroupProxy::didReceiveWebPageGroupProxyMessage): Stub
     23        out a method that will exist in WebPageGroupProxyMessageReceiver.cpp
     24        once WebPageGroupProxy.messages.in contains messages.
     25        * WebProcess/WebPage/WebPageGroupProxy.h:
     26        * WebProcess/WebPage/WebPageGroupProxy.messages.in: Added.
     27        * WebProcess/WebProcess.cpp:
     28        (WebKit::WebProcess::didReceiveMessage): Route messages to the
     29        WebPageGroupProxy matching destinationID if the message is of class
     30        MessageClassWebPageGroupProxy.
     31
    1322012-10-02  Anders Carlsson  <andersca@apple.com>
    233
  • trunk/Source/WebKit2/DerivedSources.make

    r129286 r130316  
    8080    WebNotificationManager \
    8181    WebPage \
     82    WebPageGroupProxy \
    8283    WebPageProxy \
    8384    WebProcess \
  • trunk/Source/WebKit2/DerivedSources.pri

    r128045 r130316  
    101101    WebInspector.messages.in \
    102102    WebPage.messages.in \
     103    WebPageGroupProxy.messages.in \
    103104    WebPageProxy.messages.in \
    104105    WebProcess.messages.in \
  • trunk/Source/WebKit2/GNUmakefile.list.am

    r130257 r130316  
    206206        DerivedSources/WebKit2/WebNotificationManagerProxyMessageReceiver.cpp \
    207207        DerivedSources/WebKit2/WebNotificationManagerProxyMessages.h \
     208        DerivedSources/WebKit2/WebPageGroupProxyMessageReceiver.cpp \
     209        DerivedSources/WebKit2/WebPageGroupProxyMessages.h \
    208210        DerivedSources/WebKit2/WebPageProxyMessageReceiver.cpp \
    209211        DerivedSources/WebKit2/WebPageProxyMessages.h \
  • trunk/Source/WebKit2/Platform/CoreIPC/MessageID.h

    r130207 r130316  
    5353    MessageClassWebNotificationManager,
    5454    MessageClassWebPage,
     55    MessageClassWebPageGroupProxy,
    5556    MessageClassWebProcess,
    5657    MessageClassWebResourceCacheManager,
  • trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj

    r130245 r130316  
    255255                29CD55AA128E294F00133C85 /* WKAccessibilityWebPageObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 29CD55A8128E294F00133C85 /* WKAccessibilityWebPageObject.h */; };
    256256                29CD55AB128E294F00133C85 /* WKAccessibilityWebPageObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29CD55A9128E294F00133C85 /* WKAccessibilityWebPageObject.mm */; };
     257                29D55DF1161BF9F10031A2E3 /* WebPageGroupProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29D55DEF161BF9F10031A2E3 /* WebPageGroupProxyMessageReceiver.cpp */; };
     258                29D55DF2161BF9F10031A2E3 /* WebPageGroupProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 29D55DF0161BF9F10031A2E3 /* WebPageGroupProxyMessages.h */; };
    257259                31099973146C75A20029DEB9 /* WebNotificationClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31099971146C759B0029DEB9 /* WebNotificationClient.cpp */; };
    258260                310999C7146C9E3D0029DEB9 /* WebNotificationClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 31099968146C71F50029DEB9 /* WebNotificationClient.h */; };
     
    13141316                29CD55A8128E294F00133C85 /* WKAccessibilityWebPageObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKAccessibilityWebPageObject.h; sourceTree = "<group>"; };
    13151317                29CD55A9128E294F00133C85 /* WKAccessibilityWebPageObject.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKAccessibilityWebPageObject.mm; sourceTree = "<group>"; };
     1318                29D55DEE161BF8780031A2E3 /* WebPageGroupProxy.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebPageGroupProxy.messages.in; sourceTree = "<group>"; };
     1319                29D55DEF161BF9F10031A2E3 /* WebPageGroupProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebPageGroupProxyMessageReceiver.cpp; path = WebPageGroupProxyMessageReceiver.cpp; sourceTree = "<group>"; };
     1320                29D55DF0161BF9F10031A2E3 /* WebPageGroupProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebPageGroupProxyMessages.h; path = WebPageGroupProxyMessages.h; sourceTree = "<group>"; };
    13161321                31099968146C71F50029DEB9 /* WebNotificationClient.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebNotificationClient.h; sourceTree = "<group>"; };
    13171322                31099971146C759B0029DEB9 /* WebNotificationClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebNotificationClient.cpp; sourceTree = "<group>"; };
     
    29502955                                BC7B621412A4219A00D174A4 /* WebPageGroupProxy.cpp */,
    29512956                                BC7B621312A4219A00D174A4 /* WebPageGroupProxy.h */,
     2957                                29D55DEE161BF8780031A2E3 /* WebPageGroupProxy.messages.in */,
    29522958                                BCA0EF7E12331E78007D3CFB /* WebUndoStep.cpp */,
    29532959                                BCA0EF7D12331E78007D3CFB /* WebUndoStep.h */,
     
    37863792                                318BE1651473433700A8FBB2 /* WebNotificationManagerProxyMessageReceiver.cpp */,
    37873793                                318BE1661473433700A8FBB2 /* WebNotificationManagerProxyMessages.h */,
     3794                                29D55DEF161BF9F10031A2E3 /* WebPageGroupProxyMessageReceiver.cpp */,
     3795                                29D55DF0161BF9F10031A2E3 /* WebPageGroupProxyMessages.h */,
    37883796                                C0CE729E1247E71D00BC0EC4 /* WebPageMessageReceiver.cpp */,
    37893797                                C0CE729F1247E71D00BC0EC4 /* WebPageMessages.h */,
     
    43304338                                1A3EED0F161A535400AEB4F5 /* MessageReceiverMap.h in Headers */,
    43314339                                1A3EED12161A53D600AEB4F5 /* MessageReceiver.h in Headers */,
     4340                                29D55DF2161BF9F10031A2E3 /* WebPageGroupProxyMessages.h in Headers */,
    43324341                        );
    43334342                        runOnlyForDeploymentPostprocessing = 0;
     
    51885197                                BC989D81161A7E5D000D46D3 /* WKWebProcessPlugIn.mm in Sources */,
    51895198                                1A3EED0E161A535400AEB4F5 /* MessageReceiverMap.cpp in Sources */,
     5199                                29D55DF1161BF9F10031A2E3 /* WebPageGroupProxyMessageReceiver.cpp in Sources */,
    51905200                        );
    51915201                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPageGroupProxy.cpp

    r95901 r130316  
    4545{
    4646}
     47   
     48void WebPageGroupProxy::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
     49{
     50    didReceiveWebPageGroupProxyMessage(connection, messageID, arguments);
     51}
     52
     53void WebPageGroupProxy::didReceiveWebPageGroupProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*)
     54{
     55    // FIXME: Remove this once WebPageGroupProxy.messages.in contains messages,
     56    // in which case this method will be auto-generated.
     57}
    4758
    4859} // namespace WebKit
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPageGroupProxy.h

    r95901 r130316  
    3131#include <wtf/PassRefPtr.h>
    3232
     33namespace CoreIPC {
     34class ArgumentDecoder;
     35class Connection;
     36class MessageID;
     37}
     38
    3339namespace WebKit {
    3440
     
    4450    bool isVisibleToInjectedBundle() const { return m_data.visibleToInjectedBundle; }
    4551    bool isVisibleToHistoryClient() const { return m_data.visibleToHistoryClient; }
     52   
     53    void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
    4654
    4755private:
     
    5260
    5361    virtual Type type() const { return APIType; }
     62   
     63    void didReceiveWebPageGroupProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
    5464
    5565    WebPageGroupData m_data;
  • trunk/Source/WebKit2/WebProcess/WebProcess.cpp

    r130207 r130316  
    709709        return;
    710710    }
     711   
     712    if (messageID.is<CoreIPC::MessageClassWebPageGroupProxy>()) {
     713        uint64_t pageGroupID = arguments->destinationID();
     714        if (!pageGroupID)
     715            return;
     716       
     717        WebPageGroupProxy* pageGroupProxy = webPageGroup(pageGroupID);
     718        if (!pageGroupProxy)
     719            return;
     720       
     721        pageGroupProxy->didReceiveMessage(connection, messageID, arguments);
     722    }
    711723
    712724    uint64_t pageID = arguments->destinationID();
  • trunk/Source/WebKit2/win/WebKit2.vcproj

    r130207 r130316  
    21232123                                </File>
    21242124                                <File
     2125                                        RelativePath="..\WebProcess\WebPage\WebPageGroupProxy.messages.in"
     2126                                        >
     2127                                </File>
     2128                                <File
    21252129                                        RelativePath="..\WebProcess\WebPage\WebUndoStep.cpp"
    21262130                                        >
     
    44444448                        </File>
    44454449                        <File
     4450                                RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\WebPageGroupProxyMessageReceiver.cpp"
     4451                                >
     4452                        </File>
     4453                        <File
     4454                                RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\WebPageGroupProxyMessages.h"
     4455                                >
     4456                        </File>
     4457                        <File
    44464458                                RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\WebPageMessageReceiver.cpp"
    44474459                                >
Note: See TracChangeset for help on using the changeset viewer.