Changeset 122500 in webkit


Ignore:
Timestamp:
Jul 12, 2012 1:44:45 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[WK2] Add missing Network Information API integration to WebContext and WebPage
https://bugs.webkit.org/show_bug.cgi?id=90781

Patch by Christophe Dumez <Christophe Dumez> on 2012-07-12
Reviewed by Anders Carlsson.

Integrate Network Information API to WebPage, WebContext and
properly route messages to the WebNetworkInfoManagerProxy.
Without this, the Network Information tests are crashing for
WebKit2.

  • UIProcess/WebContext.cpp:

(WebKit::WebContext::WebContext):
(WebKit::WebContext::~WebContext):
(WebKit::WebContext::disconnectProcess):
(WebKit::WebContext::didReceiveMessage):
(WebKit::WebContext::didReceiveSyncMessage):

  • UIProcess/WebContext.h:

(WebKit):
(WebContext):
(WebKit::WebContext::networkInfoManagerProxy):

  • UIProcess/WebNetworkInfoManagerProxy.cpp:

(WebKit::WebNetworkInfoManagerProxy::didReceiveSyncMessage):
(WebKit):

  • UIProcess/WebNetworkInfoManagerProxy.h:

(WebNetworkInfoManagerProxy):

  • UIProcess/WebProcessProxy.cpp:

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

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::WebPage):

