Changeset 64396 in webkit


Ignore:
Timestamp:
Jul 30, 2010 6:58:28 PM (14 years ago)
Author:
weinig@apple.com
Message:

Patch for https://bugs.webkit.org/show_bug.cgi?id=43290
Add structured message passing from the injected bundle to UIProcess

Reviewed by Maciej Stachowiak.

WebKit2:

  • Platform/CoreIPC/MessageID.h:
  • Shared/CoreIPCSupport/WebContextMessageKinds.h: Added.
  • Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h:

(WebProcessProxyMessage::):

  • UIProcess/API/C/WKContext.h:
  • UIProcess/WebContext.cpp:

(WebKit::):
(WebKit::PostMessageEncoder::PostMessageDecoder::PostMessageDecoder):
(WebKit::PostMessageEncoder::PostMessageDecoder::decode):
(WebKit::WebContext::didReceiveMessageFromInjectedBundle):
(WebKit::WebContext::didReceiveMessage):

  • UIProcess/WebContext.h:
  • UIProcess/WebContextInjectedBundleClient.cpp:

(WebKit::WebContextInjectedBundleClient::didReceiveMessageFromInjectedBundle):

  • UIProcess/WebContextInjectedBundleClient.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::didReceiveMessage):
(WebKit::WebProcessProxy::didReceiveSyncMessage):

  • UIProcess/WebProcessProxy.h:
  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/InjectedBundle/API/c/WKBundle.cpp:

(WKBundlePostMessage):

  • WebProcess/InjectedBundle/API/c/WKBundle.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::):
(WebKit::InjectedBundle::InjectedBundle):
(WebKit::InjectedBundle::~InjectedBundle):
(WebKit::InjectedBundle::initializeClient):
(WebKit::InjectedBundle::postMessage):
(WebKit::InjectedBundle::setShouldTrackVisitedLinks):
(WebKit::InjectedBundle::removeAllVisitedLinks):
(WebKit::InjectedBundle::didCreatePage):
(WebKit::InjectedBundle::willDestroyPage):
(WebKit::InjectedBundle::didReceiveMessage):

  • WebProcess/InjectedBundle/InjectedBundle.h:

WebKitTools:

  • MiniBrowser/mac/AppDelegate.m:

(didRecieveMessageFromInjectedBundle):

  • MiniBrowser/mac/WebBundle/WebBundleMain.m:

(didClearWindowForFrame):
(didRecieveMessage):

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::done):
(WTR::InjectedBundle::didReceiveMessage):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::initialize):
(WTR::TestController::didReceiveMessageFromInjectedBundle):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):

  • WebKitTestRunner/TestInvocation.h:
  • WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
