Changeset 239258 in webkit


Ignore:
Timestamp:
Dec 15, 2018 11:25:21 PM (5 years ago)
Author:
Chris Fleizach
Message:

[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
https://bugs.webkit.org/show_bug.cgi?id=192449
<rdar://problem/46595508>

Reviewed by Darin Adler.

Part 7: Files in UIProcess/API

  • UIProcess/API/APIContentRuleListStore.cpp:
  • UIProcess/API/APIHitTestResult.cpp:
  • UIProcess/API/APINavigation.cpp:
  • UIProcess/API/APIOpenPanelParameters.cpp:
  • UIProcess/API/APIPageConfiguration.cpp:
  • UIProcess/API/C/WKApplicationCacheManager.cpp:

(WKApplicationCacheManagerGetTypeID):
(WKApplicationCacheManagerGetApplicationCacheOrigins):
(WKApplicationCacheManagerDeleteEntriesForOrigin):
(WKApplicationCacheManagerDeleteAllEntries):

  • UIProcess/API/C/WKAuthenticationDecisionListener.cpp:

(WKAuthenticationDecisionListenerGetTypeID):
(WKAuthenticationDecisionListenerUseCredential):
(WKAuthenticationDecisionListenerCancel):
(WKAuthenticationDecisionListenerRejectProtectionSpaceAndContinue):

  • UIProcess/API/C/WKBackForwardListItemRef.cpp:

(WKBackForwardListItemGetTypeID):
(WKBackForwardListItemCopyURL):
(WKBackForwardListItemCopyTitle):
(WKBackForwardListItemCopyOriginalURL):

  • UIProcess/API/C/WKContext.cpp:

(WKContextGetTypeID):
(WKContextCreate):
(WKContextCreateWithInjectedBundlePath):
(WKContextCreateWithConfiguration):
(WKContextSetClient):
(WKContextSetInjectedBundleClient):
(WKContextSetHistoryClient):
(WKContextSetDownloadClient):
(WKContextSetConnectionClient):
(WKContextDownloadURLRequest):
(WKContextResumeDownload):
(WKContextSetInitializationUserDataForInjectedBundle):
(WKContextPostMessageToInjectedBundle):
(WKContextGetGlobalStatistics):
(WKContextAddVisitedLink):
(WKContextClearVisitedLinks):
(WKContextSetCacheModel):
(WKContextGetCacheModel):
(WKContextSetMaximumNumberOfProcesses):
(WKContextGetMaximumNumberOfProcesses):
(WKContextSetAlwaysUsesComplexTextCodePath):
(WKContextSetShouldUseFontSmoothing):
(WKContextSetAdditionalPluginsDirectory):
(WKContextRefreshPlugIns):
(WKContextRegisterURLSchemeAsEmptyDocument):
(WKContextRegisterURLSchemeAsSecure):
(WKContextRegisterURLSchemeAsBypassingContentSecurityPolicy):
(WKContextRegisterURLSchemeAsCachePartitioned):
(WKContextRegisterURLSchemeAsCanDisplayOnlyIfCanRequest):
(WKContextSetDomainRelaxationForbiddenForURLScheme):
(WKContextSetCanHandleHTTPSServerTrustEvaluation):
(WKContextSetPrewarmsProcessesAutomatically):
(WKContextSetCustomWebContentServiceBundleIdentifier):
(WKContextSetDiskCacheSpeculativeValidationEnabled):
(WKContextPreconnectToServer):
(WKContextGetCookieManager):
(WKContextGetWebsiteDataStore):
(WKContextGetGeolocationManager):
(WKContextGetMediaSessionFocusManager):
(WKContextGetNotificationManager):
(WKContextStartMemorySampler):
(WKContextStopMemorySampler):
(WKContextAllowSpecificHTTPSCertificateForHost):
(WKContextDisableProcessTermination):
(WKContextEnableProcessTermination):
(WKContextSetHTTPPipeliningEnabled):
(WKContextWarmInitialProcess):
(WKContextGetStatistics):
(WKContextGetStatisticsWithOptions):
(WKContextJavaScriptConfigurationFileEnabled):
(WKContextSetJavaScriptConfigurationFileEnabled):
(WKContextGarbageCollectJavaScriptObjects):
(WKContextSetJavaScriptGarbageCollectorTimerEnabled):
(WKContextUseTestingNetworkSession):
(WKContextSetAllowsAnySSLCertificateForWebSocketTesting):
(WKContextSetAllowsAnySSLCertificateForServiceWorkerTesting):
(WKContextClearCachedCredentials):
(WKContextCopyPlugInAutoStartOriginHashes):
(WKContextSetPlugInAutoStartOriginHashes):
(WKContextSetPlugInAutoStartOriginsFilteringOutEntriesAddedAfterTime):
(WKContextSetPlugInAutoStartOrigins):
(WKContextSetInvalidMessageFunction):
(WKContextSetMemoryCacheDisabled):
(WKContextSetFontWhitelist):
(WKContextTerminateNetworkProcess):
(WKContextTerminateServiceWorkerProcess):
(WKContextGetNetworkProcessIdentifier):
(WKContextAddSupportedPlugin):
(WKContextClearSupportedPlugins):
(WKContextSetIDBPerOriginQuota):

  • UIProcess/API/C/WKPage.cpp:

(WKPageLoadURLWithShouldOpenExternalURLsPolicy):
(WKPageLoadURLWithUserData):
(WKPageLoadURLRequestWithUserData):
(WKPageSetPaginationMode):
(WKPageGetPaginationMode):
(WKPageSetPageLoaderClient):
(WKPageSetPagePolicyClient):

  • UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
Location:
trunk/Source/WebKit
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r239255 r239258  
     12018-12-15  Chris Fleizach  <cfleizach@apple.com>
     2
     3        [meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
     4        https://bugs.webkit.org/show_bug.cgi?id=192449
     5        <rdar://problem/46595508>
     6
     7        Reviewed by Darin Adler.
     8
     9        Part 7: Files in UIProcess/API
     10
     11        * UIProcess/API/APIContentRuleListStore.cpp:
     12        * UIProcess/API/APIHitTestResult.cpp:
     13        * UIProcess/API/APINavigation.cpp:
     14        * UIProcess/API/APIOpenPanelParameters.cpp:
     15        * UIProcess/API/APIPageConfiguration.cpp:
     16        * UIProcess/API/C/WKApplicationCacheManager.cpp:
     17        (WKApplicationCacheManagerGetTypeID):
     18        (WKApplicationCacheManagerGetApplicationCacheOrigins):
     19        (WKApplicationCacheManagerDeleteEntriesForOrigin):
     20        (WKApplicationCacheManagerDeleteAllEntries):
     21        * UIProcess/API/C/WKAuthenticationDecisionListener.cpp:
     22        (WKAuthenticationDecisionListenerGetTypeID):
     23        (WKAuthenticationDecisionListenerUseCredential):
     24        (WKAuthenticationDecisionListenerCancel):
     25        (WKAuthenticationDecisionListenerRejectProtectionSpaceAndContinue):
     26        * UIProcess/API/C/WKBackForwardListItemRef.cpp:
     27        (WKBackForwardListItemGetTypeID):
     28        (WKBackForwardListItemCopyURL):
     29        (WKBackForwardListItemCopyTitle):
     30        (WKBackForwardListItemCopyOriginalURL):
     31        * UIProcess/API/C/WKContext.cpp:
     32        (WKContextGetTypeID):
     33        (WKContextCreate):
     34        (WKContextCreateWithInjectedBundlePath):
     35        (WKContextCreateWithConfiguration):
     36        (WKContextSetClient):
     37        (WKContextSetInjectedBundleClient):
     38        (WKContextSetHistoryClient):
     39        (WKContextSetDownloadClient):
     40        (WKContextSetConnectionClient):
     41        (WKContextDownloadURLRequest):
     42        (WKContextResumeDownload):
     43        (WKContextSetInitializationUserDataForInjectedBundle):
     44        (WKContextPostMessageToInjectedBundle):
     45        (WKContextGetGlobalStatistics):
     46        (WKContextAddVisitedLink):
     47        (WKContextClearVisitedLinks):
     48        (WKContextSetCacheModel):
     49        (WKContextGetCacheModel):
     50        (WKContextSetMaximumNumberOfProcesses):
     51        (WKContextGetMaximumNumberOfProcesses):
     52        (WKContextSetAlwaysUsesComplexTextCodePath):
     53        (WKContextSetShouldUseFontSmoothing):
     54        (WKContextSetAdditionalPluginsDirectory):
     55        (WKContextRefreshPlugIns):
     56        (WKContextRegisterURLSchemeAsEmptyDocument):
     57        (WKContextRegisterURLSchemeAsSecure):
     58        (WKContextRegisterURLSchemeAsBypassingContentSecurityPolicy):
     59        (WKContextRegisterURLSchemeAsCachePartitioned):
     60        (WKContextRegisterURLSchemeAsCanDisplayOnlyIfCanRequest):
     61        (WKContextSetDomainRelaxationForbiddenForURLScheme):
     62        (WKContextSetCanHandleHTTPSServerTrustEvaluation):
     63        (WKContextSetPrewarmsProcessesAutomatically):
     64        (WKContextSetCustomWebContentServiceBundleIdentifier):
     65        (WKContextSetDiskCacheSpeculativeValidationEnabled):
     66        (WKContextPreconnectToServer):
     67        (WKContextGetCookieManager):
     68        (WKContextGetWebsiteDataStore):
     69        (WKContextGetGeolocationManager):
     70        (WKContextGetMediaSessionFocusManager):
     71        (WKContextGetNotificationManager):
     72        (WKContextStartMemorySampler):
     73        (WKContextStopMemorySampler):
     74        (WKContextAllowSpecificHTTPSCertificateForHost):
     75        (WKContextDisableProcessTermination):
     76        (WKContextEnableProcessTermination):
     77        (WKContextSetHTTPPipeliningEnabled):
     78        (WKContextWarmInitialProcess):
     79        (WKContextGetStatistics):
     80        (WKContextGetStatisticsWithOptions):
     81        (WKContextJavaScriptConfigurationFileEnabled):
     82        (WKContextSetJavaScriptConfigurationFileEnabled):
     83        (WKContextGarbageCollectJavaScriptObjects):
     84        (WKContextSetJavaScriptGarbageCollectorTimerEnabled):
     85        (WKContextUseTestingNetworkSession):
     86        (WKContextSetAllowsAnySSLCertificateForWebSocketTesting):
     87        (WKContextSetAllowsAnySSLCertificateForServiceWorkerTesting):
     88        (WKContextClearCachedCredentials):
     89        (WKContextCopyPlugInAutoStartOriginHashes):
     90        (WKContextSetPlugInAutoStartOriginHashes):
     91        (WKContextSetPlugInAutoStartOriginsFilteringOutEntriesAddedAfterTime):
     92        (WKContextSetPlugInAutoStartOrigins):
     93        (WKContextSetInvalidMessageFunction):
     94        (WKContextSetMemoryCacheDisabled):
     95        (WKContextSetFontWhitelist):
     96        (WKContextTerminateNetworkProcess):
     97        (WKContextTerminateServiceWorkerProcess):
     98        (WKContextGetNetworkProcessIdentifier):
     99        (WKContextAddSupportedPlugin):
     100        (WKContextClearSupportedPlugins):
     101        (WKContextSetIDBPerOriginQuota):
     102        * UIProcess/API/C/WKPage.cpp:
     103        (WKPageLoadURLWithShouldOpenExternalURLsPolicy):
     104        (WKPageLoadURLWithUserData):
     105        (WKPageLoadURLRequestWithUserData):
     106        (WKPageSetPaginationMode):
     107        (WKPageGetPaginationMode):
     108        (WKPageSetPageLoaderClient):
     109        (WKPageSetPagePolicyClient):
     110        * UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
     111
    11122018-12-15  Darin Adler  <darin@apple.com>
    2113
  • trunk/Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb

    r239072 r239258  
    4141#include <WebCore/TextEncodingRegistry.h>
    4242
     43namespace WebKit {
    4344using namespace WebCore;
    44 
    45 namespace WebKit {
    4645
    4746WebPreferencesStore::ValueMap& WebPreferencesStore::defaults()
  • trunk/Source/WebKit/UIProcess/API/APIContentRuleListStore.cpp

    r239072 r239258  
    4646#include <wtf/persistence/PersistentEncoder.h>
    4747
     48
     49namespace API {
    4850using namespace WebKit::NetworkCache;
    4951using namespace WebCore::FileSystem;
    5052
    51 namespace API {
    52    
    5353ContentRuleListStore& ContentRuleListStore::legacyDefaultStore()
    5454{
  • trunk/Source/WebKit/UIProcess/API/APIHitTestResult.cpp

    r239072 r239258  
    2121#include "APIHitTestResult.h"
    2222
     23namespace API {
    2324using namespace WebCore;
    24 
    25 namespace API {
    2625
    2726Ref<HitTestResult> HitTestResult::create(const WebKit::WebHitTestResultData& hitTestResultData)
  • trunk/Source/WebKit/UIProcess/API/APINavigation.cpp

    r239072 r239258  
    3131#include <wtf/DebugUtilities.h>
    3232
     33namespace API {
    3334using namespace WebCore;
    3435using namespace WebKit;
    35 
    36 namespace API {
    3736
    3837Navigation::Navigation(WebNavigationState& state)
  • trunk/Source/WebKit/UIProcess/API/APIOpenPanelParameters.cpp

    r239072 r239258  
    3232#include <wtf/Vector.h>
    3333
     34namespace API {
    3435using namespace WebCore;
    35 
    36 namespace API {
    3736
    3837Ref<OpenPanelParameters> OpenPanelParameters::create(const FileChooserSettings& settings)
  • trunk/Source/WebKit/UIProcess/API/APIPageConfiguration.cpp

    r239072 r239258  
    3939#endif
    4040
     41namespace API {
    4142using namespace WebCore;
    4243using namespace WebKit;
    43 
    44 namespace API {
    4544
    4645Ref<PageConfiguration> PageConfiguration::create()
  • trunk/Source/WebKit/UIProcess/API/C/WKApplicationCacheManager.cpp

    r229979 r239258  
    3232#include "WebsiteDataRecord.h"
    3333
    34 using namespace WebKit;
    35 
    3634WKTypeID WKApplicationCacheManagerGetTypeID()
    3735{
    38     return toAPI(API::WebsiteDataStore::APIType);
     36    return WebKit::toAPI(API::WebsiteDataStore::APIType);
    3937}
    4038
    4139void WKApplicationCacheManagerGetApplicationCacheOrigins(WKApplicationCacheManagerRef applicationCacheManager, void* context, WKApplicationCacheManagerGetApplicationCacheOriginsFunction callback)
    4240{
    43     auto& websiteDataStore = toImpl(reinterpret_cast<WKWebsiteDataStoreRef>(applicationCacheManager))->websiteDataStore();
    44     websiteDataStore.fetchData(WebsiteDataType::OfflineWebApplicationCache, { }, [context, callback](auto dataRecords) {
     41    auto& websiteDataStore = WebKit::toImpl(reinterpret_cast<WKWebsiteDataStoreRef>(applicationCacheManager))->websiteDataStore();
     42    websiteDataStore.fetchData(WebKit::WebsiteDataType::OfflineWebApplicationCache, { }, [context, callback](auto dataRecords) {
    4543        Vector<RefPtr<API::Object>> securityOrigins;
    4644        for (const auto& dataRecord : dataRecords) {
     
    4947        }
    5048
    51         callback(toAPI(API::Array::create(WTFMove(securityOrigins)).ptr()), nullptr, context);
     49        callback(WebKit::toAPI(API::Array::create(WTFMove(securityOrigins)).ptr()), nullptr, context);
    5250    });
    5351}
     
    5553void WKApplicationCacheManagerDeleteEntriesForOrigin(WKApplicationCacheManagerRef applicationCacheManager, WKSecurityOriginRef origin)
    5654{
    57     auto& websiteDataStore = toImpl(reinterpret_cast<WKWebsiteDataStoreRef>(applicationCacheManager))->websiteDataStore();
     55    auto& websiteDataStore = WebKit::toImpl(reinterpret_cast<WKWebsiteDataStoreRef>(applicationCacheManager))->websiteDataStore();
    5856
    59     WebsiteDataRecord dataRecord;
    60     dataRecord.add(WebsiteDataType::OfflineWebApplicationCache, toImpl(origin)->securityOrigin().data());
     57    WebKit::WebsiteDataRecord dataRecord;
     58    dataRecord.add(WebKit::WebsiteDataType::OfflineWebApplicationCache, WebKit::toImpl(origin)->securityOrigin().data());
    6159
    62     websiteDataStore.removeData(WebsiteDataType::OfflineWebApplicationCache, { dataRecord }, [] { });
     60    websiteDataStore.removeData(WebKit::WebsiteDataType::OfflineWebApplicationCache, { dataRecord }, [] { });
    6361}
    6462
    6563void WKApplicationCacheManagerDeleteAllEntries(WKApplicationCacheManagerRef applicationCacheManager)
    6664{
    67     auto& websiteDataStore = toImpl(reinterpret_cast<WKWebsiteDataStoreRef>(applicationCacheManager))->websiteDataStore();
    68     websiteDataStore.removeData(WebsiteDataType::OfflineWebApplicationCache, -WallTime::infinity(), [] { });
     65    auto& websiteDataStore = WebKit::toImpl(reinterpret_cast<WKWebsiteDataStoreRef>(applicationCacheManager))->websiteDataStore();
     66    websiteDataStore.removeData(WebKit::WebsiteDataType::OfflineWebApplicationCache, -WallTime::infinity(), [] { });
    6967}
  • trunk/Source/WebKit/UIProcess/API/C/WKAuthenticationDecisionListener.cpp

    r236344 r239258  
    3232#include "WebCredential.h"
    3333
    34 using namespace WebKit;
    35 
    3634WKTypeID WKAuthenticationDecisionListenerGetTypeID()
    3735{
    38     return toAPI(AuthenticationDecisionListener::APIType);
     36    return WebKit::toAPI(AuthenticationDecisionListener::APIType);
    3937}
    4038
    4139void WKAuthenticationDecisionListenerUseCredential(WKAuthenticationDecisionListenerRef authenticationListener, WKCredentialRef credential)
    4240{
    43     toImpl(authenticationListener)->completeChallenge(AuthenticationChallengeDisposition::UseCredential, credential ? toImpl(credential)->credential() : WebCore::Credential());
     41    WebKit::toImpl(authenticationListener)->completeChallenge(AuthenticationChallengeDisposition::UseCredential, credential ? WebKit::toImpl(credential)->credential() : WebCore::Credential());
    4442}
    4543
    4644void WKAuthenticationDecisionListenerCancel(WKAuthenticationDecisionListenerRef authenticationListener)
    4745{
    48     toImpl(authenticationListener)->completeChallenge(AuthenticationChallengeDisposition::Cancel);
     46    WebKit::toImpl(authenticationListener)->completeChallenge(AuthenticationChallengeDisposition::Cancel);
    4947}
    5048
    5149void WKAuthenticationDecisionListenerRejectProtectionSpaceAndContinue(WKAuthenticationDecisionListenerRef authenticationListener)
    5250{
    53     toImpl(authenticationListener)->completeChallenge(AuthenticationChallengeDisposition::RejectProtectionSpaceAndContinue);
     51    WebKit::toImpl(authenticationListener)->completeChallenge(AuthenticationChallengeDisposition::RejectProtectionSpaceAndContinue);
    5452}
  • trunk/Source/WebKit/UIProcess/API/C/WKBackForwardListItemRef.cpp

    r157748 r239258  
    3030#include "WebBackForwardListItem.h"
    3131
    32 using namespace WebKit;
    33 
    3432WKTypeID WKBackForwardListItemGetTypeID()
    3533{
    36     return toAPI(WebBackForwardListItem::APIType);
     34    return WebKit::toAPI(WebBackForwardListItem::APIType);
    3735}
    3836
    3937WKURLRef WKBackForwardListItemCopyURL(WKBackForwardListItemRef itemRef)
    4038{
    41     return toCopiedURLAPI(toImpl(itemRef)->url());
     39    return WebKit::toCopiedURLAPI(toImpl(itemRef)->url());
    4240}
    4341
    4442WKStringRef WKBackForwardListItemCopyTitle(WKBackForwardListItemRef itemRef)
    4543{
    46     return toCopiedAPI(toImpl(itemRef)->title());
     44    return WebKit::toCopiedAPI(toImpl(itemRef)->title());
    4745}
    4846
    4947WKURLRef WKBackForwardListItemCopyOriginalURL(WKBackForwardListItemRef itemRef)
    5048{
    51     return toCopiedURLAPI(toImpl(itemRef)->originalURL());
     49    return WebKit::toCopiedURLAPI(toImpl(itemRef)->originalURL());
    5250}
  • trunk/Source/WebKit/UIProcess/API/C/WKContext.cpp

    r239072 r239258  
    6161}
    6262
    63 using namespace WebCore;
    64 using namespace WebKit;
    65 
    6663WKTypeID WKContextGetTypeID()
    6764{
    68     return toAPI(WebProcessPool::APIType);
     65    return WebKit::toAPI(WebKit::WebProcessPool::APIType);
    6966}
    7067
     
    7269{
    7370    auto configuration = API::ProcessPoolConfiguration::createWithLegacyOptions();
    74     return toAPI(&WebProcessPool::create(configuration).leakRef());
     71    return WebKit::toAPI(&WebKit::WebProcessPool::create(configuration).leakRef());
    7572}
    7673
     
    7875{
    7976    auto configuration = API::ProcessPoolConfiguration::createWithLegacyOptions();
    80     configuration->setInjectedBundlePath(toWTFString(pathRef));
    81 
    82     return toAPI(&WebProcessPool::create(configuration).leakRef());
     77    configuration->setInjectedBundlePath(WebKit::toWTFString(pathRef));
     78
     79    return WebKit::toAPI(&WebKit::WebProcessPool::create(configuration).leakRef());
    8380}
    8481
    8582WKContextRef WKContextCreateWithConfiguration(WKContextConfigurationRef configuration)
    8683{
    87     return toAPI(&WebProcessPool::create(*toImpl(configuration)).leakRef());
     84    return WebKit::toAPI(&WebKit::WebProcessPool::create(*WebKit::toImpl(configuration)).leakRef());
    8885}
    8986
    9087void WKContextSetClient(WKContextRef contextRef, const WKContextClientBase* wkClient)
    9188{
    92     toImpl(contextRef)->initializeClient(wkClient);
     89    WebKit::toImpl(contextRef)->initializeClient(wkClient);
    9390}
    9491
    9592void WKContextSetInjectedBundleClient(WKContextRef contextRef, const WKContextInjectedBundleClientBase* wkClient)
    9693{
    97     toImpl(contextRef)->setInjectedBundleClient(std::make_unique<WebContextInjectedBundleClient>(wkClient));
     94    WebKit::toImpl(contextRef)->setInjectedBundleClient(std::make_unique<WebKit::WebContextInjectedBundleClient>(wkClient));
    9895}
    9996
     
    108105
    109106    private:
    110         void didNavigateWithNavigationData(WebProcessPool& processPool, WebPageProxy& page, const WebNavigationDataStore& navigationDataStore, WebFrameProxy& frame) override
     107        void didNavigateWithNavigationData(WebKit::WebProcessPool& processPool, WebKit::WebPageProxy& page, const WebKit::WebNavigationDataStore& navigationDataStore, WebKit::WebFrameProxy& frame) override
    111108        {
    112109            if (!m_client.didNavigateWithNavigationData)
     
    114111
    115112            RefPtr<API::NavigationData> navigationData = API::NavigationData::create(navigationDataStore);
    116             m_client.didNavigateWithNavigationData(toAPI(&processPool), toAPI(&page), toAPI(navigationData.get()), toAPI(&frame), m_client.base.clientInfo);
    117         }
    118 
    119         void didPerformClientRedirect(WebProcessPool& processPool, WebPageProxy& page, const String& sourceURL, const String& destinationURL, WebFrameProxy& frame) override
     113            m_client.didNavigateWithNavigationData(WebKit::toAPI(&processPool), WebKit::toAPI(&page), WebKit::toAPI(navigationData.get()), WebKit::toAPI(&frame), m_client.base.clientInfo);
     114        }
     115
     116        void didPerformClientRedirect(WebKit::WebProcessPool& processPool, WebKit::WebPageProxy& page, const String& sourceURL, const String& destinationURL, WebKit::WebFrameProxy& frame) override
    120117        {
    121118            if (!m_client.didPerformClientRedirect)
    122119                return;
    123120
    124             m_client.didPerformClientRedirect(toAPI(&processPool), toAPI(&page), toURLRef(sourceURL.impl()), toURLRef(destinationURL.impl()), toAPI(&frame), m_client.base.clientInfo);
    125         }
    126 
    127         void didPerformServerRedirect(WebProcessPool& processPool, WebPageProxy& page, const String& sourceURL, const String& destinationURL, WebFrameProxy& frame) override
     121            m_client.didPerformClientRedirect(WebKit::toAPI(&processPool), WebKit::toAPI(&page), WebKit::toURLRef(sourceURL.impl()), WebKit::toURLRef(destinationURL.impl()), WebKit::toAPI(&frame), m_client.base.clientInfo);
     122        }
     123
     124        void didPerformServerRedirect(WebKit::WebProcessPool& processPool, WebKit::WebPageProxy& page, const String& sourceURL, const String& destinationURL, WebKit::WebFrameProxy& frame) override
    128125        {
    129126            if (!m_client.didPerformServerRedirect)
    130127                return;
    131128
    132             m_client.didPerformServerRedirect(toAPI(&processPool), toAPI(&page), toURLRef(sourceURL.impl()), toURLRef(destinationURL.impl()), toAPI(&frame), m_client.base.clientInfo);
    133         }
    134 
    135         void didUpdateHistoryTitle(WebProcessPool& processPool, WebPageProxy& page, const String& title, const String& url, WebFrameProxy& frame) override
     129            m_client.didPerformServerRedirect(WebKit::toAPI(&processPool), WebKit::toAPI(&page), WebKit::toURLRef(sourceURL.impl()), WebKit::toURLRef(destinationURL.impl()), WebKit::toAPI(&frame), m_client.base.clientInfo);
     130        }
     131
     132        void didUpdateHistoryTitle(WebKit::WebProcessPool& processPool, WebKit::WebPageProxy& page, const String& title, const String& url, WebKit::WebFrameProxy& frame) override
    136133        {
    137134            if (!m_client.didUpdateHistoryTitle)
    138135                return;
    139136
    140             m_client.didUpdateHistoryTitle(toAPI(&processPool), toAPI(&page), toAPI(title.impl()), toURLRef(url.impl()), toAPI(&frame), m_client.base.clientInfo);
    141         }
    142 
    143         void populateVisitedLinks(WebProcessPool& processPool) override
     137            m_client.didUpdateHistoryTitle(WebKit::toAPI(&processPool), WebKit::toAPI(&page), WebKit::toAPI(title.impl()), WebKit::toURLRef(url.impl()), WebKit::toAPI(&frame), m_client.base.clientInfo);
     138        }
     139
     140        void populateVisitedLinks(WebKit::WebProcessPool& processPool) override
    144141        {
    145142            if (!m_client.populateVisitedLinks)
    146143                return;
    147144
    148             m_client.populateVisitedLinks(toAPI(&processPool), m_client.base.clientInfo);
     145            m_client.populateVisitedLinks(WebKit::toAPI(&processPool), m_client.base.clientInfo);
    149146        }
    150147
     
    155152    };
    156153
    157     WebProcessPool& processPool = *toImpl(contextRef);
     154    WebKit::WebProcessPool& processPool = *WebKit::toImpl(contextRef);
    158155    processPool.setHistoryClient(std::make_unique<HistoryClient>(wkClient));
    159156
     
    175172        }
    176173    private:
    177         void didStart(WebProcessPool& processPool, DownloadProxy& downloadProxy) final
     174        void didStart(WebKit::WebProcessPool& processPool, WebKit::DownloadProxy& downloadProxy) final
    178175        {
    179176            if (!m_client.didStart)
    180177                return;
    181178
    182             m_client.didStart(toAPI(&processPool), toAPI(&downloadProxy), m_client.base.clientInfo);
    183         }
    184 
    185         void didReceiveAuthenticationChallenge(WebProcessPool& processPool, DownloadProxy& downloadProxy, AuthenticationChallengeProxy& authenticationChallengeProxy) final
     179            m_client.didStart(WebKit::toAPI(&processPool), WebKit::toAPI(&downloadProxy), m_client.base.clientInfo);
     180        }
     181
     182        void didReceiveAuthenticationChallenge(WebKit::WebProcessPool& processPool, WebKit::DownloadProxy& downloadProxy, WebKit::AuthenticationChallengeProxy& authenticationChallengeProxy) final
    186183        {
    187184            if (!m_client.didReceiveAuthenticationChallenge)
    188185                return;
    189186
    190             m_client.didReceiveAuthenticationChallenge(toAPI(&processPool), toAPI(&downloadProxy), toAPI(&authenticationChallengeProxy), m_client.base.clientInfo);
    191         }
    192 
    193         void didReceiveResponse(WebProcessPool& processPool, DownloadProxy& downloadProxy, const ResourceResponse& response) final
     187            m_client.didReceiveAuthenticationChallenge(WebKit::toAPI(&processPool), WebKit::toAPI(&downloadProxy), WebKit::toAPI(&authenticationChallengeProxy), m_client.base.clientInfo);
     188        }
     189
     190        void didReceiveResponse(WebKit::WebProcessPool& processPool, WebKit::DownloadProxy& downloadProxy, const WebCore::ResourceResponse& response) final
    194191        {
    195192            if (!m_client.didReceiveResponse)
    196193                return;
    197194
    198             m_client.didReceiveResponse(toAPI(&processPool), toAPI(&downloadProxy), toAPI(API::URLResponse::create(response).ptr()), m_client.base.clientInfo);
    199         }
    200 
    201         void didReceiveData(WebProcessPool& processPool, DownloadProxy& downloadProxy, uint64_t length) final
     195            m_client.didReceiveResponse(WebKit::toAPI(&processPool), WebKit::toAPI(&downloadProxy), WebKit::toAPI(API::URLResponse::create(response).ptr()), m_client.base.clientInfo);
     196        }
     197
     198        void didReceiveData(WebKit::WebProcessPool& processPool, WebKit::DownloadProxy& downloadProxy, uint64_t length) final
    202199        {
    203200            if (!m_client.didReceiveData)
    204201                return;
    205202
    206             m_client.didReceiveData(toAPI(&processPool), toAPI(&downloadProxy), length, m_client.base.clientInfo);
    207         }
    208 
    209         void decideDestinationWithSuggestedFilename(WebProcessPool& processPool, DownloadProxy& downloadProxy, const String& filename, Function<void(AllowOverwrite, WTF::String)>&& completionHandler) final
     203            m_client.didReceiveData(WebKit::toAPI(&processPool), WebKit::toAPI(&downloadProxy), length, m_client.base.clientInfo);
     204        }
     205
     206        void decideDestinationWithSuggestedFilename(WebKit::WebProcessPool& processPool, WebKit::DownloadProxy& downloadProxy, const String& filename, Function<void(WebKit::AllowOverwrite, WTF::String)>&& completionHandler) final
    210207        {
    211208            if (!m_client.decideDestinationWithSuggestedFilename)
    212                 return completionHandler(AllowOverwrite::No, { });
     209                return completionHandler(WebKit::AllowOverwrite::No, { });
    213210
    214211            bool allowOverwrite = false;
    215             WKRetainPtr<WKStringRef> destination(AdoptWK, m_client.decideDestinationWithSuggestedFilename(toAPI(&processPool), toAPI(&downloadProxy), toAPI(filename.impl()), &allowOverwrite, m_client.base.clientInfo));
    216             completionHandler(allowOverwrite ? AllowOverwrite::Yes : AllowOverwrite::No, toWTFString(destination.get()));
    217         }
    218 
    219         void didCreateDestination(WebProcessPool& processPool, DownloadProxy& downloadProxy, const String& path) final
     212            WKRetainPtr<WKStringRef> destination(AdoptWK, m_client.decideDestinationWithSuggestedFilename(WebKit::toAPI(&processPool), WebKit::toAPI(&downloadProxy), WebKit::toAPI(filename.impl()), &allowOverwrite, m_client.base.clientInfo));
     213            completionHandler(allowOverwrite ? WebKit::AllowOverwrite::Yes : WebKit::AllowOverwrite::No, WebKit::toWTFString(destination.get()));
     214        }
     215
     216        void didCreateDestination(WebKit::WebProcessPool& processPool, WebKit::DownloadProxy& downloadProxy, const String& path) final
    220217        {
    221218            if (!m_client.didCreateDestination)
    222219                return;
    223220
    224             m_client.didCreateDestination(toAPI(&processPool), toAPI(&downloadProxy), toAPI(path.impl()), m_client.base.clientInfo);
    225         }
    226 
    227         void didFinish(WebProcessPool& processPool, DownloadProxy& downloadProxy) final
     221            m_client.didCreateDestination(WebKit::toAPI(&processPool), WebKit::toAPI(&downloadProxy), WebKit::toAPI(path.impl()), m_client.base.clientInfo);
     222        }
     223
     224        void didFinish(WebKit::WebProcessPool& processPool, WebKit::DownloadProxy& downloadProxy) final
    228225        {
    229226            if (!m_client.didFinish)
    230227                return;
    231228
    232             m_client.didFinish(toAPI(&processPool), toAPI(&downloadProxy), m_client.base.clientInfo);
    233         }
    234 
    235         void didFail(WebProcessPool& processPool, DownloadProxy& downloadProxy, const ResourceError& error) final
     229            m_client.didFinish(WebKit::toAPI(&processPool), WebKit::toAPI(&downloadProxy), m_client.base.clientInfo);
     230        }
     231
     232        void didFail(WebKit::WebProcessPool& processPool, WebKit::DownloadProxy& downloadProxy, const WebCore::ResourceError& error) final
    236233        {
    237234            if (!m_client.didFail)
    238235                return;
    239236
    240             m_client.didFail(toAPI(&processPool), toAPI(&downloadProxy), toAPI(error), m_client.base.clientInfo);
     237            m_client.didFail(WebKit::toAPI(&processPool), WebKit::toAPI(&downloadProxy), WebKit::toAPI(error), m_client.base.clientInfo);
    241238        }
    242239       
    243         void didCancel(WebProcessPool& processPool, DownloadProxy& downloadProxy) final
     240        void didCancel(WebKit::WebProcessPool& processPool, WebKit::DownloadProxy& downloadProxy) final
    244241        {
    245242            if (!m_client.didCancel)
    246243                return;
    247244           
    248             m_client.didCancel(toAPI(&processPool), toAPI(&downloadProxy), m_client.base.clientInfo);
     245            m_client.didCancel(WebKit::toAPI(&processPool), WebKit::toAPI(&downloadProxy), m_client.base.clientInfo);
    249246        }
    250247       
    251         void processDidCrash(WebProcessPool& processPool, DownloadProxy& downloadProxy) final
     248        void processDidCrash(WebKit::WebProcessPool& processPool, WebKit::DownloadProxy& downloadProxy) final
    252249        {
    253250            if (!m_client.processDidCrash)
    254251                return;
    255252           
    256             m_client.processDidCrash(toAPI(&processPool), toAPI(&downloadProxy), m_client.base.clientInfo);
    257         }
    258 
    259         void willSendRequest(WebProcessPool& processPool, DownloadProxy& downloadProxy, ResourceRequest&& request, const ResourceResponse&, CompletionHandler<void(ResourceRequest&&)>&& completionHandler) final
     253            m_client.processDidCrash(WebKit::toAPI(&processPool), WebKit::toAPI(&downloadProxy), m_client.base.clientInfo);
     254        }
     255
     256        void willSendRequest(WebKit::WebProcessPool& processPool, WebKit::DownloadProxy& downloadProxy, WebCore::ResourceRequest&& request, const WebCore::ResourceResponse&, CompletionHandler<void(WebCore::ResourceRequest&&)>&& completionHandler) final
    260257        {
    261258            if (m_client.didReceiveServerRedirect)
    262                 m_client.didReceiveServerRedirect(toAPI(&processPool), toAPI(&downloadProxy), toURLRef(request.url().string().impl()), m_client.base.clientInfo);
     259                m_client.didReceiveServerRedirect(WebKit::toAPI(&processPool), WebKit::toAPI(&downloadProxy), WebKit::toURLRef(request.url().string().impl()), m_client.base.clientInfo);
    263260
    264261            completionHandler(WTFMove(request));
    265262        }
    266 
    267 
    268263    };
    269264
    270     toImpl(contextRef)->setDownloadClient(std::make_unique<DownloadClient>(wkClient));
     265    WebKit::toImpl(contextRef)->setDownloadClient(std::make_unique<DownloadClient>(wkClient));
    271266}
    272267
    273268void WKContextSetConnectionClient(WKContextRef contextRef, const WKContextConnectionClientBase* wkClient)
    274269{
    275     toImpl(contextRef)->initializeConnectionClient(wkClient);
     270    WebKit::toImpl(contextRef)->initializeConnectionClient(wkClient);
    276271}
    277272
    278273WKDownloadRef WKContextDownloadURLRequest(WKContextRef contextRef, WKURLRequestRef requestRef)
    279274{
    280     return toAPI(toImpl(contextRef)->download(0, toImpl(requestRef)->resourceRequest()));
     275    return WebKit::toAPI(WebKit::toImpl(contextRef)->download(0, WebKit::toImpl(requestRef)->resourceRequest()));
    281276}
    282277
    283278WKDownloadRef WKContextResumeDownload(WKContextRef contextRef, WKDataRef resumeData, WKStringRef path)
    284279{
    285     return toAPI(toImpl(contextRef)->resumeDownload(nullptr, toImpl(resumeData), toWTFString(path)));
     280    return WebKit::toAPI(WebKit::toImpl(contextRef)->resumeDownload(nullptr, WebKit::toImpl(resumeData), WebKit::toWTFString(path)));
    286281}
    287282
    288283void WKContextSetInitializationUserDataForInjectedBundle(WKContextRef contextRef,  WKTypeRef userDataRef)
    289284{
    290     toImpl(contextRef)->setInjectedBundleInitializationUserData(toImpl(userDataRef));
     285    WebKit::toImpl(contextRef)->setInjectedBundleInitializationUserData(WebKit::toImpl(userDataRef));
    291286}
    292287
    293288void WKContextPostMessageToInjectedBundle(WKContextRef contextRef, WKStringRef messageNameRef, WKTypeRef messageBodyRef)
    294289{
    295     toImpl(contextRef)->postMessageToInjectedBundle(toImpl(messageNameRef)->string(), toImpl(messageBodyRef));
     290    WebKit::toImpl(contextRef)->postMessageToInjectedBundle(WebKit::toImpl(messageNameRef)->string(), WebKit::toImpl(messageBodyRef));
    296291}
    297292
    298293void WKContextGetGlobalStatistics(WKContextStatistics* statistics)
    299294{
    300     const WebProcessPool::Statistics& webContextStatistics = WebProcessPool::statistics();
     295    const WebKit::WebProcessPool::Statistics& webContextStatistics = WebKit::WebProcessPool::statistics();
    301296
    302297    statistics->wkViewCount = webContextStatistics.wkViewCount;
     
    307302void WKContextAddVisitedLink(WKContextRef contextRef, WKStringRef visitedURL)
    308303{
    309     String visitedURLString = toImpl(visitedURL)->string();
     304    String visitedURLString = WebKit::toImpl(visitedURL)->string();
    310305    if (visitedURLString.isEmpty())
    311306        return;
    312307
    313     toImpl(contextRef)->visitedLinkStore().addVisitedLinkHash(computeSharedStringHash(visitedURLString));
     308    WebKit::toImpl(contextRef)->visitedLinkStore().addVisitedLinkHash(WebCore::computeSharedStringHash(visitedURLString));
    314309}
    315310
    316311void WKContextClearVisitedLinks(WKContextRef contextRef)
    317312{
    318     toImpl(contextRef)->visitedLinkStore().removeAll();
     313    WebKit::toImpl(contextRef)->visitedLinkStore().removeAll();
    319314}
    320315
    321316void WKContextSetCacheModel(WKContextRef contextRef, WKCacheModel cacheModel)
    322317{
    323     toImpl(contextRef)->setCacheModel(toCacheModel(cacheModel));
     318    WebKit::toImpl(contextRef)->setCacheModel(WebKit::toCacheModel(cacheModel));
    324319}
    325320
    326321WKCacheModel WKContextGetCacheModel(WKContextRef contextRef)
    327322{
    328     return toAPI(toImpl(contextRef)->cacheModel());
     323    return WebKit::toAPI(WebKit::toImpl(contextRef)->cacheModel());
    329324}
    330325
    331326void WKContextSetMaximumNumberOfProcesses(WKContextRef contextRef, unsigned numberOfProcesses)
    332327{
    333     toImpl(contextRef)->setMaximumNumberOfProcesses(numberOfProcesses);
     328    WebKit::toImpl(contextRef)->setMaximumNumberOfProcesses(numberOfProcesses);
    334329}
    335330
    336331unsigned WKContextGetMaximumNumberOfProcesses(WKContextRef contextRef)
    337332{
    338     return toImpl(contextRef)->maximumNumberOfProcesses();
     333    return WebKit::toImpl(contextRef)->maximumNumberOfProcesses();
    339334}
    340335
    341336void WKContextSetAlwaysUsesComplexTextCodePath(WKContextRef contextRef, bool alwaysUseComplexTextCodePath)
    342337{
    343     toImpl(contextRef)->setAlwaysUsesComplexTextCodePath(alwaysUseComplexTextCodePath);
     338    WebKit::toImpl(contextRef)->setAlwaysUsesComplexTextCodePath(alwaysUseComplexTextCodePath);
    344339}
    345340
    346341void WKContextSetShouldUseFontSmoothing(WKContextRef contextRef, bool useFontSmoothing)
    347342{
    348     toImpl(contextRef)->setShouldUseFontSmoothing(useFontSmoothing);
     343    WebKit::toImpl(contextRef)->setShouldUseFontSmoothing(useFontSmoothing);
    349344}
    350345
     
    352347{
    353348#if ENABLE(NETSCAPE_PLUGIN_API)
    354     toImpl(contextRef)->setAdditionalPluginsDirectory(toImpl(pluginsDirectory)->string());
     349    WebKit::toImpl(contextRef)->setAdditionalPluginsDirectory(WebKit::toImpl(pluginsDirectory)->string());
    355350#else
    356351    UNUSED_PARAM(contextRef);
     
    362357{
    363358#if ENABLE(NETSCAPE_PLUGIN_API)
    364     toImpl(context)->refreshPlugins();
     359    WebKit::toImpl(context)->refreshPlugins();
    365360#else
    366361    UNUSED_PARAM(context);
     
    370365void WKContextRegisterURLSchemeAsEmptyDocument(WKContextRef contextRef, WKStringRef urlScheme)
    371366{
    372     toImpl(contextRef)->registerURLSchemeAsEmptyDocument(toImpl(urlScheme)->string());
     367    WebKit::toImpl(contextRef)->registerURLSchemeAsEmptyDocument(WebKit::toImpl(urlScheme)->string());
    373368}
    374369
    375370void WKContextRegisterURLSchemeAsSecure(WKContextRef contextRef, WKStringRef urlScheme)
    376371{
    377     toImpl(contextRef)->registerURLSchemeAsSecure(toImpl(urlScheme)->string());
     372    WebKit::toImpl(contextRef)->registerURLSchemeAsSecure(WebKit::toImpl(urlScheme)->string());
    378373}
    379374
    380375void WKContextRegisterURLSchemeAsBypassingContentSecurityPolicy(WKContextRef contextRef, WKStringRef urlScheme)
    381376{
    382     toImpl(contextRef)->registerURLSchemeAsBypassingContentSecurityPolicy(toImpl(urlScheme)->string());
     377    WebKit::toImpl(contextRef)->registerURLSchemeAsBypassingContentSecurityPolicy(WebKit::toImpl(urlScheme)->string());
    383378}
    384379
    385380void WKContextRegisterURLSchemeAsCachePartitioned(WKContextRef contextRef, WKStringRef urlScheme)
    386381{
    387     toImpl(contextRef)->registerURLSchemeAsCachePartitioned(toImpl(urlScheme)->string());
     382    WebKit::toImpl(contextRef)->registerURLSchemeAsCachePartitioned(WebKit::toImpl(urlScheme)->string());
    388383}
    389384
    390385void WKContextRegisterURLSchemeAsCanDisplayOnlyIfCanRequest(WKContextRef contextRef, WKStringRef urlScheme)
    391386{
    392     toImpl(contextRef)->registerURLSchemeAsCanDisplayOnlyIfCanRequest(toImpl(urlScheme)->string());
     387    WebKit::toImpl(contextRef)->registerURLSchemeAsCanDisplayOnlyIfCanRequest(WebKit::toImpl(urlScheme)->string());
    393388}
    394389
    395390void WKContextSetDomainRelaxationForbiddenForURLScheme(WKContextRef contextRef, WKStringRef urlScheme)
    396391{
    397     toImpl(contextRef)->setDomainRelaxationForbiddenForURLScheme(toImpl(urlScheme)->string());
     392    WebKit::toImpl(contextRef)->setDomainRelaxationForbiddenForURLScheme(WebKit::toImpl(urlScheme)->string());
    398393}
    399394
    400395void WKContextSetCanHandleHTTPSServerTrustEvaluation(WKContextRef contextRef, bool value)
    401396{
    402     toImpl(contextRef)->setCanHandleHTTPSServerTrustEvaluation(value);
     397    WebKit::toImpl(contextRef)->setCanHandleHTTPSServerTrustEvaluation(value);
    403398}
    404399
    405400void WKContextSetPrewarmsProcessesAutomatically(WKContextRef contextRef, bool value)
    406401{
    407     toImpl(contextRef)->configuration().setIsAutomaticProcessWarmingEnabled(value);
     402    WebKit::toImpl(contextRef)->configuration().setIsAutomaticProcessWarmingEnabled(value);
    408403}
    409404
    410405void WKContextSetCustomWebContentServiceBundleIdentifier(WKContextRef contextRef, WKStringRef name)
    411406{
    412     toImpl(contextRef)->setCustomWebContentServiceBundleIdentifier(toImpl(name)->string());
     407    WebKit::toImpl(contextRef)->setCustomWebContentServiceBundleIdentifier(WebKit::toImpl(name)->string());
    413408}
    414409
    415410void WKContextSetDiskCacheSpeculativeValidationEnabled(WKContextRef contextRef, bool value)
    416411{
    417     toImpl(contextRef)->configuration().setDiskCacheSpeculativeValidationEnabled(value);
     412    WebKit::toImpl(contextRef)->configuration().setDiskCacheSpeculativeValidationEnabled(value);
    418413}
    419414
    420415void WKContextPreconnectToServer(WKContextRef contextRef, WKURLRef serverURLRef)
    421416{
    422     toImpl(contextRef)->preconnectToServer(URL(URL(), toWTFString(serverURLRef)));
     417    WebKit::toImpl(contextRef)->preconnectToServer(URL(URL(), WebKit::toWTFString(serverURLRef)));
    423418}
    424419
    425420WKCookieManagerRef WKContextGetCookieManager(WKContextRef contextRef)
    426421{
    427     return toAPI(toImpl(contextRef)->supplement<WebCookieManagerProxy>());
     422    return WebKit::toAPI(WebKit::toImpl(contextRef)->supplement<WebKit::WebCookieManagerProxy>());
    428423}
    429424
    430425WKWebsiteDataStoreRef WKContextGetWebsiteDataStore(WKContextRef context)
    431426{
    432     auto* dataStore = toImpl(context)->websiteDataStore();
     427    auto* dataStore = WebKit::toImpl(context)->websiteDataStore();
    433428    if (!dataStore) {
    434429        auto defaultDataStore = API::WebsiteDataStore::defaultDataStore();
    435         toImpl(context)->setPrimaryDataStore(defaultDataStore.get());
     430        WebKit::toImpl(context)->setPrimaryDataStore(defaultDataStore.get());
    436431        dataStore = defaultDataStore.ptr();
    437432    }
    438433
    439     return toAPI(dataStore);
     434    return WebKit::toAPI(dataStore);
    440435}
    441436
     
    447442WKGeolocationManagerRef WKContextGetGeolocationManager(WKContextRef contextRef)
    448443{
    449     return toAPI(toImpl(contextRef)->supplement<WebGeolocationManagerProxy>());
     444    return WebKit::toAPI(WebKit::toImpl(contextRef)->supplement<WebKit::WebGeolocationManagerProxy>());
    450445}
    451446
     
    463458{
    464459#if ENABLE(MEDIA_SESSION)
    465     return toAPI(toImpl(context)->supplement<WebMediaSessionFocusManager>());
     460    return WebKit::toAPI(WebKit::toImpl(context)->supplement<WebKit::WebMediaSessionFocusManager>());
    466461#else
    467462    UNUSED_PARAM(context);
     
    472467WKNotificationManagerRef WKContextGetNotificationManager(WKContextRef contextRef)
    473468{
    474     return toAPI(toImpl(contextRef)->supplement<WebNotificationManagerProxy>());
     469    return WebKit::toAPI(WebKit::toImpl(contextRef)->supplement<WebKit::WebNotificationManagerProxy>());
    475470}
    476471
     
    482477void WKContextStartMemorySampler(WKContextRef contextRef, WKDoubleRef interval)
    483478{
    484     toImpl(contextRef)->startMemorySampler(toImpl(interval)->value());
     479    WebKit::toImpl(contextRef)->startMemorySampler(WebKit::toImpl(interval)->value());
    485480}
    486481
    487482void WKContextStopMemorySampler(WKContextRef contextRef)
    488483{
    489     toImpl(contextRef)->stopMemorySampler();
     484    WebKit::toImpl(contextRef)->stopMemorySampler();
    490485}
    491486
     
    496491void WKContextAllowSpecificHTTPSCertificateForHost(WKContextRef contextRef, WKCertificateInfoRef certificateRef, WKStringRef hostRef)
    497492{
    498     toImpl(contextRef)->allowSpecificHTTPSCertificateForHost(toImpl(certificateRef), toImpl(hostRef)->string());
     493    WebKit::toImpl(contextRef)->allowSpecificHTTPSCertificateForHost(WebKit::toImpl(certificateRef), WebKit::toImpl(hostRef)->string());
    499494}
    500495
    501496void WKContextDisableProcessTermination(WKContextRef contextRef)
    502497{
    503     toImpl(contextRef)->disableProcessTermination();
     498    WebKit::toImpl(contextRef)->disableProcessTermination();
    504499}
    505500
    506501void WKContextEnableProcessTermination(WKContextRef contextRef)
    507502{
    508     toImpl(contextRef)->enableProcessTermination();
     503    WebKit::toImpl(contextRef)->enableProcessTermination();
    509504}
    510505
    511506void WKContextSetHTTPPipeliningEnabled(WKContextRef contextRef, bool enabled)
    512507{
    513     toImpl(contextRef)->setHTTPPipeliningEnabled(enabled);
     508    WebKit::toImpl(contextRef)->setHTTPPipeliningEnabled(enabled);
    514509}
    515510
    516511void WKContextWarmInitialProcess(WKContextRef contextRef)
    517512{
    518     toImpl(contextRef)->prewarmProcess(WebProcessPool::MayCreateDefaultDataStore::Yes);
     513    WebKit::toImpl(contextRef)->prewarmProcess(WebKit::WebProcessPool::MayCreateDefaultDataStore::Yes);
    519514}
    520515
    521516void WKContextGetStatistics(WKContextRef contextRef, void* context, WKContextGetStatisticsFunction callback)
    522517{
    523     toImpl(contextRef)->getStatistics(0xFFFFFFFF, toGenericCallbackFunction(context, callback));
     518    WebKit::toImpl(contextRef)->getStatistics(0xFFFFFFFF, WebKit::toGenericCallbackFunction(context, callback));
    524519}
    525520
    526521void WKContextGetStatisticsWithOptions(WKContextRef contextRef, WKStatisticsOptions optionsMask, void* context, WKContextGetStatisticsFunction callback)
    527522{
    528     toImpl(contextRef)->getStatistics(optionsMask, toGenericCallbackFunction(context, callback));
     523    WebKit::toImpl(contextRef)->getStatistics(optionsMask, WebKit::toGenericCallbackFunction(context, callback));
    529524}
    530525
    531526bool WKContextJavaScriptConfigurationFileEnabled(WKContextRef contextRef)
    532527{
    533     return toImpl(contextRef)->javaScriptConfigurationFileEnabled();
     528    return WebKit::toImpl(contextRef)->javaScriptConfigurationFileEnabled();
    534529}
    535530
    536531void WKContextSetJavaScriptConfigurationFileEnabled(WKContextRef contextRef, bool enable)
    537532{
    538     toImpl(contextRef)->setJavaScriptConfigurationFileEnabled(enable);
     533    WebKit::toImpl(contextRef)->setJavaScriptConfigurationFileEnabled(enable);
    539534}
    540535
    541536void WKContextGarbageCollectJavaScriptObjects(WKContextRef contextRef)
    542537{
    543     toImpl(contextRef)->garbageCollectJavaScriptObjects();
     538    WebKit::toImpl(contextRef)->garbageCollectJavaScriptObjects();
    544539}
    545540
    546541void WKContextSetJavaScriptGarbageCollectorTimerEnabled(WKContextRef contextRef, bool enable)
    547542{
    548     toImpl(contextRef)->setJavaScriptGarbageCollectorTimerEnabled(enable);
     543    WebKit::toImpl(contextRef)->setJavaScriptGarbageCollectorTimerEnabled(enable);
    549544}
    550545
    551546void WKContextUseTestingNetworkSession(WKContextRef context)
    552547{
    553     toImpl(context)->useTestingNetworkSession();
     548    WebKit::toImpl(context)->useTestingNetworkSession();
    554549}
    555550
    556551void WKContextSetAllowsAnySSLCertificateForWebSocketTesting(WKContextRef context, bool allows)
    557552{
    558     toImpl(context)->setAllowsAnySSLCertificateForWebSocket(allows);
     553    WebKit::toImpl(context)->setAllowsAnySSLCertificateForWebSocket(allows);
    559554}
    560555
     
    562557{
    563558#if ENABLE(SERVICE_WORKER)
    564     toImpl(context)->setAllowsAnySSLCertificateForServiceWorker(allows);
     559    WebKit::toImpl(context)->setAllowsAnySSLCertificateForServiceWorker(allows);
    565560#endif
    566561}
     
    568563void WKContextClearCachedCredentials(WKContextRef context)
    569564{
    570     toImpl(context)->clearCachedCredentials();
     565    WebKit::toImpl(context)->clearCachedCredentials();
    571566}
    572567
    573568WKDictionaryRef WKContextCopyPlugInAutoStartOriginHashes(WKContextRef contextRef)
    574569{
    575     return toAPI(&toImpl(contextRef)->plugInAutoStartOriginHashes().leakRef());
     570    return WebKit::toAPI(&WebKit::toImpl(contextRef)->plugInAutoStartOriginHashes().leakRef());
    576571}
    577572
     
    580575    if (!dictionaryRef)
    581576        return;
    582     toImpl(contextRef)->setPlugInAutoStartOriginHashes(*toImpl(dictionaryRef));
     577    WebKit::toImpl(contextRef)->setPlugInAutoStartOriginHashes(*WebKit::toImpl(dictionaryRef));
    583578}
    584579
     
    587582    if (!dictionaryRef)
    588583        return;
    589     toImpl(contextRef)->setPlugInAutoStartOriginsFilteringOutEntriesAddedAfterTime(*toImpl(dictionaryRef), WallTime::fromRawSeconds(time));
     584    WebKit::toImpl(contextRef)->setPlugInAutoStartOriginsFilteringOutEntriesAddedAfterTime(*WebKit::toImpl(dictionaryRef), WallTime::fromRawSeconds(time));
    590585}
    591586
     
    594589    if (!arrayRef)
    595590        return;
    596     toImpl(contextRef)->setPlugInAutoStartOrigins(*toImpl(arrayRef));
     591    WebKit::toImpl(contextRef)->setPlugInAutoStartOrigins(*WebKit::toImpl(arrayRef));
    597592}
    598593
    599594void WKContextSetInvalidMessageFunction(WKContextInvalidMessageFunction invalidMessageFunction)
    600595{
    601     WebProcessPool::setInvalidMessageCallback(invalidMessageFunction);
     596    WebKit::WebProcessPool::setInvalidMessageCallback(invalidMessageFunction);
    602597}
    603598
    604599void WKContextSetMemoryCacheDisabled(WKContextRef contextRef, bool disabled)
    605600{
    606     toImpl(contextRef)->setMemoryCacheDisabled(disabled);
     601    WebKit::toImpl(contextRef)->setMemoryCacheDisabled(disabled);
    607602}
    608603
    609604void WKContextSetFontWhitelist(WKContextRef contextRef, WKArrayRef arrayRef)
    610605{
    611     toImpl(contextRef)->setFontWhitelist(toImpl(arrayRef));
     606    WebKit::toImpl(contextRef)->setFontWhitelist(WebKit::toImpl(arrayRef));
    612607}
    613608
    614609void WKContextTerminateNetworkProcess(WKContextRef context)
    615610{
    616     toImpl(context)->terminateNetworkProcess();
     611    WebKit::toImpl(context)->terminateNetworkProcess();
    617612}
    618613
    619614void WKContextTerminateServiceWorkerProcess(WKContextRef context)
    620615{
    621     toImpl(context)->terminateServiceWorkerProcesses();
     616    WebKit::toImpl(context)->terminateServiceWorkerProcesses();
    622617}
    623618
    624619ProcessID WKContextGetNetworkProcessIdentifier(WKContextRef contextRef)
    625620{
    626     return toImpl(contextRef)->networkProcessIdentifier();
     621    return WebKit::toImpl(contextRef)->networkProcessIdentifier();
    627622}
    628623
     
    635630    size_t count = WKArrayGetSize(mimeTypesRef);
    636631    for (size_t i = 0; i < count; ++i)
    637         mimeTypes.add(toWTFString(static_cast<WKStringRef>(WKArrayGetItemAtIndex(mimeTypesRef, i))));
     632        mimeTypes.add(WebKit::toWTFString(static_cast<WKStringRef>(WKArrayGetItemAtIndex(mimeTypesRef, i))));
    638633    count = WKArrayGetSize(extensionsRef);
    639634    for (size_t i = 0; i < count; ++i)
    640         extensions.add(toWTFString(static_cast<WKStringRef>(WKArrayGetItemAtIndex(extensionsRef, i))));
    641 
    642     toImpl(contextRef)->addSupportedPlugin(toWTFString(domainRef), toWTFString(nameRef), WTFMove(mimeTypes), WTFMove(extensions));
     635        extensions.add(WebKit::toWTFString(static_cast<WKStringRef>(WKArrayGetItemAtIndex(extensionsRef, i))));
     636
     637    WebKit::toImpl(contextRef)->addSupportedPlugin(WebKit::toWTFString(domainRef), WebKit::toWTFString(nameRef), WTFMove(mimeTypes), WTFMove(extensions));
    643638#endif
    644639}
     
    647642{
    648643#if ENABLE(NETSCAPE_PLUGIN_API)
    649     toImpl(contextRef)->clearSupportedPlugins();
     644    WebKit::toImpl(contextRef)->clearSupportedPlugins();
    650645#endif
    651646}
     
    653648void WKContextSetIDBPerOriginQuota(WKContextRef contextRef, uint64_t quota)
    654649{
    655     toImpl(contextRef)->setIDBPerOriginQuota(quota);
    656 }
     650    WebKit::toImpl(contextRef)->setIDBPerOriginQuota(quota);
     651}
  • trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp

    r239072 r239258  
    9898#endif
    9999
     100namespace API {
    100101using namespace WebCore;
    101102using namespace WebKit;
    102 
    103 namespace API {
     103   
    104104template<> struct ClientTraits<WKPageLoaderClientBase> {
    105105    typedef std::tuple<WKPageLoaderClientV0, WKPageLoaderClientV1, WKPageLoaderClientV2, WKPageLoaderClientV3, WKPageLoaderClientV4, WKPageLoaderClientV5, WKPageLoaderClientV6> Versions;
     
    131131    typedef std::tuple<WKPageFindMatchesClientV0> Versions;
    132132};
    133 
    134 }
     133   
     134} // namespace API
    135135
    136136WKTypeID WKPageGetTypeID()
     
    161161void WKPageLoadURLWithShouldOpenExternalURLsPolicy(WKPageRef pageRef, WKURLRef URLRef, bool shouldOpenExternalURLs)
    162162{
    163     ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy = shouldOpenExternalURLs ? ShouldOpenExternalURLsPolicy::ShouldAllow : ShouldOpenExternalURLsPolicy::ShouldNotAllow;
     163    WebCore::ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy = shouldOpenExternalURLs ? WebCore::ShouldOpenExternalURLsPolicy::ShouldAllow : WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow;
    164164    toImpl(pageRef)->loadRequest(URL(URL(), toWTFString(URLRef)), shouldOpenExternalURLsPolicy);
    165165}
     
    167167void WKPageLoadURLWithUserData(WKPageRef pageRef, WKURLRef URLRef, WKTypeRef userDataRef)
    168168{
    169     toImpl(pageRef)->loadRequest(URL(URL(), toWTFString(URLRef)), ShouldOpenExternalURLsPolicy::ShouldNotAllow, toImpl(userDataRef));
     169    toImpl(pageRef)->loadRequest(URL(URL(), toWTFString(URLRef)), WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow, toImpl(userDataRef));
    170170}
    171171
     
    179179{
    180180    auto resourceRequest = toImpl(urlRequestRef)->resourceRequest();
    181     toImpl(pageRef)->loadRequest(WTFMove(resourceRequest), ShouldOpenExternalURLsPolicy::ShouldNotAllow, toImpl(userDataRef));
     181    toImpl(pageRef)->loadRequest(WTFMove(resourceRequest), WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow, toImpl(userDataRef));
    182182}
    183183
     
    692692void WKPageSetPaginationMode(WKPageRef pageRef, WKPaginationMode paginationMode)
    693693{
    694     Pagination::Mode mode;
     694    WebCore::Pagination::Mode mode;
    695695    switch (paginationMode) {
    696696    case kWKPaginationModeUnpaginated:
    697         mode = Pagination::Unpaginated;
     697        mode = WebCore::Pagination::Unpaginated;
    698698        break;
    699699    case kWKPaginationModeLeftToRight:
    700         mode = Pagination::LeftToRightPaginated;
     700        mode = WebCore::Pagination::LeftToRightPaginated;
    701701        break;
    702702    case kWKPaginationModeRightToLeft:
    703         mode = Pagination::RightToLeftPaginated;
     703        mode = WebCore::Pagination::RightToLeftPaginated;
    704704        break;
    705705    case kWKPaginationModeTopToBottom:
    706         mode = Pagination::TopToBottomPaginated;
     706        mode = WebCore::Pagination::TopToBottomPaginated;
    707707        break;
    708708    case kWKPaginationModeBottomToTop:
    709         mode = Pagination::BottomToTopPaginated;
     709        mode = WebCore::Pagination::BottomToTopPaginated;
    710710        break;
    711711    default:
     
    718718{
    719719    switch (toImpl(pageRef)->paginationMode()) {
    720     case Pagination::Unpaginated:
     720    case WebCore::Pagination::Unpaginated:
    721721        return kWKPaginationModeUnpaginated;
    722     case Pagination::LeftToRightPaginated:
     722    case WebCore::Pagination::LeftToRightPaginated:
    723723        return kWKPaginationModeLeftToRight;
    724     case Pagination::RightToLeftPaginated:
     724    case WebCore::Pagination::RightToLeftPaginated:
    725725        return kWKPaginationModeRightToLeft;
    726     case Pagination::TopToBottomPaginated:
     726    case WebCore::Pagination::TopToBottomPaginated:
    727727        return kWKPaginationModeTopToBottom;
    728     case Pagination::BottomToTopPaginated:
     728    case WebCore::Pagination::BottomToTopPaginated:
    729729        return kWKPaginationModeBottomToTop;
    730730    }
     
    11081108        }
    11091109
    1110         void didFailProvisionalLoadWithErrorForFrame(WebPageProxy& page, WebFrameProxy& frame, API::Navigation*, const ResourceError& error, API::Object* userData) override
     1110        void didFailProvisionalLoadWithErrorForFrame(WebPageProxy& page, WebFrameProxy& frame, API::Navigation*, const WebCore::ResourceError& error, API::Object* userData) override
    11111111        {
    11121112            if (!m_client.didFailProvisionalLoadWithErrorForFrame)
     
    11241124        }
    11251125
    1126         void didFailLoadWithErrorForFrame(WebPageProxy& page, WebFrameProxy& frame, API::Navigation*, const ResourceError& error, API::Object* userData) override
     1126        void didFailLoadWithErrorForFrame(WebPageProxy& page, WebFrameProxy& frame, API::Navigation*, const WebCore::ResourceError& error, API::Object* userData) override
    11271127        {
    11281128            if (!m_client.didFailLoadWithErrorForFrame)
     
    12311231        }
    12321232
    1233         void decidePolicyForNewWindowAction(WebPageProxy& page, WebFrameProxy& frame, const NavigationActionData& navigationActionData, const ResourceRequest& resourceRequest, const String& frameName, Ref<WebFramePolicyListenerProxy>&& listener, API::Object* userData) override
     1233        void decidePolicyForNewWindowAction(WebPageProxy& page, WebFrameProxy& frame, const NavigationActionData& navigationActionData, const WebCore::ResourceRequest& resourceRequest, const String& frameName, Ref<WebFramePolicyListenerProxy>&& listener, API::Object* userData) override
    12341234        {
    12351235            if (!m_client.decidePolicyForNewWindowAction) {
     
    12431243        }
    12441244
    1245         void decidePolicyForResponse(WebPageProxy& page, WebFrameProxy& frame, const ResourceResponse& resourceResponse, const ResourceRequest& resourceRequest, bool canShowMIMEType, Ref<WebFramePolicyListenerProxy>&& listener, API::Object* userData) override
     1245        void decidePolicyForResponse(WebPageProxy& page, WebFrameProxy& frame, const WebCore::ResourceResponse& resourceResponse, const WebCore::ResourceRequest& resourceRequest, bool canShowMIMEType, Ref<WebFramePolicyListenerProxy>&& listener, API::Object* userData) override
    12461246        {
    12471247            if (!m_client.decidePolicyForResponse_deprecatedForUseWithV0 && !m_client.decidePolicyForResponse) {
     
    12591259        }
    12601260
    1261         void unableToImplementPolicy(WebPageProxy& page, WebFrameProxy& frame, const ResourceError& error, API::Object* userData) override
     1261        void unableToImplementPolicy(WebPageProxy& page, WebFrameProxy& frame, const WebCore::ResourceError& error, API::Object* userData) override
    12621262        {
    12631263            if (!m_client.unableToImplementPolicy)
     
    12721272
    12731273namespace WebKit {
    1274 
     1274using namespace WebCore;
     1275   
    12751276class RunBeforeUnloadConfirmPanelResultListener : public API::ObjectImpl<API::Object::Type::RunBeforeUnloadConfirmPanelResultListener> {
    12761277public:
     
    27002701}
    27012702#endif
     2703
  • trunk/Source/WebKit/UIProcess/API/C/cg/WKIconDatabaseCG.cpp

    r239072 r239258  
    3232
    3333using namespace WebKit;
    34 using namespace WebCore;
    3534
    3635CGImageRef WKIconDatabaseTryGetCGImageForURL(WKIconDatabaseRef, WKURLRef, WKSize)
     
    4342    return nullptr;
    4443}
     44
Note: See TracChangeset for help on using the changeset viewer.