Location:
trunk/Source/WebKit2
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r122484 r122500  
     12012-07-12  Christophe Dumez  <christophe.dumez@intel.com>
     2
     3        [WK2] Add missing Network Information API integration to WebContext and WebPage
     4        https://bugs.webkit.org/show_bug.cgi?id=90781
     5
     6        Reviewed by Anders Carlsson.
     7
     8        Integrate Network Information API to WebPage, WebContext and
     9        properly route messages to the WebNetworkInfoManagerProxy.
     10        Without this, the Network Information tests are crashing for
     11        WebKit2.
     12
     13        * UIProcess/WebContext.cpp:
     14        (WebKit::WebContext::WebContext):
     15        (WebKit::WebContext::~WebContext):
     16        (WebKit::WebContext::disconnectProcess):
     17        (WebKit::WebContext::didReceiveMessage):
     18        (WebKit::WebContext::didReceiveSyncMessage):
     19        * UIProcess/WebContext.h:
     20        (WebKit):
     21        (WebContext):
     22        (WebKit::WebContext::networkInfoManagerProxy):
     23        * UIProcess/WebNetworkInfoManagerProxy.cpp:
     24        (WebKit::WebNetworkInfoManagerProxy::didReceiveSyncMessage):
     25        (WebKit):
     26        * UIProcess/WebNetworkInfoManagerProxy.h:
     27        (WebNetworkInfoManagerProxy):
     28        * UIProcess/WebProcessProxy.cpp:
     29        (WebKit::WebProcessProxy::didReceiveMessage):
     30        (WebKit::WebProcessProxy::didReceiveSyncMessage):
     31        * WebProcess/WebPage/WebPage.cpp:
     32        (WebKit::WebPage::WebPage):
     33
    1342012-07-12  No'am Rosenthal  <noam.rosenthal@nokia.com>
    235
  • trunk/Source/WebKit2/UIProcess/WebContext.cpp

    r122153 r122500  
    7171#endif
    7272
     73#if ENABLE(NETWORK_INFO)
     74#include "WebNetworkInfoManagerProxy.h"
     75#endif
     76
    7377#if USE(SOUP)
    7478#include "WebSoupRequestManagerProxy.h"
     
    144148    , m_keyValueStorageManagerProxy(WebKeyValueStorageManagerProxy::create(this))
    145149    , m_mediaCacheManagerProxy(WebMediaCacheManagerProxy::create(this))
     150#if ENABLE(NETWORK_INFO)
     151    , m_networkInfoManagerProxy(WebNetworkInfoManagerProxy::create(this))
     152#endif
    146153    , m_notificationManagerProxy(WebNotificationManagerProxy::create(this))
    147154    , m_pluginSiteDataManager(WebPluginSiteDataManager::create(this))
     
    211218    m_mediaCacheManagerProxy->invalidate();
    212219    m_mediaCacheManagerProxy->clearContext();
     220
     221#if ENABLE(NETWORK_INFO)
     222    m_networkInfoManagerProxy->invalidate();
     223    m_networkInfoManagerProxy->clearContext();
     224#endif
    213225   
    214226    m_notificationManagerProxy->invalidate();
     
    419431    m_keyValueStorageManagerProxy->invalidate();
    420432    m_mediaCacheManagerProxy->invalidate();
     433#if ENABLE(NETWORK_INFO)
     434    m_networkInfoManagerProxy->invalidate();
     435#endif
    421436    m_notificationManagerProxy->invalidate();
    422437    m_resourceCacheManagerProxy->invalidate();
     
    783798        return;
    784799    }
     800
     801#if ENABLE(NETWORK_INFO)
     802    if (messageID.is<CoreIPC::MessageClassWebNetworkInfoManagerProxy>()) {
     803        m_networkInfoManagerProxy->didReceiveMessage(connection, messageID, arguments);
     804        return;
     805    }
     806#endif
    785807   
    786808    if (messageID.is<CoreIPC::MessageClassWebNotificationManagerProxy>()) {
     
    836858        return;
    837859    }
     860
     861#if ENABLE(NETWORK_INFO)
     862    if (messageID.is<CoreIPC::MessageClassWebNetworkInfoManagerProxy>()) {
     863        m_networkInfoManagerProxy->didReceiveSyncMessage(connection, messageID, arguments, reply);
     864        return;
     865    }
     866#endif
    838867   
    839868    switch (messageID.get<WebContextLegacyMessage::Kind>()) {
  • trunk/Source/WebKit2/UIProcess/WebContext.h

    r122153 r122500  
    5858class WebKeyValueStorageManagerProxy;
    5959class WebMediaCacheManagerProxy;
     60#if ENABLE(NETWORK_INFO)
     61class WebNetworkInfoManagerProxy;
     62#endif
    6063class WebNotificationManagerProxy;
    6164class WebPageGroup;
     
    167170    WebKeyValueStorageManagerProxy* keyValueStorageManagerProxy() const { return m_keyValueStorageManagerProxy.get(); }
    168171    WebMediaCacheManagerProxy* mediaCacheManagerProxy() const { return m_mediaCacheManagerProxy.get(); }
     172#if ENABLE(NETWORK_INFO)
     173    WebNetworkInfoManagerProxy* networkInfoManagerProxy() const { return m_networkInfoManagerProxy.get(); }
     174#endif
    169175    WebNotificationManagerProxy* notificationManagerProxy() const { return m_notificationManagerProxy.get(); }
    170176    WebPluginSiteDataManager* pluginSiteDataManager() const { return m_pluginSiteDataManager.get(); }
     
    315321    RefPtr<WebKeyValueStorageManagerProxy> m_keyValueStorageManagerProxy;
    316322    RefPtr<WebMediaCacheManagerProxy> m_mediaCacheManagerProxy;
     323#if ENABLE(NETWORK_INFO)
     324    RefPtr<WebNetworkInfoManagerProxy> m_networkInfoManagerProxy;
     325#endif
    317326    RefPtr<WebNotificationManagerProxy> m_notificationManagerProxy;
    318327    RefPtr<WebPluginSiteDataManager> m_pluginSiteDataManager;
  • trunk/Source/WebKit2/UIProcess/WebNetworkInfoManagerProxy.cpp

    r121989 r122500  
    7373}
    7474
     75void WebNetworkInfoManagerProxy::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, WTF::OwnPtr<CoreIPC::ArgumentEncoder>& reply)
     76{
     77    didReceiveSyncWebNetworkInfoManagerProxyMessage(connection, messageID, arguments, reply);
     78}
     79
    7580void WebNetworkInfoManagerProxy::startUpdating()
    7681{
  • trunk/Source/WebKit2/UIProcess/WebNetworkInfoManagerProxy.h

    r121989 r122500  
    6060
    6161    void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
     62    void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, WTF::OwnPtr<CoreIPC::ArgumentEncoder>&);
    6263
    6364private:
  • trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp

    r122153 r122500  
    317317        || messageID.is<CoreIPC::MessageClassWebKeyValueStorageManagerProxy>()
    318318        || messageID.is<CoreIPC::MessageClassWebMediaCacheManagerProxy>()
     319#if ENABLE(NETWORK_INFO)
     320        || messageID.is<CoreIPC::MessageClassWebNetworkInfoManagerProxy>()
     321#endif
    319322        || messageID.is<CoreIPC::MessageClassWebNotificationManagerProxy>()
    320323#if USE(SOUP)
     
    344347    }
    345348
    346     if (messageID.is<CoreIPC::MessageClassWebContext>() || messageID.is<CoreIPC::MessageClassWebContextLegacy>()
     349    if (messageID.is<CoreIPC::MessageClassWebContext>() || messageID.is<CoreIPC::MessageClassWebContextLegacy>()
     350#if ENABLE(NETWORK_INFO)
     351        || messageID.is<CoreIPC::MessageClassWebNetworkInfoManagerProxy>()
     352#endif
    347353        || messageID.is<CoreIPC::MessageClassDownloadProxy>() || messageID.is<CoreIPC::MessageClassWebIconDatabase>()) {
    348354        m_context->didReceiveSyncMessage(connection, messageID, arguments, reply);
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r122400 r122500  
    131131#endif
    132132
     133#if ENABLE(NETWORK_INFO)
     134#include "WebNetworkInfoClient.h"
     135#endif
     136
    133137#if ENABLE(WEB_INTENTS)
    134138#include "IntentData.h"
     
    276280    WebCore::provideDeviceMotionTo(m_page.get(), new DeviceMotionClientQt);
    277281    WebCore::provideDeviceOrientationTo(m_page.get(), new DeviceOrientationClientQt);
     282#endif
     283#if ENABLE(NETWORK_INFO)
     284    WebCore::provideNetworkInfoTo(m_page.get(), new WebNetworkInfoClient(this));
    278285#endif
    279286#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
Note: See TracChangeset for help on using the changeset viewer.