Location:
trunk
Files:
1 added
24 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit2/ChangeLog

    r64390 r64396  
     12010-07-30  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Maciej Stachowiak.
     4
     5        Patch for https://bugs.webkit.org/show_bug.cgi?id=43290
     6        Add structured message passing from the injected bundle to UIProcess
     7
     8        * Platform/CoreIPC/MessageID.h:
     9        * Shared/CoreIPCSupport/WebContextMessageKinds.h: Added.
     10        * Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h:
     11        (WebProcessProxyMessage::):
     12        * UIProcess/API/C/WKContext.h:
     13        * UIProcess/WebContext.cpp:
     14        (WebKit::):
     15        (WebKit::PostMessageEncoder::PostMessageDecoder::PostMessageDecoder):
     16        (WebKit::PostMessageEncoder::PostMessageDecoder::decode):
     17        (WebKit::WebContext::didReceiveMessageFromInjectedBundle):
     18        (WebKit::WebContext::didReceiveMessage):
     19        * UIProcess/WebContext.h:
     20        * UIProcess/WebContextInjectedBundleClient.cpp:
     21        (WebKit::WebContextInjectedBundleClient::didReceiveMessageFromInjectedBundle):
     22        * UIProcess/WebContextInjectedBundleClient.h:
     23        * UIProcess/WebProcessProxy.cpp:
     24        (WebKit::WebProcessProxy::didReceiveMessage):
     25        (WebKit::WebProcessProxy::didReceiveSyncMessage):
     26        * UIProcess/WebProcessProxy.h:
     27        * WebKit2.xcodeproj/project.pbxproj:
     28        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
     29        (WKBundlePostMessage):
     30        * WebProcess/InjectedBundle/API/c/WKBundle.h:
     31        * WebProcess/InjectedBundle/InjectedBundle.cpp:
     32        (WebKit::):
     33        (WebKit::InjectedBundle::InjectedBundle):
     34        (WebKit::InjectedBundle::~InjectedBundle):
     35        (WebKit::InjectedBundle::initializeClient):
     36        (WebKit::InjectedBundle::postMessage):
     37        (WebKit::InjectedBundle::setShouldTrackVisitedLinks):
     38        (WebKit::InjectedBundle::removeAllVisitedLinks):
     39        (WebKit::InjectedBundle::didCreatePage):
     40        (WebKit::InjectedBundle::willDestroyPage):
     41        (WebKit::InjectedBundle::didReceiveMessage):
     42        * WebProcess/InjectedBundle/InjectedBundle.h:
     43
    1442010-07-30  Andy Estes  <aestes@apple.com>
    245
  • trunk/WebKit2/Platform/CoreIPC/MessageID.h

    r64380 r64396  
    4242
    4343    // Messages sent by the web process to the UI process.
     44    MessageClassWebContext,
    4445    MessageClassWebProcessProxy,
    4546    MessageClassWebPageProxy,
  • trunk/WebKit2/Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h

    r64247 r64396  
    4242    GetPlugins,
    4343    PopulateVisitedLinks,
    44     PostMessage,
    4544};
    4645
  • trunk/WebKit2/UIProcess/API/C/WKContext.h

    r64380 r64396  
    3434
    3535// Injected Bundle Client
    36 typedef void (*WKContextDidReceiveMessageFromInjectedBundleCallback)(WKContextRef page, WKStringRef message, const void *clientInfo);
     36typedef void (*WKContextDidReceiveMessageFromInjectedBundleCallback)(WKContextRef page, WKStringRef messageName, WKTypeRef messageBody, const void *clientInfo);
    3737
    3838struct WKContextInjectedBundleClient {
  • trunk/WebKit2/UIProcess/WebContext.cpp

    r64380 r64396  
    2929#include "InjectedBundleMessageKinds.h"
    3030#include "RunLoop.h"
     31#include "WebContextMessageKinds.h"
    3132#include "WebCoreArgumentCoders.h"
    3233#include "WebPageNamespace.h"
     
    3536#include "WebProcessMessageKinds.h"
    3637#include "WebProcessProxy.h"
     38#include <wtf/OwnArrayPtr.h>
    3739
    3840#include "WKContextPrivate.h"
     
    4648namespace WebKit {
    4749
    48 #ifndef NDEBUG
    49 static WTF::RefCountedLeakCounter webContextCounter("WebContext");
    50 #endif
    51 
    52 WebContext* WebContext::sharedProcessContext()
    53 {
    54     static WebContext* context = adoptRef(new WebContext(ProcessModelSharedSecondaryProcess, String())).leakRef();
    55     return context;
    56 }
    57 
    58 WebContext* WebContext::sharedThreadContext()
    59 {
    60     static WebContext* context = adoptRef(new WebContext(ProcessModelSharedSecondaryThread, String())).leakRef();
    61     return context;
    62 }
    63 
    64 WebContext::WebContext(ProcessModel processModel, const WebCore::String& injectedBundlePath)
    65     : m_processModel(processModel)
    66     , m_injectedBundlePath(injectedBundlePath)
    67 {
    68     RunLoop::initializeMainRunLoop();
    69 
    70     m_preferences = WebPreferences::shared();
    71     m_preferences->addContext(this);
    72 
    73 #ifndef NDEBUG
    74     webContextCounter.increment();
    75 #endif
    76 }
    77 
    78 WebContext::~WebContext()
    79 {
    80     ASSERT(m_pageNamespaces.isEmpty());
    81     m_preferences->removeContext(this);
    82 
    83 #ifndef NDEBUG
    84     webContextCounter.decrement();
    85 #endif
    86 }
    87 
    88 void WebContext::initializeInjectedBundleClient(const WKContextInjectedBundleClient* client)
    89 {
    90     m_injectedBundleClient.initialize(client);
    91 }
    92 
    93 void WebContext::initializeHistoryClient(const WKContextHistoryClient* client)
    94 {
    95     m_historyClient.initialize(client);
    96    
    97     if (!hasValidProcess())
    98         return;
    99        
    100     m_process->send(WebProcessMessage::SetShouldTrackVisitedLinks, 0, CoreIPC::In(m_historyClient.shouldTrackVisitedLinks()));
    101 }
    102 
    103 void WebContext::ensureWebProcess()
    104 {
    105     if (hasValidProcess())
    106         return;
    107 
    108     m_process = WebProcessManager::shared().getWebProcess(this);
    109 
    110     m_process->send(WebProcessMessage::SetShouldTrackVisitedLinks, 0, CoreIPC::In(m_historyClient.shouldTrackVisitedLinks()));
    111 
    112     for (HashSet<String>::iterator it = m_schemesToRegisterAsEmptyDocument.begin(), end = m_schemesToRegisterAsEmptyDocument.end(); it != end; ++it)
    113         m_process->send(WebProcessMessage::RegisterURLSchemeAsEmptyDocument, 0, CoreIPC::In(*it));
    114 }
    115 
    116 WebPageProxy* WebContext::createWebPage(WebPageNamespace* pageNamespace)
    117 {
    118     ensureWebProcess();
    119     return m_process->createWebPage(pageNamespace);
    120 }
    121 
    122 void WebContext::reviveIfNecessary()
    123 {
    124     ensureWebProcess();
    125 }
    126 
    127 WebPageNamespace* WebContext::createPageNamespace()
    128 {
    129     RefPtr<WebPageNamespace> pageNamespace = WebPageNamespace::create(this);
    130     m_pageNamespaces.add(pageNamespace.get());
    131     return pageNamespace.release().releaseRef();
    132 }
    133 
    134 void WebContext::pageNamespaceWasDestroyed(WebPageNamespace* pageNamespace)
    135 {
    136     ASSERT(m_pageNamespaces.contains(pageNamespace));
    137     m_pageNamespaces.remove(pageNamespace);
    138 }
    139 
    140 void WebContext::setPreferences(WebPreferences* preferences)
    141 {
    142     ASSERT(preferences);
    143 
    144     if (preferences == m_preferences)
    145         return;
    146 
    147     m_preferences->removeContext(this);
    148     m_preferences = preferences;
    149     m_preferences->addContext(this);
    150 
    151     // FIXME: Update all Pages/PageNamespace with the new WebPreferences.
    152 }
    153 
    154 WebPreferences* WebContext::preferences() const
    155 {
    156     return m_preferences.get();
    157 }
    158 
    159 void WebContext::preferencesDidChange()
    160 {
    161     if (!m_process)
    162         return;
    163 
    164     for (HashSet<WebPageNamespace*>::iterator it = m_pageNamespaces.begin(), end = m_pageNamespaces.end(); it != end; ++it) {
    165         WebPageNamespace* pageNamespace = *it;
    166         pageNamespace->preferencesDidChange();
    167     }
    168 }
    169 
    17050namespace {
     51
     52// FIXME: We should try to abstract out the shared logic from these and
     53// and the PostMessageEncoder/PostMessageDecoders in InjectedBundle.cpp into
     54// a shared baseclass.
    17155
    17256// Encodes postMessage messages from the UIProcess -> InjectedBundle
     
    18872        encoder.encode(static_cast<uint32_t>(type));
    18973        switch (type) {
    190             case APIObject::TypeArray: {
    191                 ImmutableArray* array = static_cast<ImmutableArray*>(m_root);
    192                 encoder.encode(static_cast<uint64_t>(array->size()));
    193                 for (size_t i = 0; i < array->size(); ++i)
    194                     encoder.encode(PostMessageEncoder(array->at(i)));
    195                 break;
    196             }
    197             case APIObject::TypeString: {
    198                 WebString* string = static_cast<WebString*>(m_root);
    199                 encoder.encode(string->string());
    200                 break;
    201             }
    202             case APIObject::TypePage: {
    203                 WebPageProxy* page = static_cast<WebPageProxy*>(m_root);
    204                 encoder.encode(page->pageID());
    205                 break;
    206             }
    207             default:
    208                 ASSERT_NOT_REACHED();
    209                 break;
     74        case APIObject::TypeArray: {
     75            ImmutableArray* array = static_cast<ImmutableArray*>(m_root);
     76            encoder.encode(static_cast<uint64_t>(array->size()));
     77            for (size_t i = 0; i < array->size(); ++i)
     78                encoder.encode(PostMessageEncoder(array->at(i)));
     79            break;
     80        }
     81        case APIObject::TypeString: {
     82            WebString* string = static_cast<WebString*>(m_root);
     83            encoder.encode(string->string());
     84            break;
     85        }
     86        case APIObject::TypePage: {
     87            WebPageProxy* page = static_cast<WebPageProxy*>(m_root);
     88            encoder.encode(page->pageID());
     89            break;
     90        }
     91        default:
     92            ASSERT_NOT_REACHED();
     93            break;
    21094        }
    21195    }
     
    21599};
    216100
     101// Decodes postMessage messages going from the InjectedBundle -> UIProcess
     102
     103//   - Array -> Array
     104//   - String -> String
     105//   - BundlePage -> Page
     106
     107class PostMessageDecoder {
     108public:
     109    PostMessageDecoder(APIObject** root, WebContext* context)
     110        : m_root(root)
     111        , m_context(context)
     112    {
     113    }
     114
     115    static bool decode(CoreIPC::ArgumentDecoder& decoder, PostMessageDecoder& coder)
     116    {
     117        uint32_t type;
     118        if (!decoder.decode(type))
     119            return false;
     120
     121        switch (type) {
     122        case APIObject::TypeArray: {
     123            uint64_t size;
     124            if (!decoder.decode(size))
     125                return false;
     126           
     127            OwnArrayPtr<APIObject*> array;
     128            array.set(new APIObject*[size]);
     129           
     130            for (size_t i = 0; i < size; ++i) {
     131                APIObject* element;
     132                PostMessageDecoder messageCoder(&element, coder.m_context);
     133                if (!decoder.decode(messageCoder))
     134                    return false;
     135                array[i] = element;
     136            }
     137
     138            *(coder.m_root) = ImmutableArray::create(array.release(), size).leakRef();
     139            break;
     140        }
     141        case APIObject::TypeString: {
     142            String string;
     143            if (!decoder.decode(string))
     144                return false;
     145            *(coder.m_root) = WebString::create(string).leakRef();
     146            break;
     147        }
     148        case APIObject::TypeBundlePage: {
     149            uint64_t pageID;
     150            if (!decoder.decode(pageID))
     151                return false;
     152            *(coder.m_root) = coder.m_context->process()->webPage(pageID);
     153            break;
     154        }
     155        default:
     156            return false;
     157        }
     158
     159        return true;
     160    }
     161
     162private:
     163    APIObject** m_root;
     164    WebContext* m_context;
     165};
     166
     167}
     168
     169#ifndef NDEBUG
     170static WTF::RefCountedLeakCounter webContextCounter("WebContext");
     171#endif
     172
     173WebContext* WebContext::sharedProcessContext()
     174{
     175    static WebContext* context = adoptRef(new WebContext(ProcessModelSharedSecondaryProcess, String())).leakRef();
     176    return context;
     177}
     178
     179WebContext* WebContext::sharedThreadContext()
     180{
     181    static WebContext* context = adoptRef(new WebContext(ProcessModelSharedSecondaryThread, String())).leakRef();
     182    return context;
     183}
     184
     185WebContext::WebContext(ProcessModel processModel, const WebCore::String& injectedBundlePath)
     186    : m_processModel(processModel)
     187    , m_injectedBundlePath(injectedBundlePath)
     188{
     189    RunLoop::initializeMainRunLoop();
     190
     191    m_preferences = WebPreferences::shared();
     192    m_preferences->addContext(this);
     193
     194#ifndef NDEBUG
     195    webContextCounter.increment();
     196#endif
     197}
     198
     199WebContext::~WebContext()
     200{
     201    ASSERT(m_pageNamespaces.isEmpty());
     202    m_preferences->removeContext(this);
     203
     204#ifndef NDEBUG
     205    webContextCounter.decrement();
     206#endif
     207}
     208
     209void WebContext::initializeInjectedBundleClient(const WKContextInjectedBundleClient* client)
     210{
     211    m_injectedBundleClient.initialize(client);
     212}
     213
     214void WebContext::initializeHistoryClient(const WKContextHistoryClient* client)
     215{
     216    m_historyClient.initialize(client);
     217   
     218    if (!hasValidProcess())
     219        return;
     220       
     221    m_process->send(WebProcessMessage::SetShouldTrackVisitedLinks, 0, CoreIPC::In(m_historyClient.shouldTrackVisitedLinks()));
     222}
     223
     224void WebContext::ensureWebProcess()
     225{
     226    if (hasValidProcess())
     227        return;
     228
     229    m_process = WebProcessManager::shared().getWebProcess(this);
     230
     231    m_process->send(WebProcessMessage::SetShouldTrackVisitedLinks, 0, CoreIPC::In(m_historyClient.shouldTrackVisitedLinks()));
     232
     233    for (HashSet<String>::iterator it = m_schemesToRegisterAsEmptyDocument.begin(), end = m_schemesToRegisterAsEmptyDocument.end(); it != end; ++it)
     234        m_process->send(WebProcessMessage::RegisterURLSchemeAsEmptyDocument, 0, CoreIPC::In(*it));
     235}
     236
     237WebPageProxy* WebContext::createWebPage(WebPageNamespace* pageNamespace)
     238{
     239    ensureWebProcess();
     240    return m_process->createWebPage(pageNamespace);
     241}
     242
     243void WebContext::reviveIfNecessary()
     244{
     245    ensureWebProcess();
     246}
     247
     248WebPageNamespace* WebContext::createPageNamespace()
     249{
     250    RefPtr<WebPageNamespace> pageNamespace = WebPageNamespace::create(this);
     251    m_pageNamespaces.add(pageNamespace.get());
     252    return pageNamespace.release().releaseRef();
     253}
     254
     255void WebContext::pageNamespaceWasDestroyed(WebPageNamespace* pageNamespace)
     256{
     257    ASSERT(m_pageNamespaces.contains(pageNamespace));
     258    m_pageNamespaces.remove(pageNamespace);
     259}
     260
     261void WebContext::setPreferences(WebPreferences* preferences)
     262{
     263    ASSERT(preferences);
     264
     265    if (preferences == m_preferences)
     266        return;
     267
     268    m_preferences->removeContext(this);
     269    m_preferences = preferences;
     270    m_preferences->addContext(this);
     271
     272    // FIXME: Update all Pages/PageNamespace with the new WebPreferences.
     273}
     274
     275WebPreferences* WebContext::preferences() const
     276{
     277    return m_preferences.get();
     278}
     279
     280void WebContext::preferencesDidChange()
     281{
     282    if (!m_process)
     283        return;
     284
     285    for (HashSet<WebPageNamespace*>::iterator it = m_pageNamespaces.begin(), end = m_pageNamespaces.end(); it != end; ++it) {
     286        WebPageNamespace* pageNamespace = *it;
     287        pageNamespace->preferencesDidChange();
     288    }
    217289}
    218290
     
    229301// InjectedBundle client
    230302
    231 void WebContext::didReceiveMessageFromInjectedBundle(const String& message)
    232 {
    233     m_injectedBundleClient.didReceiveMessageFromInjectedBundle(this, message);
     303void WebContext::didReceiveMessageFromInjectedBundle(const String& messageName, APIObject* messageBody)
     304{
     305    m_injectedBundleClient.didReceiveMessageFromInjectedBundle(this, messageName, messageBody);
    234306}
    235307
     
    293365}
    294366
     367void WebContext::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder& arguments)
     368{
     369    switch (messageID.get<WebContextMessage::Kind>()) {
     370        case WebContextMessage::PostMessage: {
     371            String messageName;
     372            // FIXME: This should be a RefPtr<APIObject>
     373            APIObject* messageBody = 0;
     374            PostMessageDecoder messageCoder(&messageBody, this);
     375            if (!arguments.decode(CoreIPC::Out(messageName, messageCoder)))
     376                return;
     377
     378            didReceiveMessageFromInjectedBundle(messageName, messageBody);
     379
     380            messageBody->deref();
     381
     382            return;
     383        }
     384    }
     385
     386    ASSERT_NOT_REACHED();
     387}
     388
    295389} // namespace WebKit
  • trunk/WebKit2/UIProcess/WebContext.h

    r64386 r64396  
    8484
    8585    // InjectedBundle client
    86     void didReceiveMessageFromInjectedBundle(const WebCore::String&);
     86    void didReceiveMessageFromInjectedBundle(const WebCore::String&, APIObject*);
    8787
    8888    // History client
     
    100100   
    101101    void registerURLSchemeAsEmptyDocument(const WebCore::String&);
     102
     103    void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder&);
    102104
    103105private:
  • trunk/WebKit2/UIProcess/WebContextInjectedBundleClient.cpp

    r64317 r64396  
    4646}
    4747
    48 void WebContextInjectedBundleClient::didReceiveMessageFromInjectedBundle(WebContext* context, const String& message)
     48void WebContextInjectedBundleClient::didReceiveMessageFromInjectedBundle(WebContext* context, const String& messageName, APIObject* messageBody)
    4949{
    5050    if (!m_client.didReceiveMessageFromInjectedBundle)
    5151        return;
    5252
    53     m_client.didReceiveMessageFromInjectedBundle(toRef(context), toRef(message.impl()), m_client.clientInfo);
     53    m_client.didReceiveMessageFromInjectedBundle(toRef(context), toRef(messageName.impl()), toRef(messageBody), m_client.clientInfo);
    5454}
    5555
  • trunk/WebKit2/UIProcess/WebContextInjectedBundleClient.h

    r64317 r64396  
    3535namespace WebKit {
    3636
     37class APIObject;
    3738class WebContext;
    3839
     
    4243    void initialize(const WKContextInjectedBundleClient*);
    4344
    44     void didReceiveMessageFromInjectedBundle(WebContext*, const WebCore::String&);
     45    void didReceiveMessageFromInjectedBundle(WebContext*, const WebCore::String&, APIObject*);
    4546
    4647private:
  • trunk/WebKit2/UIProcess/WebProcessProxy.cpp

    r64247 r64396  
    184184}
    185185
    186 void WebProcessProxy::forwardMessageToWebContext(const String& message)
    187 {
    188     m_context->didReceiveMessageFromInjectedBundle(message);
    189 }
    190 
    191186void WebProcessProxy::getPlugins(bool refresh, Vector<PluginInfo>& plugins)
    192187{
     
    226221    if (messageID.is<CoreIPC::MessageClassWebProcessProxy>()) {
    227222        switch (messageID.get<WebProcessProxyMessage::Kind>()) {
    228             case WebProcessProxyMessage::PostMessage: {
    229                 String message;
    230                 if (!arguments->decode(CoreIPC::Out(message)))
    231                     return;
    232 
    233                 forwardMessageToWebContext(message);
    234                 return;
    235             }
    236223            case WebProcessProxyMessage::AddBackForwardItem: {
    237224                uint64_t itemID;
     
    317304    }
    318305
     306    if (messageID.is<CoreIPC::MessageClassWebContext>()) {
     307        m_context->didReceiveMessage(connection, messageID, *arguments);   
     308        return;
     309    }
     310
    319311    uint64_t pageID = arguments->destinationID();
    320312    if (!pageID)
     
    366358            case WebProcessProxyMessage::DidUpdateHistoryTitle:
    367359            case WebProcessProxyMessage::PopulateVisitedLinks:
    368             case WebProcessProxyMessage::PostMessage:
    369360            case WebProcessProxyMessage::AddBackForwardItem:
    370361                ASSERT_NOT_REACHED();
     
    372363        }
    373364    }
    374    
     365
    375366    uint64_t pageID = arguments->destinationID();
    376367    if (!pageID)
  • trunk/WebKit2/UIProcess/WebProcessProxy.h

    r63621 r64396  
    9797    bool sendMessage(CoreIPC::MessageID, PassOwnPtr<CoreIPC::ArgumentEncoder>);
    9898
    99     void forwardMessageToWebContext(const WebCore::String&);
    10099    void getPlugins(bool refresh, Vector<WebCore::PluginInfo>&);
    101100    void getPluginHostConnection(const WebCore::String& mimeType, const WebCore::KURL& url, WebCore::String& pluginPath);
  • trunk/WebKit2/WebKit2.xcodeproj/project.pbxproj

    r64380 r64396  
    233233                BCC57162115ADB42001CCAF9 /* NotImplemented.h in Headers */ = {isa = PBXBuildFile; fileRef = BCC57161115ADB42001CCAF9 /* NotImplemented.h */; };
    234234                BCC938E11180DE440085E5FE /* WKContextPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = BCC938E01180DE440085E5FE /* WKContextPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
     235                BCCB75C61203A1CE00222D1B /* WebContextMessageKinds.h in Headers */ = {isa = PBXBuildFile; fileRef = BCCB75C51203A1CE00222D1B /* WebContextMessageKinds.h */; };
    235236                BCD0042D110C1E27003B8A67 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCD0042C110C1E27003B8A67 /* CoreServices.framework */; };
    236237                BCD0139B110FA420003B8A67 /* WKFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = BCD01397110FA420003B8A67 /* WKFrame.h */; settings = {ATTRIBUTES = (Public, ); }; };
     
    530531                BCC57161115ADB42001CCAF9 /* NotImplemented.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NotImplemented.h; sourceTree = "<group>"; };
    531532                BCC938E01180DE440085E5FE /* WKContextPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContextPrivate.h; sourceTree = "<group>"; };
     533                BCCB75C51203A1CE00222D1B /* WebContextMessageKinds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebContextMessageKinds.h; sourceTree = "<group>"; };
    532534                BCD0042C110C1E27003B8A67 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
    533535                BCD01397110FA420003B8A67 /* WKFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKFrame.h; sourceTree = "<group>"; };
     
    10441046                                BC9E969911457EDE00870E71 /* DrawingAreaProxyMessageKinds.h */,
    10451047                                BCB28CBF120233D9007D99BC /* InjectedBundleMessageKinds.h */,
     1048                                BCCB75C51203A1CE00222D1B /* WebContextMessageKinds.h */,
    10461049                                BC111B60112F638300337BAB /* WebPageMessageKinds.h */,
    10471050                                BC111B61112F638300337BAB /* WebPageProxyMessageKinds.h */,
     
    13221325                                BCDB86C11200FB97007254BE /* WebURL.h in Headers */,
    13231326                                BCB28CC0120233D9007D99BC /* InjectedBundleMessageKinds.h in Headers */,
     1327                                BCCB75C61203A1CE00222D1B /* WebContextMessageKinds.h in Headers */,
    13241328                        );
    13251329                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp

    r64386 r64396  
    4444}
    4545
    46 void WKBundlePostMessage(WKBundleRef bundleRef, WKStringRef messageRef)
     46void WKBundlePostMessage(WKBundleRef bundleRef, WKStringRef messageNameRef, WKTypeRef messageBodyRef)
    4747{
    48     toWK(bundleRef)->postMessage(toWK(messageRef)->string());
     48    toWK(bundleRef)->postMessage(toWK(messageNameRef)->string(), toWK(messageBodyRef));
    4949}
    5050
  • trunk/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.h

    r64380 r64396  
    5252WK_EXPORT void WKBundleSetClient(WKBundleRef bundle, WKBundleClient * client);
    5353
    54 WK_EXPORT void WKBundlePostMessage(WKBundleRef bundle, WKStringRef message);
     54WK_EXPORT void WKBundlePostMessage(WKBundleRef bundle, WKStringRef messageName, WKTypeRef messageBody);
    5555
    5656#ifdef __cplusplus
  • trunk/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp

    r64380 r64396  
    2828#include "Arguments.h"
    2929#include "ImmutableArray.h"
     30#include "WebContextMessageKinds.h"
    3031#include "InjectedBundleMessageKinds.h"
    3132#include "WKAPICast.h"
     
    3435#include "WebPage.h"
    3536#include "WebProcess.h"
    36 #include "WebProcessProxyMessageKinds.h"
    3737#include <WebCore/PageGroup.h>
    3838#include <wtf/OwnArrayPtr.h>
     
    4242namespace WebKit {
    4343
    44 InjectedBundle::InjectedBundle(const WebCore::String& path)
     44namespace {
     45
     46// FIXME: We should try to abstract out the shared logic from these and
     47// and the PostMessageEncoder/PostMessageDecoders in WebContext.cpp into
     48// a shared baseclass.
     49
     50// Encodes postMessage messages from the InjectedBundle -> UIProcess
     51
     52//   - Array -> Array
     53//   - String -> String
     54//   - BundlePage -> Page
     55
     56class PostMessageEncoder {
     57public:
     58    PostMessageEncoder(APIObject* root)
     59        : m_root(root)
     60    {
     61    }
     62
     63    void encode(CoreIPC::ArgumentEncoder& encoder) const
     64    {
     65        APIObject::Type type = m_root->type();
     66        encoder.encode(static_cast<uint32_t>(type));
     67        switch (type) {
     68        case APIObject::TypeArray: {
     69            ImmutableArray* array = static_cast<ImmutableArray*>(m_root);
     70            encoder.encode(static_cast<uint64_t>(array->size()));
     71            for (size_t i = 0; i < array->size(); ++i)
     72                encoder.encode(PostMessageEncoder(array->at(i)));
     73            break;
     74        }
     75        case APIObject::TypeString: {
     76            WebString* string = static_cast<WebString*>(m_root);
     77            encoder.encode(string->string());
     78            break;
     79        }
     80        case APIObject::TypeBundlePage: {
     81            WebPage* page = static_cast<WebPage*>(m_root);
     82            encoder.encode(page->pageID());
     83            break;
     84        }
     85        default:
     86            ASSERT_NOT_REACHED();
     87            break;
     88        }
     89    }
     90
     91private:
     92    APIObject* m_root;
     93};
     94
     95
     96// Decodes postMessage messages going from the UIProcess -> InjectedBundle
     97
     98//   - Array -> Array
     99//   - String -> String
     100//   - Page -> BundlePage
     101
     102class PostMessageDecoder {
     103public:
     104    PostMessageDecoder(APIObject** root)
     105        : m_root(root)
     106    {
     107    }
     108
     109    static bool decode(CoreIPC::ArgumentDecoder& decoder, PostMessageDecoder& coder)
     110    {
     111        uint32_t type;
     112        if (!decoder.decode(type))
     113            return false;
     114
     115        switch (type) {
     116        case APIObject::TypeArray: {
     117            uint64_t size;
     118            if (!decoder.decode(size))
     119                return false;
     120           
     121            OwnArrayPtr<APIObject*> array;
     122            array.set(new APIObject*[size]);
     123           
     124            for (size_t i = 0; i < size; ++i) {
     125                APIObject* element;
     126                PostMessageDecoder messageCoder(&element);
     127                if (!decoder.decode(messageCoder))
     128                    return false;
     129                array[i] = element;
     130            }
     131
     132            *(coder.m_root) = ImmutableArray::create(array.release(), size).leakRef();
     133            break;
     134        }
     135        case APIObject::TypeString: {
     136            String string;
     137            if (!decoder.decode(string))
     138                return false;
     139            *(coder.m_root) = WebString::create(string).leakRef();
     140            break;
     141        }
     142        case APIObject::TypePage: {
     143            uint64_t pageID;
     144            if (!decoder.decode(pageID))
     145                return false;
     146            *(coder.m_root) = WebProcess::shared().webPage(pageID);
     147            break;
     148        }
     149        default:
     150            return false;
     151        }
     152
     153        return true;
     154    }
     155
     156private:
     157    APIObject** m_root;
     158};
     159
     160}
     161
     162InjectedBundle::InjectedBundle(const String& path)
    45163    : m_path(path)
    46164    , m_platformBundle(0)
     
    61179}
    62180
    63 void InjectedBundle::postMessage(const String& message)
    64 {
    65     WebProcess::shared().connection()->send(WebProcessProxyMessage::PostMessage, 0, CoreIPC::In(message));
     181void InjectedBundle::postMessage(const String& messageName, APIObject* messageBody)
     182{
     183    WebProcess::shared().connection()->send(WebContextMessage::PostMessage, 0, CoreIPC::In(messageName, PostMessageEncoder(messageBody)));
    66184}
    67185
     
    88206}
    89207
    90 void InjectedBundle::didReceiveMessage(const WebCore::String& messageName, APIObject* messageBody)
     208void InjectedBundle::didReceiveMessage(const String& messageName, APIObject* messageBody)
    91209{
    92210    if (m_client.didReceiveMessage)
    93211        m_client.didReceiveMessage(toRef(this), toRef(messageName.impl()), toRef(messageBody), m_client.clientInfo);
    94 }
    95 
    96 namespace {
    97 
    98 // Decodes postMessage messages going from the UIProcess -> InjectedBundle
    99 
    100 //   - Array -> Array
    101 //   - String -> String
    102 //   - Page -> BundlePage
    103 
    104 class PostMessageDecoder {
    105 public:
    106     PostMessageDecoder(APIObject** root)
    107         : m_root(root)
    108     {
    109     }
    110 
    111     static bool decode(CoreIPC::ArgumentDecoder& decoder, PostMessageDecoder& coder)
    112     {
    113         uint32_t type;
    114         if (!decoder.decode(type))
    115             return false;
    116 
    117         switch (type) {
    118             case APIObject::TypeArray: {
    119                 uint64_t size;
    120                 if (!decoder.decode(size))
    121                     return false;
    122                
    123                 OwnArrayPtr<APIObject*> array;
    124                 array.set(new APIObject*[size]);
    125                
    126                 for (size_t i = 0; i < size; ++i) {
    127                     APIObject* element;
    128                     PostMessageDecoder messageCoder(&element);
    129                     if (!decoder.decode(messageCoder))
    130                         return false;
    131                     array[i] = element;
    132                 }
    133 
    134                 *(coder.m_root) = ImmutableArray::create(array.release(), size).leakRef();
    135                 break;
    136             }
    137             case APIObject::TypeString: {
    138                 String string;
    139                 if (!decoder.decode(string))
    140                     return false;
    141                 *(coder.m_root) = WebString::create(string).leakRef();
    142                 break;
    143             }
    144             case APIObject::TypePage: {
    145                 uint64_t pageID;
    146                 if (!decoder.decode(pageID))
    147                     return false;
    148                 *(coder.m_root) = WebProcess::shared().webPage(pageID);
    149                 break;
    150             }
    151             default:
    152                 return false;
    153         }
    154 
    155         return true;
    156     }
    157 
    158 private:
    159     APIObject** m_root;
    160 };
    161 
    162212}
    163213
  • trunk/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h

    r64386 r64396  
    6868    // API
    6969    void initializeClient(WKBundleClient*);
    70     void postMessage(const WebCore::String&);
     70    void postMessage(const WebCore::String&, APIObject*);
    7171    void setShouldTrackVisitedLinks(bool);
    7272    void removeAllVisitedLinks();
  • trunk/WebKitTools/ChangeLog

    r64382 r64396  
     12010-07-30  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Maciej Stachowiak.
     4
     5        Patch for https://bugs.webkit.org/show_bug.cgi?id=43290
     6        Add structured message passing from the injected bundle to UIProcess
     7
     8        * MiniBrowser/mac/AppDelegate.m:
     9        (didRecieveMessageFromInjectedBundle):
     10        * MiniBrowser/mac/WebBundle/WebBundleMain.m:
     11        (didClearWindowForFrame):
     12        (didRecieveMessage):
     13        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
     14        (WTR::InjectedBundle::done):
     15        (WTR::InjectedBundle::didReceiveMessage):
     16        * WebKitTestRunner/TestController.cpp:
     17        (WTR::TestController::initialize):
     18        (WTR::TestController::didReceiveMessageFromInjectedBundle):
     19        * WebKitTestRunner/TestController.h:
     20        * WebKitTestRunner/TestInvocation.cpp:
     21        (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
     22        * WebKitTestRunner/TestInvocation.h:
     23        * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
     24
    1252010-07-30  Sam Weinig  <sam@webkit.org>
    226
  • trunk/WebKitTools/MiniBrowser/mac/AppDelegate.m

    r64380 r64396  
    3737@implementation BrowserAppDelegate
    3838
    39 void didRecieveMessageFromInjectedBundle(WKContextRef context, WKStringRef message, const void *clientInfo)
    40 {
    41     CFStringRef cfMessage = WKStringCopyCFString(0, message);
    42     LOG(@"ContextInjectedBundleClient - didRecieveMessage - message: %@", cfMessage);
    43     CFRelease(cfMessage);
     39void didRecieveMessageFromInjectedBundle(WKContextRef context, WKStringRef messageName, WKTypeRef messageBody, const void *clientInfo)
     40{
     41    CFStringRef cfMessageName = WKStringCopyCFString(0, messageName);
     42
     43    WKTypeID typeID = WKGetTypeID(messageBody);
     44    if (typeID == WKStringGetTypeID()) {
     45        CFStringRef cfMessageBody = WKStringCopyCFString(0, (WKStringRef)messageBody);
     46        LOG(@"ContextInjectedBundleClient - didRecieveMessage - MessageName: %@ MessageBody %@", cfMessageName, cfMessageBody);
     47        CFRelease(cfMessageBody);
     48    } else {
     49        LOG(@"ContextInjectedBundleClient - didRecieveMessage - MessageName: %@ (MessageBody Unhandeled)\n", cfMessageName);
     50    }
     51   
     52    CFRelease(cfMessageName);
    4453
    4554    WKStringRef newMessageName = WKStringCreateWithCFString(CFSTR("Response"));
    4655    WKStringRef newMessageBody = WKStringCreateWithCFString(CFSTR("Roger that!"));
    4756
    48     LOG(@"my info: %d", (int)WKGetTypeID(newMessageBody));
    49 
    5057    WKContextPostMessageToInjectedBundle(context, newMessageName, newMessageBody);
    5158   
    5259    WKStringRelease(newMessageName);
     60    WKStringRelease(newMessageBody);
    5361}
    5462
  • trunk/WebKitTools/MiniBrowser/mac/WebBundle/WebBundleMain.m

    r64380 r64396  
    7575    CFRelease(cfURL);
    7676
    77     WKStringRef message = WKStringCreateWithCFString(CFSTR("Window was cleared"));
    78     WKBundlePostMessage(globalBundle, message);
    79     WKStringRelease(message);
     77    WKStringRef messageName = WKStringCreateWithCFString(CFSTR("Callback"));
     78    WKStringRef messageBody = WKStringCreateWithCFString(CFSTR("Window was cleared"));
     79    WKBundlePostMessage(globalBundle, messageName, messageBody);
     80    WKStringRelease(messageName);
     81    WKStringRelease(messageBody);
    8082}
    8183
     
    114116    if (typeID == WKStringGetTypeID()) {
    115117        CFStringRef cfMessageBody = WKStringCopyCFString(0, (WKStringRef)messageBody);
    116         LOG(@"WKBundleClient - didRecieveMessage %@ (Type=String) %@\n", cfMessageName, cfMessageBody);
     118        LOG(@"WKBundleClient - didRecieveMessage - MessageName: %@ MessageBody %@", cfMessageName, cfMessageBody);
    117119        CFRelease(cfMessageBody);
    118120    } else {
    119         LOG(@"WKBundleClient - didRecieveMessage %@ (Type=Unhandeled)\n", cfMessageName);
     121        LOG(@"WKBundleClient - didRecieveMessage - MessageName: %@ (MessageBody Unhandeled)\n", cfMessageName);
    120122    }
    121    
     123
    122124    CFRelease(cfMessageName);
    123125}
  • trunk/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp

    r64380 r64396  
    8282void InjectedBundle::done()
    8383{
     84    WKRetainPtr<WKStringRef> doneMessageName(AdoptWK, WKStringCreateWithCFString(CFSTR("Done")));
     85
    8486    std::string output = m_outputStream.str();
    8587    RetainPtr<CFStringRef> outputCFString(AdoptCF, CFStringCreateWithCString(0, output.c_str(), kCFStringEncodingUTF8));
    86     WKRetainPtr<WKStringRef> doneMessage(AdoptWK, WKStringCreateWithCFString(outputCFString.get()));
    87     WKBundlePostMessage(m_bundle, doneMessage.get());
     88    WKRetainPtr<WKStringRef> doneMessageBody(AdoptWK, WKStringCreateWithCFString(outputCFString.get()));
     89
     90    WKBundlePostMessage(m_bundle, doneMessageName.get(), doneMessageBody.get());
    8891}
    8992
     
    104107    CFStringRef cfMessage = WKStringCopyCFString(0, messageName);
    105108    if (CFEqual(cfMessage, CFSTR("BeginTest"))) {
    106         WKRetainPtr<WKStringRef> ackMessage(AdoptWK, WKStringCreateWithCFString(CFSTR("BeginTestAck")));
    107         WKBundlePostMessage(m_bundle, ackMessage.get());
     109        WKRetainPtr<WKStringRef> ackMessageName(AdoptWK, WKStringCreateWithCFString(CFSTR("Ack")));
     110        WKRetainPtr<WKStringRef> ackMessageBody(AdoptWK, WKStringCreateWithCFString(CFSTR("BeginTest")));
     111        WKBundlePostMessage(m_bundle, ackMessageName.get(), ackMessageBody.get());
    108112
    109113        reset();
     
    111115    }
    112116
    113     WKRetainPtr<WKStringRef> errorMessage(AdoptWK, WKStringCreateWithCFString(CFSTR("Error: Unknown.")));
    114     WKBundlePostMessage(m_bundle, errorMessage.get());
     117    WKRetainPtr<WKStringRef> errorMessageName(AdoptWK, WKStringCreateWithCFString(CFSTR("Error")));
     118    WKRetainPtr<WKStringRef> errorMessageBody(AdoptWK, WKStringCreateWithCFString(CFSTR("Unknown")));
     119    WKBundlePostMessage(m_bundle, errorMessageName.get(), errorMessageBody.get());
    115120}
    116121
  • trunk/WebKitTools/WebKitTestRunner/TestController.cpp

    r64287 r64396  
    8383        0,
    8484        this,
    85         _didReceiveMessageFromInjectedBundle
     85        didReceiveMessageFromInjectedBundle
    8686    };
    8787    WKContextSetInjectedBundleClient(m_context.get(), &injectedBundlePathClient);
     
    127127}
    128128
    129 void TestController::_didReceiveMessageFromInjectedBundle(WKContextRef context, WKStringRef message, const void *clientInfo)
     129void TestController::didReceiveMessageFromInjectedBundle(WKContextRef context, WKStringRef messageName, WKTypeRef messageBody, const void *clientInfo)
    130130{
    131     static_cast<TestController*>(const_cast<void*>(clientInfo))->didReceiveMessageFromInjectedBundle(message);
     131    static_cast<TestController*>(const_cast<void*>(clientInfo))->didReceiveMessageFromInjectedBundle(messageName, messageBody);
    132132}
    133133
    134 void TestController::didReceiveMessageFromInjectedBundle(WKStringRef message)
     134void TestController::didReceiveMessageFromInjectedBundle(WKStringRef messageName, WKTypeRef messageBody)
    135135{
    136     m_currentInvocation->didReceiveMessageFromInjectedBundle(message);
     136    m_currentInvocation->didReceiveMessageFromInjectedBundle(messageName, messageBody);
    137137}
    138138
  • trunk/WebKitTools/WebKitTestRunner/TestController.h

    r64286 r64396  
    6868
    6969    // WKContextInjectedBundleClient
    70     static void _didReceiveMessageFromInjectedBundle(WKContextRef context, WKStringRef message, const void*);
    71     void didReceiveMessageFromInjectedBundle(WKStringRef message);
     70    static void didReceiveMessageFromInjectedBundle(WKContextRef context, WKStringRef messageName, WKTypeRef messageBody, const void*);
     71    void didReceiveMessageFromInjectedBundle(WKStringRef messageName, WKTypeRef messageBody);
    7272
    7373    OwnPtr<TestInvocation> m_currentInvocation;
  • trunk/WebKitTools/WebKitTestRunner/TestInvocation.cpp

    r64380 r64396  
    141141}
    142142
    143 void TestInvocation::didReceiveMessageFromInjectedBundle(WKStringRef message)
     143void TestInvocation::didReceiveMessageFromInjectedBundle(WKStringRef messageName, WKTypeRef messageBody)
    144144{
    145     RetainPtr<CFStringRef> cfMessage(AdoptCF, WKStringCopyCFString(0, message));
    146    
    147     if (CFEqual(cfMessage.get(), CFSTR("Error"))) {
     145    RetainPtr<CFStringRef> cfMessageName(AdoptCF, WKStringCopyCFString(0, messageName));
     146    if (CFEqual(cfMessageName.get(), CFSTR("Error"))) {
    148147        // Set all states to true to stop spinning the runloop.
    149148        m_gotInitialResponse = true;
     
    153152    }
    154153
    155     if (CFEqual(cfMessage.get(), CFSTR("BeginTestAck"))) {
    156         m_gotInitialResponse = true;
     154    if (CFEqual(cfMessageName.get(), CFSTR("Ack"))) {
     155        ASSERT(WKGetTypeID(messageBody) == WKStringGetTypeID());
     156        RetainPtr<CFStringRef> cfMessageBody(AdoptCF, WKStringCopyCFString(0, static_cast<WKStringRef>(messageBody)));
     157
     158        if (CFEqual(cfMessageBody.get(), CFSTR("BeginTest"))) {
     159            m_gotInitialResponse = true;
     160            return;
     161        }
     162
     163        ASSERT_NOT_REACHED();
     164    }
     165
     166    if (CFEqual(cfMessageName.get(), CFSTR("Done"))) {
     167        ASSERT(WKGetTypeID(messageBody) == WKStringGetTypeID());
     168        OwnPtr<Vector<char> > utf8Message = WKStringToUTF8(static_cast<WKStringRef>(messageBody));
     169        dump(utf8Message->data());
     170        m_gotFinalMessage = true;
    157171        return;
    158172    }
    159173
    160     OwnPtr<Vector<char> > utf8Message = WKStringToUTF8(message);
    161 
    162     dump(utf8Message->data());
    163     m_gotFinalMessage = true;
     174    ASSERT_NOT_REACHED();
    164175}
    165176
  • trunk/WebKitTools/WebKitTestRunner/TestInvocation.h

    r64029 r64396  
    3838
    3939    void invoke();
    40     void didReceiveMessageFromInjectedBundle(WKStringRef message);
     40    void didReceiveMessageFromInjectedBundle(WKStringRef messageName, WKTypeRef messageBody);
    4141
    4242private:
  • trunk/WebKitTools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj

    r64380 r64396  
    109109                BC952ED311F3C318003398B4 /* CodeGeneratorTestRunner.pm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; path = CodeGeneratorTestRunner.pm; sourceTree = "<group>"; };
    110110                BC952F1D11F3C652003398B4 /* JSLayoutTestController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSLayoutTestController.cpp; path = DerivedSources/WebKitTestRunner/JSLayoutTestController.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
    111                 BC952F1E11F3C652003398B4 /* JSLayoutTestController.h */ = {isa = PBXFileReference; fileEncoding = 4; name = JSLayoutTestController.h; path = DerivedSources/WebKitTestRunner/JSLayoutTestController.h; sourceTree = BUILT_PRODUCTS_DIR; };
     111                BC952F1E11F3C652003398B4 /* JSLayoutTestController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSLayoutTestController.h; path = DerivedSources/WebKitTestRunner/JSLayoutTestController.h; sourceTree = BUILT_PRODUCTS_DIR; };
    112112                BCC997A011D3C8F60017BCA2 /* InjectedBundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundle.cpp; sourceTree = "<group>"; };
    113113                BCC997A111D3C8F60017BCA2 /* InjectedBundle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundle.h; sourceTree = "<group>"; };
Note: See TracChangeset for help on using the changeset viewer.