Changeset 239258 in webkit
- Timestamp:
- Dec 15, 2018 11:25:21 PM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r239255 r239258 1 2018-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 1 112 2018-12-15 Darin Adler <darin@apple.com> 2 113 -
trunk/Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb
r239072 r239258 41 41 #include <WebCore/TextEncodingRegistry.h> 42 42 43 namespace WebKit { 43 44 using namespace WebCore; 44 45 namespace WebKit {46 45 47 46 WebPreferencesStore::ValueMap& WebPreferencesStore::defaults() -
trunk/Source/WebKit/UIProcess/API/APIContentRuleListStore.cpp
r239072 r239258 46 46 #include <wtf/persistence/PersistentEncoder.h> 47 47 48 49 namespace API { 48 50 using namespace WebKit::NetworkCache; 49 51 using namespace WebCore::FileSystem; 50 52 51 namespace API {52 53 53 ContentRuleListStore& ContentRuleListStore::legacyDefaultStore() 54 54 { -
trunk/Source/WebKit/UIProcess/API/APIHitTestResult.cpp
r239072 r239258 21 21 #include "APIHitTestResult.h" 22 22 23 namespace API { 23 24 using namespace WebCore; 24 25 namespace API {26 25 27 26 Ref<HitTestResult> HitTestResult::create(const WebKit::WebHitTestResultData& hitTestResultData) -
trunk/Source/WebKit/UIProcess/API/APINavigation.cpp
r239072 r239258 31 31 #include <wtf/DebugUtilities.h> 32 32 33 namespace API { 33 34 using namespace WebCore; 34 35 using namespace WebKit; 35 36 namespace API {37 36 38 37 Navigation::Navigation(WebNavigationState& state) -
trunk/Source/WebKit/UIProcess/API/APIOpenPanelParameters.cpp
r239072 r239258 32 32 #include <wtf/Vector.h> 33 33 34 namespace API { 34 35 using namespace WebCore; 35 36 namespace API {37 36 38 37 Ref<OpenPanelParameters> OpenPanelParameters::create(const FileChooserSettings& settings) -
trunk/Source/WebKit/UIProcess/API/APIPageConfiguration.cpp
r239072 r239258 39 39 #endif 40 40 41 namespace API { 41 42 using namespace WebCore; 42 43 using namespace WebKit; 43 44 namespace API {45 44 46 45 Ref<PageConfiguration> PageConfiguration::create() -
trunk/Source/WebKit/UIProcess/API/C/WKApplicationCacheManager.cpp
r229979 r239258 32 32 #include "WebsiteDataRecord.h" 33 33 34 using namespace WebKit;35 36 34 WKTypeID WKApplicationCacheManagerGetTypeID() 37 35 { 38 return toAPI(API::WebsiteDataStore::APIType);36 return WebKit::toAPI(API::WebsiteDataStore::APIType); 39 37 } 40 38 41 39 void WKApplicationCacheManagerGetApplicationCacheOrigins(WKApplicationCacheManagerRef applicationCacheManager, void* context, WKApplicationCacheManagerGetApplicationCacheOriginsFunction callback) 42 40 { 43 auto& websiteDataStore = toImpl(reinterpret_cast<WKWebsiteDataStoreRef>(applicationCacheManager))->websiteDataStore();44 websiteDataStore.fetchData(Web siteDataType::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) { 45 43 Vector<RefPtr<API::Object>> securityOrigins; 46 44 for (const auto& dataRecord : dataRecords) { … … 49 47 } 50 48 51 callback( toAPI(API::Array::create(WTFMove(securityOrigins)).ptr()), nullptr, context);49 callback(WebKit::toAPI(API::Array::create(WTFMove(securityOrigins)).ptr()), nullptr, context); 52 50 }); 53 51 } … … 55 53 void WKApplicationCacheManagerDeleteEntriesForOrigin(WKApplicationCacheManagerRef applicationCacheManager, WKSecurityOriginRef origin) 56 54 { 57 auto& websiteDataStore = toImpl(reinterpret_cast<WKWebsiteDataStoreRef>(applicationCacheManager))->websiteDataStore();55 auto& websiteDataStore = WebKit::toImpl(reinterpret_cast<WKWebsiteDataStoreRef>(applicationCacheManager))->websiteDataStore(); 58 56 59 Web siteDataRecord dataRecord;60 dataRecord.add(Web siteDataType::OfflineWebApplicationCache,toImpl(origin)->securityOrigin().data());57 WebKit::WebsiteDataRecord dataRecord; 58 dataRecord.add(WebKit::WebsiteDataType::OfflineWebApplicationCache, WebKit::toImpl(origin)->securityOrigin().data()); 61 59 62 websiteDataStore.removeData(Web siteDataType::OfflineWebApplicationCache, { dataRecord }, [] { });60 websiteDataStore.removeData(WebKit::WebsiteDataType::OfflineWebApplicationCache, { dataRecord }, [] { }); 63 61 } 64 62 65 63 void WKApplicationCacheManagerDeleteAllEntries(WKApplicationCacheManagerRef applicationCacheManager) 66 64 { 67 auto& websiteDataStore = toImpl(reinterpret_cast<WKWebsiteDataStoreRef>(applicationCacheManager))->websiteDataStore();68 websiteDataStore.removeData(Web siteDataType::OfflineWebApplicationCache, -WallTime::infinity(), [] { });65 auto& websiteDataStore = WebKit::toImpl(reinterpret_cast<WKWebsiteDataStoreRef>(applicationCacheManager))->websiteDataStore(); 66 websiteDataStore.removeData(WebKit::WebsiteDataType::OfflineWebApplicationCache, -WallTime::infinity(), [] { }); 69 67 } -
trunk/Source/WebKit/UIProcess/API/C/WKAuthenticationDecisionListener.cpp
r236344 r239258 32 32 #include "WebCredential.h" 33 33 34 using namespace WebKit;35 36 34 WKTypeID WKAuthenticationDecisionListenerGetTypeID() 37 35 { 38 return toAPI(AuthenticationDecisionListener::APIType);36 return WebKit::toAPI(AuthenticationDecisionListener::APIType); 39 37 } 40 38 41 39 void WKAuthenticationDecisionListenerUseCredential(WKAuthenticationDecisionListenerRef authenticationListener, WKCredentialRef credential) 42 40 { 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()); 44 42 } 45 43 46 44 void WKAuthenticationDecisionListenerCancel(WKAuthenticationDecisionListenerRef authenticationListener) 47 45 { 48 toImpl(authenticationListener)->completeChallenge(AuthenticationChallengeDisposition::Cancel);46 WebKit::toImpl(authenticationListener)->completeChallenge(AuthenticationChallengeDisposition::Cancel); 49 47 } 50 48 51 49 void WKAuthenticationDecisionListenerRejectProtectionSpaceAndContinue(WKAuthenticationDecisionListenerRef authenticationListener) 52 50 { 53 toImpl(authenticationListener)->completeChallenge(AuthenticationChallengeDisposition::RejectProtectionSpaceAndContinue);51 WebKit::toImpl(authenticationListener)->completeChallenge(AuthenticationChallengeDisposition::RejectProtectionSpaceAndContinue); 54 52 } -
trunk/Source/WebKit/UIProcess/API/C/WKBackForwardListItemRef.cpp
r157748 r239258 30 30 #include "WebBackForwardListItem.h" 31 31 32 using namespace WebKit;33 34 32 WKTypeID WKBackForwardListItemGetTypeID() 35 33 { 36 return toAPI(WebBackForwardListItem::APIType);34 return WebKit::toAPI(WebBackForwardListItem::APIType); 37 35 } 38 36 39 37 WKURLRef WKBackForwardListItemCopyURL(WKBackForwardListItemRef itemRef) 40 38 { 41 return toCopiedURLAPI(toImpl(itemRef)->url());39 return WebKit::toCopiedURLAPI(toImpl(itemRef)->url()); 42 40 } 43 41 44 42 WKStringRef WKBackForwardListItemCopyTitle(WKBackForwardListItemRef itemRef) 45 43 { 46 return toCopiedAPI(toImpl(itemRef)->title());44 return WebKit::toCopiedAPI(toImpl(itemRef)->title()); 47 45 } 48 46 49 47 WKURLRef WKBackForwardListItemCopyOriginalURL(WKBackForwardListItemRef itemRef) 50 48 { 51 return toCopiedURLAPI(toImpl(itemRef)->originalURL());49 return WebKit::toCopiedURLAPI(toImpl(itemRef)->originalURL()); 52 50 } -
trunk/Source/WebKit/UIProcess/API/C/WKContext.cpp
r239072 r239258 61 61 } 62 62 63 using namespace WebCore;64 using namespace WebKit;65 66 63 WKTypeID WKContextGetTypeID() 67 64 { 68 return toAPI(WebProcessPool::APIType);65 return WebKit::toAPI(WebKit::WebProcessPool::APIType); 69 66 } 70 67 … … 72 69 { 73 70 auto configuration = API::ProcessPoolConfiguration::createWithLegacyOptions(); 74 return toAPI(&WebProcessPool::create(configuration).leakRef());71 return WebKit::toAPI(&WebKit::WebProcessPool::create(configuration).leakRef()); 75 72 } 76 73 … … 78 75 { 79 76 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()); 83 80 } 84 81 85 82 WKContextRef WKContextCreateWithConfiguration(WKContextConfigurationRef configuration) 86 83 { 87 return toAPI(&WebProcessPool::create(*toImpl(configuration)).leakRef());84 return WebKit::toAPI(&WebKit::WebProcessPool::create(*WebKit::toImpl(configuration)).leakRef()); 88 85 } 89 86 90 87 void WKContextSetClient(WKContextRef contextRef, const WKContextClientBase* wkClient) 91 88 { 92 toImpl(contextRef)->initializeClient(wkClient);89 WebKit::toImpl(contextRef)->initializeClient(wkClient); 93 90 } 94 91 95 92 void WKContextSetInjectedBundleClient(WKContextRef contextRef, const WKContextInjectedBundleClientBase* wkClient) 96 93 { 97 toImpl(contextRef)->setInjectedBundleClient(std::make_unique<WebContextInjectedBundleClient>(wkClient));94 WebKit::toImpl(contextRef)->setInjectedBundleClient(std::make_unique<WebKit::WebContextInjectedBundleClient>(wkClient)); 98 95 } 99 96 … … 108 105 109 106 private: 110 void didNavigateWithNavigationData(Web ProcessPool& processPool, WebPageProxy& page, const WebNavigationDataStore& navigationDataStore,WebFrameProxy& frame) override107 void didNavigateWithNavigationData(WebKit::WebProcessPool& processPool, WebKit::WebPageProxy& page, const WebKit::WebNavigationDataStore& navigationDataStore, WebKit::WebFrameProxy& frame) override 111 108 { 112 109 if (!m_client.didNavigateWithNavigationData) … … 114 111 115 112 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(Web ProcessPool& processPool, WebPageProxy& page, const String& sourceURL, const String& destinationURL,WebFrameProxy& frame) override113 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 120 117 { 121 118 if (!m_client.didPerformClientRedirect) 122 119 return; 123 120 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(Web ProcessPool& processPool, WebPageProxy& page, const String& sourceURL, const String& destinationURL,WebFrameProxy& frame) override121 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 128 125 { 129 126 if (!m_client.didPerformServerRedirect) 130 127 return; 131 128 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(Web ProcessPool& processPool, WebPageProxy& page, const String& title, const String& url,WebFrameProxy& frame) override129 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 136 133 { 137 134 if (!m_client.didUpdateHistoryTitle) 138 135 return; 139 136 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(Web ProcessPool& processPool) override137 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 144 141 { 145 142 if (!m_client.populateVisitedLinks) 146 143 return; 147 144 148 m_client.populateVisitedLinks( toAPI(&processPool), m_client.base.clientInfo);145 m_client.populateVisitedLinks(WebKit::toAPI(&processPool), m_client.base.clientInfo); 149 146 } 150 147 … … 155 152 }; 156 153 157 Web ProcessPool& processPool = *toImpl(contextRef);154 WebKit::WebProcessPool& processPool = *WebKit::toImpl(contextRef); 158 155 processPool.setHistoryClient(std::make_unique<HistoryClient>(wkClient)); 159 156 … … 175 172 } 176 173 private: 177 void didStart(Web ProcessPool& processPool,DownloadProxy& downloadProxy) final174 void didStart(WebKit::WebProcessPool& processPool, WebKit::DownloadProxy& downloadProxy) final 178 175 { 179 176 if (!m_client.didStart) 180 177 return; 181 178 182 m_client.didStart( toAPI(&processPool),toAPI(&downloadProxy), m_client.base.clientInfo);183 } 184 185 void didReceiveAuthenticationChallenge(Web ProcessPool& processPool, DownloadProxy& downloadProxy,AuthenticationChallengeProxy& authenticationChallengeProxy) final179 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 186 183 { 187 184 if (!m_client.didReceiveAuthenticationChallenge) 188 185 return; 189 186 190 m_client.didReceiveAuthenticationChallenge( toAPI(&processPool), toAPI(&downloadProxy),toAPI(&authenticationChallengeProxy), m_client.base.clientInfo);191 } 192 193 void didReceiveResponse(Web ProcessPool& processPool, DownloadProxy& downloadProxy, constResourceResponse& response) final187 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 194 191 { 195 192 if (!m_client.didReceiveResponse) 196 193 return; 197 194 198 m_client.didReceiveResponse( toAPI(&processPool), toAPI(&downloadProxy),toAPI(API::URLResponse::create(response).ptr()), m_client.base.clientInfo);199 } 200 201 void didReceiveData(Web ProcessPool& processPool,DownloadProxy& downloadProxy, uint64_t length) final195 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 202 199 { 203 200 if (!m_client.didReceiveData) 204 201 return; 205 202 206 m_client.didReceiveData( toAPI(&processPool),toAPI(&downloadProxy), length, m_client.base.clientInfo);207 } 208 209 void decideDestinationWithSuggestedFilename(Web ProcessPool& processPool, DownloadProxy& downloadProxy, const String& filename, Function<void(AllowOverwrite, WTF::String)>&& completionHandler) final203 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 210 207 { 211 208 if (!m_client.decideDestinationWithSuggestedFilename) 212 return completionHandler( AllowOverwrite::No, { });209 return completionHandler(WebKit::AllowOverwrite::No, { }); 213 210 214 211 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(Web ProcessPool& processPool,DownloadProxy& downloadProxy, const String& path) final212 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 220 217 { 221 218 if (!m_client.didCreateDestination) 222 219 return; 223 220 224 m_client.didCreateDestination( toAPI(&processPool), toAPI(&downloadProxy),toAPI(path.impl()), m_client.base.clientInfo);225 } 226 227 void didFinish(Web ProcessPool& processPool,DownloadProxy& downloadProxy) final221 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 228 225 { 229 226 if (!m_client.didFinish) 230 227 return; 231 228 232 m_client.didFinish( toAPI(&processPool),toAPI(&downloadProxy), m_client.base.clientInfo);233 } 234 235 void didFail(Web ProcessPool& processPool, DownloadProxy& downloadProxy, constResourceError& error) final229 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 236 233 { 237 234 if (!m_client.didFail) 238 235 return; 239 236 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); 241 238 } 242 239 243 void didCancel(Web ProcessPool& processPool,DownloadProxy& downloadProxy) final240 void didCancel(WebKit::WebProcessPool& processPool, WebKit::DownloadProxy& downloadProxy) final 244 241 { 245 242 if (!m_client.didCancel) 246 243 return; 247 244 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); 249 246 } 250 247 251 void processDidCrash(Web ProcessPool& processPool,DownloadProxy& downloadProxy) final248 void processDidCrash(WebKit::WebProcessPool& processPool, WebKit::DownloadProxy& downloadProxy) final 252 249 { 253 250 if (!m_client.processDidCrash) 254 251 return; 255 252 256 m_client.processDidCrash( toAPI(&processPool),toAPI(&downloadProxy), m_client.base.clientInfo);257 } 258 259 void willSendRequest(Web ProcessPool& processPool, DownloadProxy& downloadProxy, ResourceRequest&& request, const ResourceResponse&, CompletionHandler<void(ResourceRequest&&)>&& completionHandler) final253 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 260 257 { 261 258 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); 263 260 264 261 completionHandler(WTFMove(request)); 265 262 } 266 267 268 263 }; 269 264 270 toImpl(contextRef)->setDownloadClient(std::make_unique<DownloadClient>(wkClient));265 WebKit::toImpl(contextRef)->setDownloadClient(std::make_unique<DownloadClient>(wkClient)); 271 266 } 272 267 273 268 void WKContextSetConnectionClient(WKContextRef contextRef, const WKContextConnectionClientBase* wkClient) 274 269 { 275 toImpl(contextRef)->initializeConnectionClient(wkClient);270 WebKit::toImpl(contextRef)->initializeConnectionClient(wkClient); 276 271 } 277 272 278 273 WKDownloadRef WKContextDownloadURLRequest(WKContextRef contextRef, WKURLRequestRef requestRef) 279 274 { 280 return toAPI(toImpl(contextRef)->download(0,toImpl(requestRef)->resourceRequest()));275 return WebKit::toAPI(WebKit::toImpl(contextRef)->download(0, WebKit::toImpl(requestRef)->resourceRequest())); 281 276 } 282 277 283 278 WKDownloadRef WKContextResumeDownload(WKContextRef contextRef, WKDataRef resumeData, WKStringRef path) 284 279 { 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))); 286 281 } 287 282 288 283 void WKContextSetInitializationUserDataForInjectedBundle(WKContextRef contextRef, WKTypeRef userDataRef) 289 284 { 290 toImpl(contextRef)->setInjectedBundleInitializationUserData(toImpl(userDataRef));285 WebKit::toImpl(contextRef)->setInjectedBundleInitializationUserData(WebKit::toImpl(userDataRef)); 291 286 } 292 287 293 288 void WKContextPostMessageToInjectedBundle(WKContextRef contextRef, WKStringRef messageNameRef, WKTypeRef messageBodyRef) 294 289 { 295 toImpl(contextRef)->postMessageToInjectedBundle(toImpl(messageNameRef)->string(),toImpl(messageBodyRef));290 WebKit::toImpl(contextRef)->postMessageToInjectedBundle(WebKit::toImpl(messageNameRef)->string(), WebKit::toImpl(messageBodyRef)); 296 291 } 297 292 298 293 void WKContextGetGlobalStatistics(WKContextStatistics* statistics) 299 294 { 300 const Web ProcessPool::Statistics& webContextStatistics =WebProcessPool::statistics();295 const WebKit::WebProcessPool::Statistics& webContextStatistics = WebKit::WebProcessPool::statistics(); 301 296 302 297 statistics->wkViewCount = webContextStatistics.wkViewCount; … … 307 302 void WKContextAddVisitedLink(WKContextRef contextRef, WKStringRef visitedURL) 308 303 { 309 String visitedURLString = toImpl(visitedURL)->string();304 String visitedURLString = WebKit::toImpl(visitedURL)->string(); 310 305 if (visitedURLString.isEmpty()) 311 306 return; 312 307 313 toImpl(contextRef)->visitedLinkStore().addVisitedLinkHash(computeSharedStringHash(visitedURLString));308 WebKit::toImpl(contextRef)->visitedLinkStore().addVisitedLinkHash(WebCore::computeSharedStringHash(visitedURLString)); 314 309 } 315 310 316 311 void WKContextClearVisitedLinks(WKContextRef contextRef) 317 312 { 318 toImpl(contextRef)->visitedLinkStore().removeAll();313 WebKit::toImpl(contextRef)->visitedLinkStore().removeAll(); 319 314 } 320 315 321 316 void WKContextSetCacheModel(WKContextRef contextRef, WKCacheModel cacheModel) 322 317 { 323 toImpl(contextRef)->setCacheModel(toCacheModel(cacheModel));318 WebKit::toImpl(contextRef)->setCacheModel(WebKit::toCacheModel(cacheModel)); 324 319 } 325 320 326 321 WKCacheModel WKContextGetCacheModel(WKContextRef contextRef) 327 322 { 328 return toAPI(toImpl(contextRef)->cacheModel());323 return WebKit::toAPI(WebKit::toImpl(contextRef)->cacheModel()); 329 324 } 330 325 331 326 void WKContextSetMaximumNumberOfProcesses(WKContextRef contextRef, unsigned numberOfProcesses) 332 327 { 333 toImpl(contextRef)->setMaximumNumberOfProcesses(numberOfProcesses);328 WebKit::toImpl(contextRef)->setMaximumNumberOfProcesses(numberOfProcesses); 334 329 } 335 330 336 331 unsigned WKContextGetMaximumNumberOfProcesses(WKContextRef contextRef) 337 332 { 338 return toImpl(contextRef)->maximumNumberOfProcesses();333 return WebKit::toImpl(contextRef)->maximumNumberOfProcesses(); 339 334 } 340 335 341 336 void WKContextSetAlwaysUsesComplexTextCodePath(WKContextRef contextRef, bool alwaysUseComplexTextCodePath) 342 337 { 343 toImpl(contextRef)->setAlwaysUsesComplexTextCodePath(alwaysUseComplexTextCodePath);338 WebKit::toImpl(contextRef)->setAlwaysUsesComplexTextCodePath(alwaysUseComplexTextCodePath); 344 339 } 345 340 346 341 void WKContextSetShouldUseFontSmoothing(WKContextRef contextRef, bool useFontSmoothing) 347 342 { 348 toImpl(contextRef)->setShouldUseFontSmoothing(useFontSmoothing);343 WebKit::toImpl(contextRef)->setShouldUseFontSmoothing(useFontSmoothing); 349 344 } 350 345 … … 352 347 { 353 348 #if ENABLE(NETSCAPE_PLUGIN_API) 354 toImpl(contextRef)->setAdditionalPluginsDirectory(toImpl(pluginsDirectory)->string());349 WebKit::toImpl(contextRef)->setAdditionalPluginsDirectory(WebKit::toImpl(pluginsDirectory)->string()); 355 350 #else 356 351 UNUSED_PARAM(contextRef); … … 362 357 { 363 358 #if ENABLE(NETSCAPE_PLUGIN_API) 364 toImpl(context)->refreshPlugins();359 WebKit::toImpl(context)->refreshPlugins(); 365 360 #else 366 361 UNUSED_PARAM(context); … … 370 365 void WKContextRegisterURLSchemeAsEmptyDocument(WKContextRef contextRef, WKStringRef urlScheme) 371 366 { 372 toImpl(contextRef)->registerURLSchemeAsEmptyDocument(toImpl(urlScheme)->string());367 WebKit::toImpl(contextRef)->registerURLSchemeAsEmptyDocument(WebKit::toImpl(urlScheme)->string()); 373 368 } 374 369 375 370 void WKContextRegisterURLSchemeAsSecure(WKContextRef contextRef, WKStringRef urlScheme) 376 371 { 377 toImpl(contextRef)->registerURLSchemeAsSecure(toImpl(urlScheme)->string());372 WebKit::toImpl(contextRef)->registerURLSchemeAsSecure(WebKit::toImpl(urlScheme)->string()); 378 373 } 379 374 380 375 void WKContextRegisterURLSchemeAsBypassingContentSecurityPolicy(WKContextRef contextRef, WKStringRef urlScheme) 381 376 { 382 toImpl(contextRef)->registerURLSchemeAsBypassingContentSecurityPolicy(toImpl(urlScheme)->string());377 WebKit::toImpl(contextRef)->registerURLSchemeAsBypassingContentSecurityPolicy(WebKit::toImpl(urlScheme)->string()); 383 378 } 384 379 385 380 void WKContextRegisterURLSchemeAsCachePartitioned(WKContextRef contextRef, WKStringRef urlScheme) 386 381 { 387 toImpl(contextRef)->registerURLSchemeAsCachePartitioned(toImpl(urlScheme)->string());382 WebKit::toImpl(contextRef)->registerURLSchemeAsCachePartitioned(WebKit::toImpl(urlScheme)->string()); 388 383 } 389 384 390 385 void WKContextRegisterURLSchemeAsCanDisplayOnlyIfCanRequest(WKContextRef contextRef, WKStringRef urlScheme) 391 386 { 392 toImpl(contextRef)->registerURLSchemeAsCanDisplayOnlyIfCanRequest(toImpl(urlScheme)->string());387 WebKit::toImpl(contextRef)->registerURLSchemeAsCanDisplayOnlyIfCanRequest(WebKit::toImpl(urlScheme)->string()); 393 388 } 394 389 395 390 void WKContextSetDomainRelaxationForbiddenForURLScheme(WKContextRef contextRef, WKStringRef urlScheme) 396 391 { 397 toImpl(contextRef)->setDomainRelaxationForbiddenForURLScheme(toImpl(urlScheme)->string());392 WebKit::toImpl(contextRef)->setDomainRelaxationForbiddenForURLScheme(WebKit::toImpl(urlScheme)->string()); 398 393 } 399 394 400 395 void WKContextSetCanHandleHTTPSServerTrustEvaluation(WKContextRef contextRef, bool value) 401 396 { 402 toImpl(contextRef)->setCanHandleHTTPSServerTrustEvaluation(value);397 WebKit::toImpl(contextRef)->setCanHandleHTTPSServerTrustEvaluation(value); 403 398 } 404 399 405 400 void WKContextSetPrewarmsProcessesAutomatically(WKContextRef contextRef, bool value) 406 401 { 407 toImpl(contextRef)->configuration().setIsAutomaticProcessWarmingEnabled(value);402 WebKit::toImpl(contextRef)->configuration().setIsAutomaticProcessWarmingEnabled(value); 408 403 } 409 404 410 405 void WKContextSetCustomWebContentServiceBundleIdentifier(WKContextRef contextRef, WKStringRef name) 411 406 { 412 toImpl(contextRef)->setCustomWebContentServiceBundleIdentifier(toImpl(name)->string());407 WebKit::toImpl(contextRef)->setCustomWebContentServiceBundleIdentifier(WebKit::toImpl(name)->string()); 413 408 } 414 409 415 410 void WKContextSetDiskCacheSpeculativeValidationEnabled(WKContextRef contextRef, bool value) 416 411 { 417 toImpl(contextRef)->configuration().setDiskCacheSpeculativeValidationEnabled(value);412 WebKit::toImpl(contextRef)->configuration().setDiskCacheSpeculativeValidationEnabled(value); 418 413 } 419 414 420 415 void WKContextPreconnectToServer(WKContextRef contextRef, WKURLRef serverURLRef) 421 416 { 422 toImpl(contextRef)->preconnectToServer(URL(URL(),toWTFString(serverURLRef)));417 WebKit::toImpl(contextRef)->preconnectToServer(URL(URL(), WebKit::toWTFString(serverURLRef))); 423 418 } 424 419 425 420 WKCookieManagerRef WKContextGetCookieManager(WKContextRef contextRef) 426 421 { 427 return toAPI(toImpl(contextRef)->supplement<WebCookieManagerProxy>());422 return WebKit::toAPI(WebKit::toImpl(contextRef)->supplement<WebKit::WebCookieManagerProxy>()); 428 423 } 429 424 430 425 WKWebsiteDataStoreRef WKContextGetWebsiteDataStore(WKContextRef context) 431 426 { 432 auto* dataStore = toImpl(context)->websiteDataStore();427 auto* dataStore = WebKit::toImpl(context)->websiteDataStore(); 433 428 if (!dataStore) { 434 429 auto defaultDataStore = API::WebsiteDataStore::defaultDataStore(); 435 toImpl(context)->setPrimaryDataStore(defaultDataStore.get());430 WebKit::toImpl(context)->setPrimaryDataStore(defaultDataStore.get()); 436 431 dataStore = defaultDataStore.ptr(); 437 432 } 438 433 439 return toAPI(dataStore);434 return WebKit::toAPI(dataStore); 440 435 } 441 436 … … 447 442 WKGeolocationManagerRef WKContextGetGeolocationManager(WKContextRef contextRef) 448 443 { 449 return toAPI(toImpl(contextRef)->supplement<WebGeolocationManagerProxy>());444 return WebKit::toAPI(WebKit::toImpl(contextRef)->supplement<WebKit::WebGeolocationManagerProxy>()); 450 445 } 451 446 … … 463 458 { 464 459 #if ENABLE(MEDIA_SESSION) 465 return toAPI(toImpl(context)->supplement<WebMediaSessionFocusManager>());460 return WebKit::toAPI(WebKit::toImpl(context)->supplement<WebKit::WebMediaSessionFocusManager>()); 466 461 #else 467 462 UNUSED_PARAM(context); … … 472 467 WKNotificationManagerRef WKContextGetNotificationManager(WKContextRef contextRef) 473 468 { 474 return toAPI(toImpl(contextRef)->supplement<WebNotificationManagerProxy>());469 return WebKit::toAPI(WebKit::toImpl(contextRef)->supplement<WebKit::WebNotificationManagerProxy>()); 475 470 } 476 471 … … 482 477 void WKContextStartMemorySampler(WKContextRef contextRef, WKDoubleRef interval) 483 478 { 484 toImpl(contextRef)->startMemorySampler(toImpl(interval)->value());479 WebKit::toImpl(contextRef)->startMemorySampler(WebKit::toImpl(interval)->value()); 485 480 } 486 481 487 482 void WKContextStopMemorySampler(WKContextRef contextRef) 488 483 { 489 toImpl(contextRef)->stopMemorySampler();484 WebKit::toImpl(contextRef)->stopMemorySampler(); 490 485 } 491 486 … … 496 491 void WKContextAllowSpecificHTTPSCertificateForHost(WKContextRef contextRef, WKCertificateInfoRef certificateRef, WKStringRef hostRef) 497 492 { 498 toImpl(contextRef)->allowSpecificHTTPSCertificateForHost(toImpl(certificateRef),toImpl(hostRef)->string());493 WebKit::toImpl(contextRef)->allowSpecificHTTPSCertificateForHost(WebKit::toImpl(certificateRef), WebKit::toImpl(hostRef)->string()); 499 494 } 500 495 501 496 void WKContextDisableProcessTermination(WKContextRef contextRef) 502 497 { 503 toImpl(contextRef)->disableProcessTermination();498 WebKit::toImpl(contextRef)->disableProcessTermination(); 504 499 } 505 500 506 501 void WKContextEnableProcessTermination(WKContextRef contextRef) 507 502 { 508 toImpl(contextRef)->enableProcessTermination();503 WebKit::toImpl(contextRef)->enableProcessTermination(); 509 504 } 510 505 511 506 void WKContextSetHTTPPipeliningEnabled(WKContextRef contextRef, bool enabled) 512 507 { 513 toImpl(contextRef)->setHTTPPipeliningEnabled(enabled);508 WebKit::toImpl(contextRef)->setHTTPPipeliningEnabled(enabled); 514 509 } 515 510 516 511 void WKContextWarmInitialProcess(WKContextRef contextRef) 517 512 { 518 toImpl(contextRef)->prewarmProcess(WebProcessPool::MayCreateDefaultDataStore::Yes);513 WebKit::toImpl(contextRef)->prewarmProcess(WebKit::WebProcessPool::MayCreateDefaultDataStore::Yes); 519 514 } 520 515 521 516 void WKContextGetStatistics(WKContextRef contextRef, void* context, WKContextGetStatisticsFunction callback) 522 517 { 523 toImpl(contextRef)->getStatistics(0xFFFFFFFF,toGenericCallbackFunction(context, callback));518 WebKit::toImpl(contextRef)->getStatistics(0xFFFFFFFF, WebKit::toGenericCallbackFunction(context, callback)); 524 519 } 525 520 526 521 void WKContextGetStatisticsWithOptions(WKContextRef contextRef, WKStatisticsOptions optionsMask, void* context, WKContextGetStatisticsFunction callback) 527 522 { 528 toImpl(contextRef)->getStatistics(optionsMask,toGenericCallbackFunction(context, callback));523 WebKit::toImpl(contextRef)->getStatistics(optionsMask, WebKit::toGenericCallbackFunction(context, callback)); 529 524 } 530 525 531 526 bool WKContextJavaScriptConfigurationFileEnabled(WKContextRef contextRef) 532 527 { 533 return toImpl(contextRef)->javaScriptConfigurationFileEnabled();528 return WebKit::toImpl(contextRef)->javaScriptConfigurationFileEnabled(); 534 529 } 535 530 536 531 void WKContextSetJavaScriptConfigurationFileEnabled(WKContextRef contextRef, bool enable) 537 532 { 538 toImpl(contextRef)->setJavaScriptConfigurationFileEnabled(enable);533 WebKit::toImpl(contextRef)->setJavaScriptConfigurationFileEnabled(enable); 539 534 } 540 535 541 536 void WKContextGarbageCollectJavaScriptObjects(WKContextRef contextRef) 542 537 { 543 toImpl(contextRef)->garbageCollectJavaScriptObjects();538 WebKit::toImpl(contextRef)->garbageCollectJavaScriptObjects(); 544 539 } 545 540 546 541 void WKContextSetJavaScriptGarbageCollectorTimerEnabled(WKContextRef contextRef, bool enable) 547 542 { 548 toImpl(contextRef)->setJavaScriptGarbageCollectorTimerEnabled(enable);543 WebKit::toImpl(contextRef)->setJavaScriptGarbageCollectorTimerEnabled(enable); 549 544 } 550 545 551 546 void WKContextUseTestingNetworkSession(WKContextRef context) 552 547 { 553 toImpl(context)->useTestingNetworkSession();548 WebKit::toImpl(context)->useTestingNetworkSession(); 554 549 } 555 550 556 551 void WKContextSetAllowsAnySSLCertificateForWebSocketTesting(WKContextRef context, bool allows) 557 552 { 558 toImpl(context)->setAllowsAnySSLCertificateForWebSocket(allows);553 WebKit::toImpl(context)->setAllowsAnySSLCertificateForWebSocket(allows); 559 554 } 560 555 … … 562 557 { 563 558 #if ENABLE(SERVICE_WORKER) 564 toImpl(context)->setAllowsAnySSLCertificateForServiceWorker(allows);559 WebKit::toImpl(context)->setAllowsAnySSLCertificateForServiceWorker(allows); 565 560 #endif 566 561 } … … 568 563 void WKContextClearCachedCredentials(WKContextRef context) 569 564 { 570 toImpl(context)->clearCachedCredentials();565 WebKit::toImpl(context)->clearCachedCredentials(); 571 566 } 572 567 573 568 WKDictionaryRef WKContextCopyPlugInAutoStartOriginHashes(WKContextRef contextRef) 574 569 { 575 return toAPI(&toImpl(contextRef)->plugInAutoStartOriginHashes().leakRef());570 return WebKit::toAPI(&WebKit::toImpl(contextRef)->plugInAutoStartOriginHashes().leakRef()); 576 571 } 577 572 … … 580 575 if (!dictionaryRef) 581 576 return; 582 toImpl(contextRef)->setPlugInAutoStartOriginHashes(*toImpl(dictionaryRef));577 WebKit::toImpl(contextRef)->setPlugInAutoStartOriginHashes(*WebKit::toImpl(dictionaryRef)); 583 578 } 584 579 … … 587 582 if (!dictionaryRef) 588 583 return; 589 toImpl(contextRef)->setPlugInAutoStartOriginsFilteringOutEntriesAddedAfterTime(*toImpl(dictionaryRef), WallTime::fromRawSeconds(time));584 WebKit::toImpl(contextRef)->setPlugInAutoStartOriginsFilteringOutEntriesAddedAfterTime(*WebKit::toImpl(dictionaryRef), WallTime::fromRawSeconds(time)); 590 585 } 591 586 … … 594 589 if (!arrayRef) 595 590 return; 596 toImpl(contextRef)->setPlugInAutoStartOrigins(*toImpl(arrayRef));591 WebKit::toImpl(contextRef)->setPlugInAutoStartOrigins(*WebKit::toImpl(arrayRef)); 597 592 } 598 593 599 594 void WKContextSetInvalidMessageFunction(WKContextInvalidMessageFunction invalidMessageFunction) 600 595 { 601 Web ProcessPool::setInvalidMessageCallback(invalidMessageFunction);596 WebKit::WebProcessPool::setInvalidMessageCallback(invalidMessageFunction); 602 597 } 603 598 604 599 void WKContextSetMemoryCacheDisabled(WKContextRef contextRef, bool disabled) 605 600 { 606 toImpl(contextRef)->setMemoryCacheDisabled(disabled);601 WebKit::toImpl(contextRef)->setMemoryCacheDisabled(disabled); 607 602 } 608 603 609 604 void WKContextSetFontWhitelist(WKContextRef contextRef, WKArrayRef arrayRef) 610 605 { 611 toImpl(contextRef)->setFontWhitelist(toImpl(arrayRef));606 WebKit::toImpl(contextRef)->setFontWhitelist(WebKit::toImpl(arrayRef)); 612 607 } 613 608 614 609 void WKContextTerminateNetworkProcess(WKContextRef context) 615 610 { 616 toImpl(context)->terminateNetworkProcess();611 WebKit::toImpl(context)->terminateNetworkProcess(); 617 612 } 618 613 619 614 void WKContextTerminateServiceWorkerProcess(WKContextRef context) 620 615 { 621 toImpl(context)->terminateServiceWorkerProcesses();616 WebKit::toImpl(context)->terminateServiceWorkerProcesses(); 622 617 } 623 618 624 619 ProcessID WKContextGetNetworkProcessIdentifier(WKContextRef contextRef) 625 620 { 626 return toImpl(contextRef)->networkProcessIdentifier();621 return WebKit::toImpl(contextRef)->networkProcessIdentifier(); 627 622 } 628 623 … … 635 630 size_t count = WKArrayGetSize(mimeTypesRef); 636 631 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)))); 638 633 count = WKArrayGetSize(extensionsRef); 639 634 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)); 643 638 #endif 644 639 } … … 647 642 { 648 643 #if ENABLE(NETSCAPE_PLUGIN_API) 649 toImpl(contextRef)->clearSupportedPlugins();644 WebKit::toImpl(contextRef)->clearSupportedPlugins(); 650 645 #endif 651 646 } … … 653 648 void WKContextSetIDBPerOriginQuota(WKContextRef contextRef, uint64_t quota) 654 649 { 655 toImpl(contextRef)->setIDBPerOriginQuota(quota);656 } 650 WebKit::toImpl(contextRef)->setIDBPerOriginQuota(quota); 651 } -
trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp
r239072 r239258 98 98 #endif 99 99 100 namespace API { 100 101 using namespace WebCore; 101 102 using namespace WebKit; 102 103 namespace API { 103 104 104 template<> struct ClientTraits<WKPageLoaderClientBase> { 105 105 typedef std::tuple<WKPageLoaderClientV0, WKPageLoaderClientV1, WKPageLoaderClientV2, WKPageLoaderClientV3, WKPageLoaderClientV4, WKPageLoaderClientV5, WKPageLoaderClientV6> Versions; … … 131 131 typedef std::tuple<WKPageFindMatchesClientV0> Versions; 132 132 }; 133 134 } 133 134 } // namespace API 135 135 136 136 WKTypeID WKPageGetTypeID() … … 161 161 void WKPageLoadURLWithShouldOpenExternalURLsPolicy(WKPageRef pageRef, WKURLRef URLRef, bool shouldOpenExternalURLs) 162 162 { 163 ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy = shouldOpenExternalURLs ? ShouldOpenExternalURLsPolicy::ShouldAllow :ShouldOpenExternalURLsPolicy::ShouldNotAllow;163 WebCore::ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy = shouldOpenExternalURLs ? WebCore::ShouldOpenExternalURLsPolicy::ShouldAllow : WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow; 164 164 toImpl(pageRef)->loadRequest(URL(URL(), toWTFString(URLRef)), shouldOpenExternalURLsPolicy); 165 165 } … … 167 167 void WKPageLoadURLWithUserData(WKPageRef pageRef, WKURLRef URLRef, WKTypeRef userDataRef) 168 168 { 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)); 170 170 } 171 171 … … 179 179 { 180 180 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)); 182 182 } 183 183 … … 692 692 void WKPageSetPaginationMode(WKPageRef pageRef, WKPaginationMode paginationMode) 693 693 { 694 Pagination::Mode mode;694 WebCore::Pagination::Mode mode; 695 695 switch (paginationMode) { 696 696 case kWKPaginationModeUnpaginated: 697 mode = Pagination::Unpaginated;697 mode = WebCore::Pagination::Unpaginated; 698 698 break; 699 699 case kWKPaginationModeLeftToRight: 700 mode = Pagination::LeftToRightPaginated;700 mode = WebCore::Pagination::LeftToRightPaginated; 701 701 break; 702 702 case kWKPaginationModeRightToLeft: 703 mode = Pagination::RightToLeftPaginated;703 mode = WebCore::Pagination::RightToLeftPaginated; 704 704 break; 705 705 case kWKPaginationModeTopToBottom: 706 mode = Pagination::TopToBottomPaginated;706 mode = WebCore::Pagination::TopToBottomPaginated; 707 707 break; 708 708 case kWKPaginationModeBottomToTop: 709 mode = Pagination::BottomToTopPaginated;709 mode = WebCore::Pagination::BottomToTopPaginated; 710 710 break; 711 711 default: … … 718 718 { 719 719 switch (toImpl(pageRef)->paginationMode()) { 720 case Pagination::Unpaginated:720 case WebCore::Pagination::Unpaginated: 721 721 return kWKPaginationModeUnpaginated; 722 case Pagination::LeftToRightPaginated:722 case WebCore::Pagination::LeftToRightPaginated: 723 723 return kWKPaginationModeLeftToRight; 724 case Pagination::RightToLeftPaginated:724 case WebCore::Pagination::RightToLeftPaginated: 725 725 return kWKPaginationModeRightToLeft; 726 case Pagination::TopToBottomPaginated:726 case WebCore::Pagination::TopToBottomPaginated: 727 727 return kWKPaginationModeTopToBottom; 728 case Pagination::BottomToTopPaginated:728 case WebCore::Pagination::BottomToTopPaginated: 729 729 return kWKPaginationModeBottomToTop; 730 730 } … … 1108 1108 } 1109 1109 1110 void didFailProvisionalLoadWithErrorForFrame(WebPageProxy& page, WebFrameProxy& frame, API::Navigation*, const ResourceError& error, API::Object* userData) override1110 void didFailProvisionalLoadWithErrorForFrame(WebPageProxy& page, WebFrameProxy& frame, API::Navigation*, const WebCore::ResourceError& error, API::Object* userData) override 1111 1111 { 1112 1112 if (!m_client.didFailProvisionalLoadWithErrorForFrame) … … 1124 1124 } 1125 1125 1126 void didFailLoadWithErrorForFrame(WebPageProxy& page, WebFrameProxy& frame, API::Navigation*, const ResourceError& error, API::Object* userData) override1126 void didFailLoadWithErrorForFrame(WebPageProxy& page, WebFrameProxy& frame, API::Navigation*, const WebCore::ResourceError& error, API::Object* userData) override 1127 1127 { 1128 1128 if (!m_client.didFailLoadWithErrorForFrame) … … 1231 1231 } 1232 1232 1233 void decidePolicyForNewWindowAction(WebPageProxy& page, WebFrameProxy& frame, const NavigationActionData& navigationActionData, const ResourceRequest& resourceRequest, const String& frameName, Ref<WebFramePolicyListenerProxy>&& listener, API::Object* userData) override1233 void decidePolicyForNewWindowAction(WebPageProxy& page, WebFrameProxy& frame, const NavigationActionData& navigationActionData, const WebCore::ResourceRequest& resourceRequest, const String& frameName, Ref<WebFramePolicyListenerProxy>&& listener, API::Object* userData) override 1234 1234 { 1235 1235 if (!m_client.decidePolicyForNewWindowAction) { … … 1243 1243 } 1244 1244 1245 void decidePolicyForResponse(WebPageProxy& page, WebFrameProxy& frame, const ResourceResponse& resourceResponse, constResourceRequest& resourceRequest, bool canShowMIMEType, Ref<WebFramePolicyListenerProxy>&& listener, API::Object* userData) override1245 void decidePolicyForResponse(WebPageProxy& page, WebFrameProxy& frame, const WebCore::ResourceResponse& resourceResponse, const WebCore::ResourceRequest& resourceRequest, bool canShowMIMEType, Ref<WebFramePolicyListenerProxy>&& listener, API::Object* userData) override 1246 1246 { 1247 1247 if (!m_client.decidePolicyForResponse_deprecatedForUseWithV0 && !m_client.decidePolicyForResponse) { … … 1259 1259 } 1260 1260 1261 void unableToImplementPolicy(WebPageProxy& page, WebFrameProxy& frame, const ResourceError& error, API::Object* userData) override1261 void unableToImplementPolicy(WebPageProxy& page, WebFrameProxy& frame, const WebCore::ResourceError& error, API::Object* userData) override 1262 1262 { 1263 1263 if (!m_client.unableToImplementPolicy) … … 1272 1272 1273 1273 namespace WebKit { 1274 1274 using namespace WebCore; 1275 1275 1276 class RunBeforeUnloadConfirmPanelResultListener : public API::ObjectImpl<API::Object::Type::RunBeforeUnloadConfirmPanelResultListener> { 1276 1277 public: … … 2700 2701 } 2701 2702 #endif 2703 -
trunk/Source/WebKit/UIProcess/API/C/cg/WKIconDatabaseCG.cpp
r239072 r239258 32 32 33 33 using namespace WebKit; 34 using namespace WebCore;35 34 36 35 CGImageRef WKIconDatabaseTryGetCGImageForURL(WKIconDatabaseRef, WKURLRef, WKSize) … … 43 42 return nullptr; 44 43 } 44
Note: See TracChangeset
for help on using the changeset viewer.