Commit b12b8b28 authored by andersca@apple.com's avatar andersca@apple.com

Replace uses of WebKit::APIClient with API::Client

https://bugs.webkit.org/show_bug.cgi?id=125129

Reviewed by Andreas Kling.

* Shared/API/c/WKConnectionRef.cpp:
(WKConnectionSetConnectionClient):
* Shared/WebConnection.cpp:
(WebKit::WebConnection::initializeConnectionClient):
* Shared/WebConnection.h:
* Shared/WebConnectionClient.cpp:
(WebKit::WebConnectionClient::didReceiveMessage):
(WebKit::WebConnectionClient::didClose):
* Shared/WebConnectionClient.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextSetClient):
(WKContextSetInjectedBundleClient):
(WKContextSetHistoryClient):
(WKContextSetDownloadClient):
(WKContextSetConnectionClient):
* UIProcess/API/C/WKCookieManager.cpp:
(WKCookieManagerSetClient):
* UIProcess/API/C/WKDatabaseManager.cpp:
(WKDatabaseManagerSetClient):
* UIProcess/API/C/WKGeolocationManager.cpp:
(WKGeolocationManagerSetProvider):
* UIProcess/API/C/WKIconDatabase.cpp:
(WKIconDatabaseSetIconDatabaseClient):
* UIProcess/API/C/WKNotificationManager.cpp:
(WKNotificationManagerSetProvider):
* UIProcess/API/C/WKOriginDataManager.cpp:
(WKOriginDataManagerSetChangeClient):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageContextMenuClient):
(WKPageSetPageFindClient):
(WKPageSetPageFindMatchesClient):
(WKPageSetPageFormClient):
(WKPageSetPagePolicyClient):
(WKPageSetPageUIClient):
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(setUpPagePolicyClient):
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::initializeProvider):
* UIProcess/Notifications/WebNotificationManagerProxy.h:
* UIProcess/Notifications/WebNotificationProvider.cpp:
(WebKit::WebNotificationProvider::show):
(WebKit::WebNotificationProvider::cancel):
(WebKit::WebNotificationProvider::didDestroyNotification):
(WebKit::WebNotificationProvider::clearNotifications):
(WebKit::WebNotificationProvider::addNotificationManager):
(WebKit::WebNotificationProvider::removeNotificationManager):
(WebKit::WebNotificationProvider::notificationPermissions):
* UIProcess/Notifications/WebNotificationProvider.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::initializeClient):
(WebKit::WebContext::initializeInjectedBundleClient):
(WebKit::WebContext::initializeConnectionClient):
(WebKit::WebContext::initializeHistoryClient):
(WebKit::WebContext::initializeDownloadClient):
* UIProcess/WebContext.h:
* UIProcess/WebContextClient.cpp:
(WebKit::WebContextClient::plugInAutoStartOriginHashesChanged):
(WebKit::WebContextClient::networkProcessDidCrash):
(WebKit::WebContextClient::plugInInformationBecameAvailable):
* UIProcess/WebContextClient.h:
* UIProcess/WebContextConnectionClient.cpp:
(WebKit::WebContextConnectionClient::didCreateConnection):
* UIProcess/WebContextConnectionClient.h:
* UIProcess/WebContextInjectedBundleClient.cpp:
(WebKit::WebContextInjectedBundleClient::didReceiveMessageFromInjectedBundle):
(WebKit::WebContextInjectedBundleClient::didReceiveSynchronousMessageFromInjectedBundle):
(WebKit::WebContextInjectedBundleClient::getInjectedBundleInitializationUserData):
* UIProcess/WebContextInjectedBundleClient.h:
* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::initializeClient):
* UIProcess/WebCookieManagerProxy.h:
* UIProcess/WebCookieManagerProxyClient.cpp:
(WebKit::WebCookieManagerProxyClient::cookiesDidChange):
* UIProcess/WebCookieManagerProxyClient.h:
* UIProcess/WebDatabaseManagerProxy.cpp:
(WebKit::WebDatabaseManagerProxy::initializeClient):
* UIProcess/WebDatabaseManagerProxy.h:
* UIProcess/WebDatabaseManagerProxyClient.cpp:
(WebKit::WebDatabaseManagerProxyClient::didModifyOrigin):
(WebKit::WebDatabaseManagerProxyClient::didModifyDatabase):
* UIProcess/WebDatabaseManagerProxyClient.h:
* UIProcess/WebDownloadClient.cpp:
(WebKit::WebDownloadClient::didStart):
(WebKit::WebDownloadClient::didReceiveAuthenticationChallenge):
(WebKit::WebDownloadClient::didReceiveResponse):
(WebKit::WebDownloadClient::didReceiveData):
(WebKit::WebDownloadClient::shouldDecodeSourceDataOfMIMEType):
(WebKit::WebDownloadClient::decideDestinationWithSuggestedFilename):
(WebKit::WebDownloadClient::didCreateDestination):
(WebKit::WebDownloadClient::didFinish):
(WebKit::WebDownloadClient::didFail):
(WebKit::WebDownloadClient::didCancel):
(WebKit::WebDownloadClient::processDidCrash):
* UIProcess/WebDownloadClient.h:
* UIProcess/WebFindClient.cpp:
(WebKit::WebFindClient::didFindString):
(WebKit::WebFindClient::didFailToFindString):
(WebKit::WebFindClient::didCountStringMatches):
(WebKit::WebFindMatchesClient::didFindStringMatches):
(WebKit::WebFindMatchesClient::didGetImageForMatchResult):
* UIProcess/WebFindClient.h:
* UIProcess/WebFormClient.cpp:
(WebKit::WebFormClient::willSubmitForm):
* UIProcess/WebFormClient.h:
* UIProcess/WebGeolocationManagerProxy.cpp:
(WebKit::WebGeolocationManagerProxy::initializeProvider):
* UIProcess/WebGeolocationManagerProxy.h:
* UIProcess/WebGeolocationProvider.cpp:
(WebKit::WebGeolocationProvider::startUpdating):
(WebKit::WebGeolocationProvider::stopUpdating):
(WebKit::WebGeolocationProvider::setEnableHighAccuracy):
* UIProcess/WebGeolocationProvider.h:
* UIProcess/WebHistoryClient.cpp:
(WebKit::WebHistoryClient::didNavigateWithNavigationData):
(WebKit::WebHistoryClient::didPerformClientRedirect):
(WebKit::WebHistoryClient::didPerformServerRedirect):
(WebKit::WebHistoryClient::didUpdateHistoryTitle):
(WebKit::WebHistoryClient::populateVisitedLinks):
* UIProcess/WebHistoryClient.h:
* UIProcess/WebIconDatabase.cpp:
(WebKit::WebIconDatabase::initializeIconDatabaseClient):
* UIProcess/WebIconDatabase.h:
* UIProcess/WebIconDatabaseClient.cpp:
(WebKit::WebIconDatabaseClient::didChangeIconForPageURL):
(WebKit::WebIconDatabaseClient::didRemoveAllIcons):
(WebKit::WebIconDatabaseClient::iconDataReadyForPageURL):
* UIProcess/WebIconDatabaseClient.h:
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::createInspectorPage):
* UIProcess/WebLoaderClient.h:
* UIProcess/WebOriginDataManagerProxy.cpp:
(WebKit::WebOriginDataManagerProxy::setChangeClient):
* UIProcess/WebOriginDataManagerProxy.h:
* UIProcess/WebOriginDataManagerProxyChangeClient.cpp:
(WebKit::WebOriginDataManagerProxyChangeClient::didChange):
* UIProcess/WebOriginDataManagerProxyChangeClient.h:
* UIProcess/WebPageContextMenuClient.cpp:
(WebKit::WebPageContextMenuClient::getContextMenuFromProposedMenu):
(WebKit::WebPageContextMenuClient::customContextMenuItemSelected):
(WebKit::WebPageContextMenuClient::contextMenuDismissed):
(WebKit::WebPageContextMenuClient::showContextMenu):
(WebKit::WebPageContextMenuClient::hideContextMenu):
* UIProcess/WebPageContextMenuClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::initializePolicyClient):
(WebKit::WebPageProxy::initializeFormClient):
(WebKit::WebPageProxy::initializeUIClient):
(WebKit::WebPageProxy::initializeFindClient):
(WebKit::WebPageProxy::initializeFindMatchesClient):
(WebKit::WebPageProxy::initializeContextMenuClient):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPolicyClient.cpp:
(WebKit::WebPolicyClient::decidePolicyForNavigationAction):
(WebKit::WebPolicyClient::decidePolicyForNewWindowAction):
(WebKit::WebPolicyClient::decidePolicyForResponse):
(WebKit::WebPolicyClient::unableToImplementPolicy):
* UIProcess/WebPolicyClient.h:
* UIProcess/WebUIClient.cpp:
(WebKit::WebUIClient::createNewPage):
(WebKit::WebUIClient::showPage):
(WebKit::WebUIClient::close):
(WebKit::WebUIClient::takeFocus):
(WebKit::WebUIClient::focus):
(WebKit::WebUIClient::unfocus):
(WebKit::WebUIClient::runJavaScriptAlert):
(WebKit::WebUIClient::runJavaScriptConfirm):
(WebKit::WebUIClient::runJavaScriptPrompt):
(WebKit::WebUIClient::setStatusText):
(WebKit::WebUIClient::mouseDidMoveOverElement):
(WebKit::WebUIClient::unavailablePluginButtonClicked):
(WebKit::WebUIClient::didNotHandleKeyEvent):
(WebKit::WebUIClient::didNotHandleWheelEvent):
(WebKit::WebUIClient::toolbarsAreVisible):
(WebKit::WebUIClient::setToolbarsAreVisible):
(WebKit::WebUIClient::menuBarIsVisible):
(WebKit::WebUIClient::setMenuBarIsVisible):
(WebKit::WebUIClient::statusBarIsVisible):
(WebKit::WebUIClient::setStatusBarIsVisible):
(WebKit::WebUIClient::isResizable):
(WebKit::WebUIClient::setIsResizable):
(WebKit::WebUIClient::setWindowFrame):
(WebKit::WebUIClient::windowFrame):
(WebKit::WebUIClient::runBeforeUnloadConfirmPanel):
(WebKit::WebUIClient::didDraw):
(WebKit::WebUIClient::pageDidScroll):
(WebKit::WebUIClient::exceededDatabaseQuota):
(WebKit::WebUIClient::runOpenPanel):
(WebKit::WebUIClient::decidePolicyForGeolocationPermissionRequest):
(WebKit::WebUIClient::decidePolicyForNotificationPermissionRequest):
(WebKit::WebUIClient::headerHeight):
(WebKit::WebUIClient::footerHeight):
(WebKit::WebUIClient::drawHeader):
(WebKit::WebUIClient::drawFooter):
(WebKit::WebUIClient::printFrame):
(WebKit::WebUIClient::runModal):
(WebKit::WebUIClient::saveDataToFileInDownloadsFolder):
(WebKit::WebUIClient::shouldInterruptJavaScript):
(WebKit::WebUIClient::showColorPicker):
(WebKit::WebUIClient::hideColorPicker):
* UIProcess/WebUIClient.h:
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetClient):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetContextMenuClient):
(WKBundlePageSetEditorClient):
(WKBundlePageSetFormClient):
(WKBundlePageSetPageLoaderClient):
(WKBundlePageSetResourceLoadClient):
(WKBundlePageSetPolicyClient):
(WKBundlePageSetUIClient):
(WKBundlePageSetFullScreenClient):
(WKBundlePageSetDiagnosticLoggingClient):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::initializeClient):
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/InjectedBundle/InjectedBundleClient.cpp:
(WebKit::InjectedBundleClient::didCreatePage):
(WebKit::InjectedBundleClient::willDestroyPage):
(WebKit::InjectedBundleClient::didInitializePageGroup):
(WebKit::InjectedBundleClient::didReceiveMessage):
(WebKit::InjectedBundleClient::didReceiveMessageToPage):
* WebProcess/InjectedBundle/InjectedBundleClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
(WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp:
(WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessage):
* WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
(WebKit::InjectedBundlePageEditorClient::shouldBeginEditing):
(WebKit::InjectedBundlePageEditorClient::shouldEndEditing):
(WebKit::InjectedBundlePageEditorClient::shouldInsertNode):
(WebKit::InjectedBundlePageEditorClient::shouldInsertText):
(WebKit::InjectedBundlePageEditorClient::shouldDeleteRange):
(WebKit::InjectedBundlePageEditorClient::shouldChangeSelectedRange):
(WebKit::InjectedBundlePageEditorClient::shouldApplyStyle):
(WebKit::InjectedBundlePageEditorClient::didBeginEditing):
(WebKit::InjectedBundlePageEditorClient::didEndEditing):
(WebKit::InjectedBundlePageEditorClient::didChange):
(WebKit::InjectedBundlePageEditorClient::didChangeSelection):
(WebKit::InjectedBundlePageEditorClient::willWriteToPasteboard):
(WebKit::InjectedBundlePageEditorClient::getPasteboardDataForRange):
(WebKit::InjectedBundlePageEditorClient::didWriteToPasteboard):
* WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
(WebKit::InjectedBundlePageFormClient::didFocusTextField):
(WebKit::InjectedBundlePageFormClient::textFieldDidBeginEditing):
(WebKit::InjectedBundlePageFormClient::textFieldDidEndEditing):
(WebKit::InjectedBundlePageFormClient::textDidChangeInTextField):
(WebKit::InjectedBundlePageFormClient::textDidChangeInTextArea):
(WebKit::InjectedBundlePageFormClient::shouldPerformActionInTextField):
(WebKit::InjectedBundlePageFormClient::willSendSubmitEvent):
(WebKit::InjectedBundlePageFormClient::willSubmitForm):
(WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
(WebKit::InjectedBundlePageFormClient::shouldNotifyOnFormChanges):
* WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::willLoadURLRequest):
(WebKit::InjectedBundlePageLoaderClient::willLoadDataRequest):
(WebKit::InjectedBundlePageLoaderClient::shouldGoToBackForwardListItem):
(WebKit::InjectedBundlePageLoaderClient::didStartProvisionalLoadForFrame):
(WebKit::InjectedBundlePageLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::InjectedBundlePageLoaderClient::didFailProvisionalLoadWithErrorForFrame):
(WebKit::InjectedBundlePageLoaderClient::didCommitLoadForFrame):
(WebKit::InjectedBundlePageLoaderClient::didFinishDocumentLoadForFrame):
(WebKit::InjectedBundlePageLoaderClient::didFinishLoadForFrame):
(WebKit::InjectedBundlePageLoaderClient::didFinishProgress):
(WebKit::InjectedBundlePageLoaderClient::didFailLoadWithErrorForFrame):
(WebKit::InjectedBundlePageLoaderClient::didSameDocumentNavigationForFrame):
(WebKit::InjectedBundlePageLoaderClient::didReceiveTitleForFrame):
(WebKit::InjectedBundlePageLoaderClient::didRemoveFrameFromHierarchy):
(WebKit::InjectedBundlePageLoaderClient::didDisplayInsecureContentForFrame):
(WebKit::InjectedBundlePageLoaderClient::didRunInsecureContentForFrame):
(WebKit::InjectedBundlePageLoaderClient::didDetectXSSForFrame):
(WebKit::InjectedBundlePageLoaderClient::didFirstLayoutForFrame):
(WebKit::InjectedBundlePageLoaderClient::didFirstVisuallyNonEmptyLayoutForFrame):
(WebKit::InjectedBundlePageLoaderClient::didLayoutForFrame):
(WebKit::InjectedBundlePageLoaderClient::didLayout):
(WebKit::InjectedBundlePageLoaderClient::didClearWindowObjectForFrame):
(WebKit::InjectedBundlePageLoaderClient::didCancelClientRedirectForFrame):
(WebKit::InjectedBundlePageLoaderClient::willPerformClientRedirectForFrame):
(WebKit::InjectedBundlePageLoaderClient::didHandleOnloadEventsForFrame):
(WebKit::InjectedBundlePageLoaderClient::globalObjectIsAvailableForFrame):
(WebKit::InjectedBundlePageLoaderClient::willDisconnectDOMWindowExtensionFromGlobalObject):
(WebKit::InjectedBundlePageLoaderClient::didReconnectDOMWindowExtensionToGlobalObject):
(WebKit::InjectedBundlePageLoaderClient::willDestroyGlobalObjectForDOMWindowExtension):
(WebKit::InjectedBundlePageLoaderClient::shouldForceUniversalAccessFromLocalURL):
(WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
(WebKit::InjectedBundlePageLoaderClient::willDestroyFrame):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
* WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
(WebKit::InjectedBundlePagePolicyClient::decidePolicyForNavigationAction):
(WebKit::InjectedBundlePagePolicyClient::decidePolicyForNewWindowAction):
(WebKit::InjectedBundlePagePolicyClient::decidePolicyForResponse):
(WebKit::InjectedBundlePagePolicyClient::unableToImplementPolicy):
* WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
(WebKit::InjectedBundlePageResourceLoadClient::didInitiateLoadForResource):
(WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame):
(WebKit::InjectedBundlePageResourceLoadClient::didReceiveResponseForResource):
(WebKit::InjectedBundlePageResourceLoadClient::didReceiveContentLengthForResource):
(WebKit::InjectedBundlePageResourceLoadClient::didFinishLoadForResource):
(WebKit::InjectedBundlePageResourceLoadClient::didFailLoadForResource):
(WebKit::InjectedBundlePageResourceLoadClient::shouldCacheResponse):
(WebKit::InjectedBundlePageResourceLoadClient::shouldUseCredentialStorage):
* WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
(WebKit::InjectedBundlePageUIClient::willAddMessageToConsole):
(WebKit::InjectedBundlePageUIClient::willSetStatusbarText):
(WebKit::InjectedBundlePageUIClient::willRunJavaScriptAlert):
(WebKit::InjectedBundlePageUIClient::willRunJavaScriptConfirm):
(WebKit::InjectedBundlePageUIClient::willRunJavaScriptPrompt):
(WebKit::InjectedBundlePageUIClient::mouseDidMoveOverElement):
(WebKit::InjectedBundlePageUIClient::pageDidScroll):
(WebKit::InjectedBundlePageUIClient::shouldGenerateFileForUpload):
(WebKit::InjectedBundlePageUIClient::generateFileForUpload):
(WebKit::InjectedBundlePageUIClient::statusBarIsVisible):
(WebKit::InjectedBundlePageUIClient::menuBarIsVisible):
(WebKit::InjectedBundlePageUIClient::toolbarsAreVisible):
(WebKit::InjectedBundlePageUIClient::didReachApplicationCacheOriginQuota):
(WebKit::InjectedBundlePageUIClient::didExceedDatabaseQuota):
(WebKit::InjectedBundlePageUIClient::plugInStartLabelTitle):
(WebKit::InjectedBundlePageUIClient::plugInStartLabelSubtitle):
(WebKit::InjectedBundlePageUIClient::plugInExtraStyleSheet):
(WebKit::InjectedBundlePageUIClient::plugInExtraScript):
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::initializeInjectedBundleContextMenuClient):
(WebKit::WebPage::initializeInjectedBundleEditorClient):
(WebKit::WebPage::initializeInjectedBundleFormClient):
(WebKit::WebPage::initializeInjectedBundleLoaderClient):
(WebKit::WebPage::initializeInjectedBundlePolicyClient):
(WebKit::WebPage::initializeInjectedBundleResourceLoadClient):
(WebKit::WebPage::initializeInjectedBundleUIClient):
(WebKit::WebPage::initializeInjectedBundleFullScreenClient):
(WebKit::WebPage::initializeInjectedBundleDiagnosticLoggingClient):
* WebProcess/WebPage/WebPage.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159988 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 10190c45
This diff is collapsed.
......@@ -38,7 +38,7 @@ WKTypeID WKConnectionGetTypeID()
void WKConnectionSetConnectionClient(WKConnectionRef connectionRef, const WKConnectionClient* wkClient)
{
toImpl(connectionRef)->initializeConnectionClient(wkClient);
toImpl(connectionRef)->initializeConnectionClient(reinterpret_cast<const WKConnectionClientBase*>(wkClient));
}
void WKConnectionPostMessage(WKConnectionRef connectionRef, WKStringRef messageNameRef, WKTypeRef messageBodyRef)
......
......@@ -41,7 +41,7 @@ WebConnection::~WebConnection()
{
}
void WebConnection::initializeConnectionClient(const WKConnectionClient* client)
void WebConnection::initializeConnectionClient(const WKConnectionClientBase* client)
{
m_client.initialize(client);
}
......
......@@ -38,7 +38,7 @@ class WebConnection : public API::TypedObject<API::Object::Type::Connection>, pu
public:
virtual ~WebConnection();
void initializeConnectionClient(const WKConnectionClient*);
void initializeConnectionClient(const WKConnectionClientBase*);
void postMessage(const String&, API::Object*);
void didClose();
......
......@@ -37,7 +37,7 @@ void WebConnectionClient::didReceiveMessage(WebConnection* connection, const Str
if (!m_client.didReceiveMessage)
return;
m_client.didReceiveMessage(toAPI(connection), toAPI(messageName.impl()), toAPI(messageBody), m_client.clientInfo);
m_client.didReceiveMessage(toAPI(connection), toAPI(messageName.impl()), toAPI(messageBody), m_client.base.clientInfo);
}
void WebConnectionClient::didClose(WebConnection* connection)
......@@ -45,7 +45,7 @@ void WebConnectionClient::didClose(WebConnection* connection)
if (!m_client.didClose)
return;
m_client.didClose(toAPI(connection), m_client.clientInfo);
m_client.didClose(toAPI(connection), m_client.base.clientInfo);
}
} // namespace WebKit
......@@ -30,6 +30,10 @@
#include "WKConnectionRef.h"
#include <wtf/Forward.h>
template<> struct API::ClientTraits<WKConnectionClientBase> {
typedef std::tuple<WKConnectionClientV0> Versions;
};
namespace API {
class Object;
}
......@@ -38,7 +42,7 @@ namespace WebKit {
class WebConnection;
class WebConnectionClient : public APIClient<WKConnectionClient, WKConnectionClientCurrentVersion> {
class WebConnectionClient : public API::Client<WKConnectionClientBase> {
public:
void didReceiveMessage(WebConnection*, const String&, API::Object*);
void didClose(WebConnection*);
......
......@@ -82,27 +82,27 @@ WKContextRef WKContextCreateWithInjectedBundlePath(WKStringRef pathRef)
void WKContextSetClient(WKContextRef contextRef, const WKContextClient* wkClient)
{
toImpl(contextRef)->initializeClient(wkClient);
toImpl(contextRef)->initializeClient(reinterpret_cast<const WKContextClientBase*>(wkClient));
}
void WKContextSetInjectedBundleClient(WKContextRef contextRef, const WKContextInjectedBundleClient* wkClient)
{
toImpl(contextRef)->initializeInjectedBundleClient(wkClient);
toImpl(contextRef)->initializeInjectedBundleClient(reinterpret_cast<const WKContextInjectedBundleClientBase*>(wkClient));
}
void WKContextSetHistoryClient(WKContextRef contextRef, const WKContextHistoryClient* wkClient)
{
toImpl(contextRef)->initializeHistoryClient(wkClient);
toImpl(contextRef)->initializeHistoryClient(reinterpret_cast<const WKContextHistoryClientBase*>(wkClient));
}
void WKContextSetDownloadClient(WKContextRef contextRef, const WKContextDownloadClient* wkClient)
{
toImpl(contextRef)->initializeDownloadClient(wkClient);
toImpl(contextRef)->initializeDownloadClient(reinterpret_cast<const WKContextDownloadClientBase*>(wkClient));
}
void WKContextSetConnectionClient(WKContextRef contextRef, const WKContextConnectionClient* wkClient)
{
toImpl(contextRef)->initializeConnectionClient(wkClient);
toImpl(contextRef)->initializeConnectionClient(reinterpret_cast<const WKContextConnectionClientBase*>(wkClient));
}
WKDownloadRef WKContextDownloadURLRequest(WKContextRef contextRef, const WKURLRequestRef requestRef)
......
......@@ -38,7 +38,7 @@ WKTypeID WKCookieManagerGetTypeID()
void WKCookieManagerSetClient(WKCookieManagerRef cookieManagerRef, const WKCookieManagerClient* wkClient)
{
toImpl(cookieManagerRef)->initializeClient(wkClient);
toImpl(cookieManagerRef)->initializeClient(reinterpret_cast<const WKCookieManagerClientBase*>(wkClient));
}
void WKCookieManagerGetHostnamesWithCookies(WKCookieManagerRef cookieManagerRef, void* context, WKCookieManagerGetCookieHostnamesFunction callback)
......
......@@ -125,7 +125,7 @@ void WKDatabaseManagerSetClient(WKDatabaseManagerRef databaseManagerRef, const W
#if ENABLE(SQL_DATABASE)
if (wkClient && wkClient->version)
return;
toImpl(databaseManagerRef)->initializeClient(wkClient);
toImpl(databaseManagerRef)->initializeClient(reinterpret_cast<const WKDatabaseManagerClientBase*>(wkClient));
#else
UNUSED_PARAM(databaseManagerRef);
UNUSED_PARAM(wkClient);
......
......@@ -38,7 +38,7 @@ WKTypeID WKGeolocationManagerGetTypeID()
void WKGeolocationManagerSetProvider(WKGeolocationManagerRef geolocationManagerRef, const WKGeolocationProvider* wkProvider)
{
toImpl(geolocationManagerRef)->initializeProvider(wkProvider);
toImpl(geolocationManagerRef)->initializeProvider(reinterpret_cast<const WKGeolocationProviderBase*>(wkProvider));
}
void WKGeolocationManagerProviderDidChangePosition(WKGeolocationManagerRef geolocationManagerRef, WKGeolocationPositionRef positionRef)
......
......@@ -38,7 +38,7 @@ WKTypeID WKIconDatabaseGetTypeID()
void WKIconDatabaseSetIconDatabaseClient(WKIconDatabaseRef iconDatabaseRef, const WKIconDatabaseClient* wkClient)
{
toImpl(iconDatabaseRef)->initializeIconDatabaseClient(wkClient);
toImpl(iconDatabaseRef)->initializeIconDatabaseClient(reinterpret_cast<const WKIconDatabaseClientBase*>(wkClient));
}
void WKIconDatabaseRetainIconForURL(WKIconDatabaseRef iconDatabaseRef, WKURLRef pageURLRef)
......
......@@ -38,7 +38,7 @@ WKTypeID WKNotificationManagerGetTypeID()
void WKNotificationManagerSetProvider(WKNotificationManagerRef managerRef, const WKNotificationProvider* wkProvider)
{
toImpl(managerRef)->initializeProvider(wkProvider);
toImpl(managerRef)->initializeProvider(reinterpret_cast<const WKNotificationProviderBase*>(wkProvider));
}
void WKNotificationManagerProviderDidShowNotification(WKNotificationManagerRef managerRef, uint64_t notificationID)
......
......@@ -63,5 +63,5 @@ void WKOriginDataManagerStopObservingChanges(WKOriginDataManagerRef originDataMa
void WKOriginDataManagerSetChangeClient(WKOriginDataManagerRef originDataManagerRef, const WKOriginDataManagerChangeClient *client)
{
toImpl(originDataManagerRef)->setChangeClient(client);
toImpl(originDataManagerRef)->setChangeClient(reinterpret_cast<const WKOriginDataManagerChangeClientBase*>(client));
}
......@@ -632,23 +632,23 @@ void WKPageCountStringMatches(WKPageRef pageRef, WKStringRef string, WKFindOptio
void WKPageSetPageContextMenuClient(WKPageRef pageRef, const WKPageContextMenuClient* wkClient)
{
#if ENABLE(CONTEXT_MENUS)
toImpl(pageRef)->initializeContextMenuClient(wkClient);
toImpl(pageRef)->initializeContextMenuClient(reinterpret_cast<const WKPageContextMenuClientBase*>(wkClient));
#endif
}
void WKPageSetPageFindClient(WKPageRef pageRef, const WKPageFindClient* wkClient)
{
toImpl(pageRef)->initializeFindClient(wkClient);
toImpl(pageRef)->initializeFindClient(reinterpret_cast<const WKPageFindClientBase*>(wkClient));
}
void WKPageSetPageFindMatchesClient(WKPageRef pageRef, const WKPageFindMatchesClient* wkClient)
{
toImpl(pageRef)->initializeFindMatchesClient(wkClient);
toImpl(pageRef)->initializeFindMatchesClient(reinterpret_cast<const WKPageFindMatchesClientBase*>(wkClient));
}
void WKPageSetPageFormClient(WKPageRef pageRef, const WKPageFormClient* wkClient)
{
toImpl(pageRef)->initializeFormClient(wkClient);
toImpl(pageRef)->initializeFormClient(reinterpret_cast<const WKPageFormClientBase*>(wkClient));
}
void WKPageSetPageLoaderClient(WKPageRef pageRef, const WKPageLoaderClient* wkClient)
......@@ -658,12 +658,12 @@ void WKPageSetPageLoaderClient(WKPageRef pageRef, const WKPageLoaderClient* wkCl
void WKPageSetPagePolicyClient(WKPageRef pageRef, const WKPagePolicyClient* wkClient)
{
toImpl(pageRef)->initializePolicyClient(wkClient);
toImpl(pageRef)->initializePolicyClient(reinterpret_cast<const WKPagePolicyClientBase*>(wkClient));
}
void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClient* wkClient)
{
toImpl(pageRef)->initializeUIClient(wkClient);
toImpl(pageRef)->initializeUIClient(reinterpret_cast<const WKPageUIClientBase*>(wkClient));
}
void WKPageRunJavaScriptInMainFrame(WKPageRef pageRef, WKStringRef scriptRef, void* context, WKPageRunJavaScriptFunction callback)
......
......@@ -542,7 +542,7 @@ static void setUpPagePolicyClient(WKBrowsingContextController *browsingContext,
WKFramePolicyListenerUse(listener);
};
page.initializePolicyClient(&policyClient);
page.initializePolicyClient(reinterpret_cast<const WKPagePolicyClientBase*>(&policyClient));
}
- (id <WKBrowsingContextLoadDelegate>)loadDelegate
......
......@@ -62,7 +62,7 @@ WebNotificationManagerProxy::WebNotificationManagerProxy(WebContext* context)
{
}
void WebNotificationManagerProxy::initializeProvider(const WKNotificationProvider *provider)
void WebNotificationManagerProxy::initializeProvider(const WKNotificationProviderBase* provider)
{
m_provider.initialize(provider);
m_provider.addNotificationManager(this);
......
......@@ -53,7 +53,7 @@ public:
static PassRefPtr<WebNotificationManagerProxy> create(WebContext*);
void initializeProvider(const WKNotificationProvider*);
void initializeProvider(const WKNotificationProviderBase*);
void populateCopyOfNotificationPermissions(HashMap<String, bool>&);
void show(WebPageProxy*, const String& title, const String& body, const String& iconURL, const String& tag, const String& lang, const String& dir, const String& originString, uint64_t pageNotificationID);
......
......@@ -41,7 +41,7 @@ void WebNotificationProvider::show(WebPageProxy* page, WebNotification* notifica
if (!m_client.show)
return;
m_client.show(toAPI(page), toAPI(notification), m_client.clientInfo);
m_client.show(toAPI(page), toAPI(notification), m_client.base.clientInfo);
}
void WebNotificationProvider::cancel(WebNotification* notification)
......@@ -49,7 +49,7 @@ void WebNotificationProvider::cancel(WebNotification* notification)
if (!m_client.cancel)
return;
m_client.cancel(toAPI(notification), m_client.clientInfo);
m_client.cancel(toAPI(notification), m_client.base.clientInfo);
}
void WebNotificationProvider::didDestroyNotification(WebNotification* notification)
......@@ -57,7 +57,7 @@ void WebNotificationProvider::didDestroyNotification(WebNotification* notificati
if (!m_client.didDestroyNotification)
return;
m_client.didDestroyNotification(toAPI(notification), m_client.clientInfo);
m_client.didDestroyNotification(toAPI(notification), m_client.base.clientInfo);
}
void WebNotificationProvider::clearNotifications(const Vector<uint64_t>& notificationIDs)
......@@ -71,7 +71,7 @@ void WebNotificationProvider::clearNotifications(const Vector<uint64_t>& notific
for (const auto& notificationID : notificationIDs)
arrayIDs.uncheckedAppend(WebUInt64::create(notificationID));
m_client.clearNotifications(toAPI(API::Array::create(std::move(arrayIDs)).get()), m_client.clientInfo);
m_client.clearNotifications(toAPI(API::Array::create(std::move(arrayIDs)).get()), m_client.base.clientInfo);
}
void WebNotificationProvider::addNotificationManager(WebNotificationManagerProxy* manager)
......@@ -79,7 +79,7 @@ void WebNotificationProvider::addNotificationManager(WebNotificationManagerProxy
if (!m_client.addNotificationManager)
return;
m_client.addNotificationManager(toAPI(manager), m_client.clientInfo);
m_client.addNotificationManager(toAPI(manager), m_client.base.clientInfo);
}
void WebNotificationProvider::removeNotificationManager(WebNotificationManagerProxy* manager)
......@@ -87,7 +87,7 @@ void WebNotificationProvider::removeNotificationManager(WebNotificationManagerPr
if (!m_client.removeNotificationManager)
return;
m_client.removeNotificationManager(toAPI(manager), m_client.clientInfo);
m_client.removeNotificationManager(toAPI(manager), m_client.base.clientInfo);
}
PassRefPtr<ImmutableDictionary> WebNotificationProvider::notificationPermissions()
......@@ -95,7 +95,7 @@ PassRefPtr<ImmutableDictionary> WebNotificationProvider::notificationPermissions
if (!m_client.notificationPermissions)
return ImmutableDictionary::create();
return adoptRef(toImpl(m_client.notificationPermissions(m_client.clientInfo)));
return adoptRef(toImpl(m_client.notificationPermissions(m_client.base.clientInfo)));
}
} // namespace WebKit
......@@ -31,6 +31,10 @@
#include <wtf/Forward.h>
#include <wtf/Vector.h>
template<> struct API::ClientTraits<WKNotificationProviderBase> {
typedef std::tuple<WKNotificationProviderV0> Versions;
};
namespace WebKit {
class ImmutableDictionary;
......@@ -39,7 +43,7 @@ class WebNotificationManagerProxy;
class WebPageProxy;
class WebSecurityOrigin;
class WebNotificationProvider : public APIClient<WKNotificationProvider, kWKNotificationProviderCurrentVersion> {
class WebNotificationProvider : public API::Client<WKNotificationProviderBase> {
public:
void show(WebPageProxy*, WebNotification*);
void cancel(WebNotification*);
......
......@@ -255,29 +255,29 @@ WebContext::~WebContext()
#endif
}
void WebContext::initializeClient(const WKContextClient* client)
void WebContext::initializeClient(const WKContextClientBase* client)
{
m_client.initialize(client);
}
void WebContext::initializeInjectedBundleClient(const WKContextInjectedBundleClient* client)
void WebContext::initializeInjectedBundleClient(const WKContextInjectedBundleClientBase* client)
{
m_injectedBundleClient.initialize(client);
}
void WebContext::initializeConnectionClient(const WKContextConnectionClient* client)
void WebContext::initializeConnectionClient(const WKContextConnectionClientBase* client)
{
m_connectionClient.initialize(client);
}
void WebContext::initializeHistoryClient(const WKContextHistoryClient* client)
void WebContext::initializeHistoryClient(const WKContextHistoryClientBase* client)
{
m_historyClient.initialize(client);
sendToAllProcesses(Messages::WebProcess::SetShouldTrackVisitedLinks(m_historyClient.shouldTrackVisitedLinks()));
}
void WebContext::initializeDownloadClient(const WKContextDownloadClient* client)
void WebContext::initializeDownloadClient(const WKContextDownloadClientBase* client)
{
m_downloadClient.initialize(client);
}
......
......@@ -126,11 +126,11 @@ public:
bool dispatchMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&);
bool dispatchSyncMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&, std::unique_ptr<CoreIPC::MessageEncoder>&);
void initializeClient(const WKContextClient*);
void initializeInjectedBundleClient(const WKContextInjectedBundleClient*);
void initializeConnectionClient(const WKContextConnectionClient*);
void initializeHistoryClient(const WKContextHistoryClient*);
void initializeDownloadClient(const WKContextDownloadClient*);
void initializeClient(const WKContextClientBase*);
void initializeInjectedBundleClient(const WKContextInjectedBundleClientBase*);
void initializeConnectionClient(const WKContextConnectionClientBase*);
void initializeHistoryClient(const WKContextHistoryClientBase*);
void initializeDownloadClient(const WKContextDownloadClientBase*);
void setProcessModel(ProcessModel); // Can only be called when there are no processes running.
ProcessModel processModel() const { return m_processModel; }
......
......@@ -36,7 +36,7 @@ void WebContextClient::plugInAutoStartOriginHashesChanged(WebContext* context)
if (!m_client.plugInAutoStartOriginHashesChanged)
return;
m_client.plugInAutoStartOriginHashesChanged(toAPI(context), m_client.clientInfo);
m_client.plugInAutoStartOriginHashesChanged(toAPI(context), m_client.base.clientInfo);
}
void WebContextClient::networkProcessDidCrash(WebContext* context)
......@@ -44,7 +44,7 @@ void WebContextClient::networkProcessDidCrash(WebContext* context)
if (!m_client.networkProcessDidCrash)
return;
m_client.networkProcessDidCrash(toAPI(context), m_client.clientInfo);
m_client.networkProcessDidCrash(toAPI(context), m_client.base.clientInfo);
}
void WebContextClient::plugInInformationBecameAvailable(WebContext* context, API::Array* plugInInfo)
......@@ -55,7 +55,7 @@ void WebContextClient::plugInInformationBecameAvailable(WebContext* context, API
// FIXME: The API contract expects us to hand a reference to the array here. This is wrong.
plugInInfo->ref();
m_client.plugInInformationBecameAvailable(toAPI(context), toAPI(plugInInfo), m_client.clientInfo);
m_client.plugInInformationBecameAvailable(toAPI(context), toAPI(plugInInfo), m_client.base.clientInfo);
}
} // namespace WebKit
......@@ -29,6 +29,10 @@
#include "APIClient.h"
#include "WKContext.h"
template<> struct API::ClientTraits<WKContextClientBase> {
typedef std::tuple<WKContextClientV0> Versions;
};
namespace API {
class Array;
}
......@@ -37,7 +41,7 @@ namespace WebKit {
class WebContext;
class WebContextClient : public APIClient<WKContextClient, kWKContextClientCurrentVersion> {
class WebContextClient : public API::Client<WKContextClientBase> {
public:
void plugInAutoStartOriginHashesChanged(WebContext*);
void networkProcessDidCrash(WebContext*);
......
......@@ -35,7 +35,7 @@ void WebContextConnectionClient::didCreateConnection(WebContext* context, WebCon
if (!m_client.didCreateConnection)
return;
m_client.didCreateConnection(toAPI(context), toAPI(connection), m_client.clientInfo);
m_client.didCreateConnection(toAPI(context), toAPI(connection), m_client.base.clientInfo);
}
} // namespace WebKit
......@@ -29,12 +29,16 @@
#include "APIClient.h"
#include "WKContext.h"
template<> struct API::ClientTraits<WKContextConnectionClientBase> {
typedef std::tuple<WKContextConnectionClientV0> Versions;
};
namespace WebKit {
class WebConnection;
class WebContext;
class WebContextConnectionClient : public APIClient<WKContextConnectionClient, kWKContextConnectionClientCurrentVersion> {
class WebContextConnectionClient : public API::Client<WKContextConnectionClientBase> {
public:
void didCreateConnection(WebContext*, WebConnection*);
};
......
......@@ -38,7 +38,7 @@ void WebContextInjectedBundleClient::didReceiveMessageFromInjectedBundle(WebCont
if (!m_client.didReceiveMessageFromInjectedBundle)
return;
m_client.didReceiveMessageFromInjectedBundle(toAPI(context), toAPI(messageName.impl()), toAPI(messageBody), m_client.clientInfo);
m_client.didReceiveMessageFromInjectedBundle(toAPI(context), toAPI(messageName.impl()), toAPI(messageBody), m_client.base.clientInfo);
}
void WebContextInjectedBundleClient::didReceiveSynchronousMessageFromInjectedBundle(WebContext* context, const String& messageName, API::Object* messageBody, RefPtr<API::Object>& returnData)
......@@ -47,7 +47,7 @@ void WebContextInjectedBundleClient::didReceiveSynchronousMessageFromInjectedBun
return;
WKTypeRef returnDataRef = 0;
m_client.didReceiveSynchronousMessageFromInjectedBundle(toAPI(context), toAPI(messageName.impl()), toAPI(messageBody), &returnDataRef, m_client.clientInfo);
m_client.didReceiveSynchronousMessageFromInjectedBundle(toAPI(context), toAPI(messageName.impl()), toAPI(messageBody), &returnDataRef, m_client.base.clientInfo);
returnData = adoptRef(toImpl(returnDataRef));
}
......@@ -56,7 +56,7 @@ PassRefPtr<API::Object> WebContextInjectedBundleClient::getInjectedBundleInitial
if (!m_client.getInjectedBundleInitializationUserData)
return 0;
return toImpl(m_client.getInjectedBundleInitializationUserData(toAPI(context), m_client.clientInfo));
return toImpl(m_client.getInjectedBundleInitializationUserData(toAPI(context), m_client.base.clientInfo));
}
} // namespace WebKit
......@@ -30,6 +30,10 @@
#include "WKContext.h"
#include <wtf/Forward.h>
template<> struct API::ClientTraits<WKContextInjectedBundleClientBase> {
typedef std::tuple<WKContextInjectedBundleClientV0, WKContextInjectedBundleClientV1> Versions;
};
namespace API {
class Object;
}
......@@ -38,7 +42,7 @@ namespace WebKit {
class WebContext;
class WebContextInjectedBundleClient : public APIClient<WKContextInjectedBundleClient, kWKContextInjectedBundleClientCurrentVersion> {
class WebContextInjectedBundleClient : public API::Client<WKContextInjectedBundleClientBase> {
public:
void didReceiveMessageFromInjectedBundle(WebContext*, const String&, API::Object*);
void didReceiveSynchronousMessageFromInjectedBundle(WebContext*, const String&, API::Object*, RefPtr<API::Object>& returnData);
......
......@@ -58,7 +58,7 @@ WebCookieManagerProxy::~WebCookieManagerProxy()
{
}
void WebCookieManagerProxy::initializeClient(const WKCookieManagerClient* client)
void WebCookieManagerProxy::initializeClient(const WKCookieManagerClientBase* client)
{
m_client.initialize(client);
}
......
......@@ -58,7 +58,7 @@ public:
static PassRefPtr<WebCookieManagerProxy> create(WebContext*);
virtual ~WebCookieManagerProxy();
void initializeClient(const WKCookieManagerClient*);
void initializeClient(const WKCookieManagerClientBase*);
void getHostnamesWithCookies(PassRefPtr<ArrayCallback>);
void deleteCookiesForHostname(const String& hostname);
......
......@@ -35,7 +35,7 @@ void WebCookieManagerProxyClient::cookiesDidChange(WebCookieManagerProxy* cookie
if (!m_client.cookiesDidChange)
return;
m_client.cookiesDidChange(toAPI(cookieManager), m_client.clientInfo);
m_client.cookiesDidChange(toAPI(cookieManager), m_client.base.clientInfo);
}
} // namespace WebKit
......@@ -30,11 +30,15 @@
#include "WKCookieManager.h"
#include <wtf/Forward.h>
template<> struct API::ClientTraits<WKCookieManagerClientBase> {
typedef std::tuple<WKCookieManagerClientV0> Versions;
};
namespace WebKit {
class WebCookieManagerProxy;
class WebCookieManagerProxyClient : public APIClient<WKCookieManagerClient, kWKCookieManagerClientCurrentVersion> {
class WebCookieManagerProxyClient : public API::Client<WKCookieManagerClientBase> {
public:
void cookiesDidChange(WebCookieManagerProxy*);
};
......
......@@ -107,7 +107,7 @@ WebDatabaseManagerProxy::~WebDatabaseManagerProxy()
{
}
void WebDatabaseManagerProxy::initializeClient(const WKDatabaseManagerClient* client)
void WebDatabaseManagerProxy::initializeClient(const WKDatabaseManagerClientBase* client)
{
m_client.initialize(client);
}
......
......@@ -53,7 +53,7 @@ public:
static PassRefPtr<WebDatabaseManagerProxy> create(WebContext*);
virtual ~WebDatabaseManagerProxy();
void initializeClient(const WKDatabaseManagerClient*);
void initializeClient(const WKDatabaseManagerClientBase*);
void getDatabasesByOrigin(PassRefPtr<ArrayCallback>);
void getDatabaseOrigins(PassRefPtr<ArrayCallback>);
......
......@@ -35,7 +35,7 @@ void WebDatabaseManagerProxyClient::didModifyOrigin(WebDatabaseManagerProxy* dat
if (!m_client.didModifyOrigin)
return;
m_client.didModifyOrigin(toAPI(databaseManager), toAPI(origin), m_client.clientInfo);
m_client.didModifyOrigin(toAPI(databaseManager), toAPI(origin), m_client.base.clientInfo);