Commit f1a64aea authored by weinig@apple.com's avatar weinig@apple.com

WebKit2: Add resource load client API

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

Reviewed by Anders Carlsson.

This just pipes through the basic resource load client data.

* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageResourceLoadClient):
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::initializeResourceLoadClient):
(WebKit::WebPageProxy::didInitiateLoadForResource):
(WebKit::WebPageProxy::didSendRequestForResource):
(WebKit::WebPageProxy::didReceiveResponseForResource):
(WebKit::WebPageProxy::didReceiveContentLengthForResource):
(WebKit::WebPageProxy::didFinishLoadForResource):
(WebKit::WebPageProxy::didFailLoadForResource):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebResourceLoadClient.cpp: Added.
(WebKit::WebResourceLoadClient::didInitiateLoadForResource):
(WebKit::WebResourceLoadClient::didSendRequestForResource):
(WebKit::WebResourceLoadClient::didReceiveResponseForResource):
(WebKit::WebResourceLoadClient::didReceiveContentLengthForResource):
(WebKit::WebResourceLoadClient::didFinishLoadForResource):
(WebKit::WebResourceLoadClient::didFailLoadForResource):
* UIProcess/WebResourceLoadClient.h: Added.
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::assignIdentifierToInitialRequest):
(WebKit::WebFrameLoaderClient::dispatchWillSendRequest):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveResponse):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveContentLength):
(WebKit::WebFrameLoaderClient::dispatchDidFinishLoading):
(WebKit::WebFrameLoaderClient::dispatchDidFailLoading):
* win/WebKit2.vcproj:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74384 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ca2db2ff
2010-12-20 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
WebKit2: Add resource load client API
https://bugs.webkit.org/show_bug.cgi?id=51370
This just pipes through the basic resource load client data.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageResourceLoadClient):
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::initializeResourceLoadClient):
(WebKit::WebPageProxy::didInitiateLoadForResource):
(WebKit::WebPageProxy::didSendRequestForResource):
(WebKit::WebPageProxy::didReceiveResponseForResource):
(WebKit::WebPageProxy::didReceiveContentLengthForResource):
(WebKit::WebPageProxy::didFinishLoadForResource):
(WebKit::WebPageProxy::didFailLoadForResource):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebResourceLoadClient.cpp: Added.
(WebKit::WebResourceLoadClient::didInitiateLoadForResource):
(WebKit::WebResourceLoadClient::didSendRequestForResource):
(WebKit::WebResourceLoadClient::didReceiveResponseForResource):
(WebKit::WebResourceLoadClient::didReceiveContentLengthForResource):
(WebKit::WebResourceLoadClient::didFinishLoadForResource):
(WebKit::WebResourceLoadClient::didFailLoadForResource):
* UIProcess/WebResourceLoadClient.h: Added.
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::assignIdentifierToInitialRequest):
(WebKit::WebFrameLoaderClient::dispatchWillSendRequest):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveResponse):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveContentLength):
(WebKit::WebFrameLoaderClient::dispatchDidFinishLoading):
(WebKit::WebFrameLoaderClient::dispatchDidFailLoading):
* win/WebKit2.vcproj:
2010-12-20 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
......@@ -310,6 +310,13 @@ void WKPageSetPagePolicyClient(WKPageRef pageRef, const WKPagePolicyClient* wkCl
toImpl(pageRef)->initializePolicyClient(wkClient);
}
void WKPageSetPageResourceLoadClient(WKPageRef pageRef, const WKPageResourceLoadClient* wkClient)
{
if (wkClient && wkClient->version)
return;
toImpl(pageRef)->initializeResourceLoadClient(wkClient);
}
void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClient* wkClient)
{
if (wkClient && wkClient->version)
......
......@@ -130,6 +130,26 @@ struct WKPageFormClient {
};
typedef struct WKPageFormClient WKPageFormClient;
// Resource Load Client.
typedef void (*WKPageDidInitiateLoadForResourceCallback)(WKPageRef page, WKFrameRef frame, uint64_t resourceIdentifier, WKURLRequestRef request, const void* clientInfo);
typedef void (*WKPageDidSendRequestForResourceCallback)(WKPageRef page, WKFrameRef frame, uint64_t resourceIdentifier, WKURLRequestRef request, WKURLResponseRef redirectResponse, const void* clientInfo);
typedef void (*WKPageDidReceiveResponseForResourceCallback)(WKPageRef page, WKFrameRef frame, uint64_t resourceIdentifier, WKURLResponseRef response, const void* clientInfo);
typedef void (*WKPageDidReceiveContentLengthForResourceCallback)(WKPageRef page, WKFrameRef frame, uint64_t resourceIdentifier, uint64_t contentLength, const void* clientInfo);
typedef void (*WKPageDidFinishLoadForResourceCallback)(WKPageRef page, WKFrameRef frame, uint64_t resourceIdentifier, const void* clientInfo);
typedef void (*WKPageDidFailLoadForResourceCallback)(WKPageRef page, WKFrameRef frame, uint64_t resourceIdentifier, WKErrorRef error, const void* clientInfo);
struct WKPageResourceLoadClient {
int version;
const void * clientInfo;
WKPageDidInitiateLoadForResourceCallback didInitiateLoadForResource;
WKPageDidSendRequestForResourceCallback didSendRequestForResource;
WKPageDidReceiveResponseForResourceCallback didReceiveResponseForResource;
WKPageDidReceiveContentLengthForResourceCallback didReceiveContentLengthForResource;
WKPageDidFinishLoadForResourceCallback didFinishLoadForResource;
WKPageDidFailLoadForResourceCallback didFailLoadForResource;
};
typedef struct WKPageResourceLoadClient WKPageResourceLoadClient;
// UI Client
typedef WKPageRef (*WKPageCreateNewPageCallback)(WKPageRef page, WKDictionaryRef features, WKEventModifiers modifiers, WKEventMouseButton mouseButton, const void *clientInfo);
typedef void (*WKPageShowPageCallback)(WKPageRef page, const void *clientInfo);
......@@ -290,6 +310,7 @@ WK_EXPORT void WKPageSetPageFindClient(WKPageRef page, const WKPageFindClient* c
WK_EXPORT void WKPageSetPageFormClient(WKPageRef page, const WKPageFormClient* client);
WK_EXPORT void WKPageSetPageLoaderClient(WKPageRef page, const WKPageLoaderClient* client);
WK_EXPORT void WKPageSetPagePolicyClient(WKPageRef page, const WKPagePolicyClient* client);
WK_EXPORT void WKPageSetPageResourceLoadClient(WKPageRef page, const WKPageResourceLoadClient* client);
WK_EXPORT void WKPageSetPageUIClient(WKPageRef page, const WKPageUIClient* client);
typedef void (*WKPageRunJavaScriptFunction)(WKStringRef, WKErrorRef, void*);
......
......@@ -172,6 +172,11 @@ void WebPageProxy::initializeFormClient(const WKPageFormClient* formClient)
m_formClient.initialize(formClient);
}
void WebPageProxy::initializeResourceLoadClient(const WKPageResourceLoadClient* client)
{
m_resourceLoadClient.initialize(client);
}
void WebPageProxy::initializeUIClient(const WKPageUIClient* client)
{
m_uiClient.initialize(client);
......@@ -1168,6 +1173,51 @@ void WebPageProxy::willSubmitForm(uint64_t frameID, uint64_t sourceFrameID, cons
listener->continueSubmission();
}
// ResourceLoad Client
void WebPageProxy::didInitiateLoadForResource(uint64_t frameID, uint64_t resourceIdentifier, const ResourceRequest& request)
{
WebFrameProxy* frame = process()->webFrame(frameID);
m_resourceLoadClient.didInitiateLoadForResource(this, frame, resourceIdentifier, request);
}
void WebPageProxy::didSendRequestForResource(uint64_t frameID, uint64_t resourceIdentifier, const ResourceRequest& request, const ResourceResponse& redirectResponse)
{
WebFrameProxy* frame = process()->webFrame(frameID);
m_resourceLoadClient.didSendRequestForResource(this, frame, resourceIdentifier, request, redirectResponse);
}
void WebPageProxy::didReceiveResponseForResource(uint64_t frameID, uint64_t resourceIdentifier, const ResourceResponse& response)
{
WebFrameProxy* frame = process()->webFrame(frameID);
m_resourceLoadClient.didReceiveResponseForResource(this, frame, resourceIdentifier, response);
}
void WebPageProxy::didReceiveContentLengthForResource(uint64_t frameID, uint64_t resourceIdentifier, uint64_t contentLength)
{
WebFrameProxy* frame = process()->webFrame(frameID);
m_resourceLoadClient.didReceiveContentLengthForResource(this, frame, resourceIdentifier, contentLength);
}
void WebPageProxy::didFinishLoadForResource(uint64_t frameID, uint64_t resourceIdentifier)
{
WebFrameProxy* frame = process()->webFrame(frameID);
m_resourceLoadClient.didFinishLoadForResource(this, frame, resourceIdentifier);
}
void WebPageProxy::didFailLoadForResource(uint64_t frameID, uint64_t resourceIdentifier, const ResourceError& error)
{
WebFrameProxy* frame = process()->webFrame(frameID);
m_resourceLoadClient.didFailLoadForResource(this, frame, resourceIdentifier, error);
}
// UIClient
void WebPageProxy::createNewPage(const WindowFeatures& windowFeatures, uint32_t opaqueModifiers, int32_t opaqueMouseButton, uint64_t& newPageID, WebPageCreationParameters& newPageParameters)
......
......@@ -31,7 +31,6 @@
#include "GenericCallback.h"
#include "SharedMemory.h"
#include "WKBase.h"
#include "WebPageContextMenuClient.h"
#include "WebContextMenuItemData.h"
#include "WebEvent.h"
#include "WebFindClient.h"
......@@ -41,8 +40,10 @@
#include "WebHistoryClient.h"
#include "WebInspectorProxy.h"
#include "WebLoaderClient.h"
#include "WebPageContextMenuClient.h"
#include "WebPolicyClient.h"
#include "WebPopupMenuProxy.h"
#include "WebResourceLoadClient.h"
#include "WebUIClient.h"
#include <WebCore/EditAction.h>
#include <WebCore/Editor.h>
......@@ -129,6 +130,7 @@ public:
void initializeFormClient(const WKPageFormClient*);
void initializeLoaderClient(const WKPageLoaderClient*);
void initializePolicyClient(const WKPagePolicyClient*);
void initializeResourceLoadClient(const WKPageResourceLoadClient*);
void initializeUIClient(const WKPageUIClient*);
void relaunch();
......@@ -338,6 +340,14 @@ private:
void willSubmitForm(uint64_t frameID, uint64_t sourceFrameID, const StringPairVector& textFieldValues, uint64_t listenerID, CoreIPC::ArgumentDecoder*);
// Resource load client
void didInitiateLoadForResource(uint64_t frameID, uint64_t resourceIdentifier, const WebCore::ResourceRequest&);
void didSendRequestForResource(uint64_t frameID, uint64_t resourceIdentifier, const WebCore::ResourceRequest&, const WebCore::ResourceResponse& redirectResponse);
void didReceiveResponseForResource(uint64_t frameID, uint64_t resourceIdentifier, const WebCore::ResourceResponse&);
void didReceiveContentLengthForResource(uint64_t frameID, uint64_t resourceIdentifier, uint64_t contentLength);
void didFinishLoadForResource(uint64_t frameID, uint64_t resourceIdentifier);
void didFailLoadForResource(uint64_t frameID, uint64_t resourceIdentifier, const WebCore::ResourceError&);
// UI client
void createNewPage(const WebCore::WindowFeatures&, uint32_t modifiers, int32_t mouseButton, uint64_t& newPageID, WebPageCreationParameters&);
void showPage();
......@@ -435,6 +445,7 @@ private:
WebLoaderClient m_loaderClient;
WebPolicyClient m_policyClient;
WebFormClient m_formClient;
WebResourceLoadClient m_resourceLoadClient;
WebUIClient m_uiClient;
WebFindClient m_findClient;
WebPageContextMenuClient m_contextMenuClient;
......
......@@ -92,6 +92,14 @@ messages -> WebPageProxy {
FrameDidBecomeFrameSet(uint64_t frameID, bool value)
# Resource load messages.
DidInitiateLoadForResource(uint64_t frameID, uint64_t resourceIdentifier, WebCore::ResourceRequest request)
DidSendRequestForResource(uint64_t frameID, uint64_t resourceIdentifier, WebCore::ResourceRequest request, WebCore::ResourceResponse redirectResponse)
DidReceiveResponseForResource(uint64_t frameID, uint64_t resourceIdentifier, WebCore::ResourceResponse response)
DidReceiveContentLengthForResource(uint64_t frameID, uint64_t resourceIdentifier, uint64_t contentLength)
DidFinishLoadForResource(uint64_t frameID, uint64_t resourceIdentifier)
DidFailLoadForResource(uint64_t frameID, uint64_t resourceIdentifier, WebCore::ResourceError error)
# Custom representations
DidFinishLoadingDataForCustomRepresentation(CoreIPC::DataReference data)
......
/*
* Copyright (C) 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "WebResourceLoadClient.h"
#include "WKAPICast.h"
#include "WebURLRequest.h"
#include "WebURLResponse.h"
using namespace WebCore;
namespace WebKit {
void WebResourceLoadClient::didInitiateLoadForResource(WebPageProxy* page, WebFrameProxy* frame, uint64_t resourceIdentifier, const ResourceRequest& resourceRequest)
{
if (!m_client.didInitiateLoadForResource)
return;
RefPtr<WebURLRequest> request = WebURLRequest::create(resourceRequest);
return m_client.didInitiateLoadForResource(toAPI(page), toAPI(frame), resourceIdentifier, toAPI(request.get()), m_client.clientInfo);
}
void WebResourceLoadClient::didSendRequestForResource(WebPageProxy* page, WebFrameProxy* frame, uint64_t resourceIdentifier, const ResourceRequest& resourceRequest, const ResourceResponse& redirectResourceResponse)
{
if (!m_client.didSendRequestForResource)
return;
RefPtr<WebURLRequest> request = WebURLRequest::create(resourceRequest);
RefPtr<WebURLResponse> response;
if (!redirectResourceResponse.isNull())
response = WebURLResponse::create(redirectResourceResponse);
return m_client.didSendRequestForResource(toAPI(page), toAPI(frame), resourceIdentifier, toAPI(request.get()), toAPI(response.get()), m_client.clientInfo);
}
void WebResourceLoadClient::didReceiveResponseForResource(WebPageProxy* page, WebFrameProxy* frame, uint64_t resourceIdentifier, const ResourceResponse& resourceResponse)
{
if (!m_client.didReceiveResponseForResource)
return;
RefPtr<WebURLResponse> response = WebURLResponse::create(resourceResponse);
return m_client.didReceiveResponseForResource(toAPI(page), toAPI(frame), resourceIdentifier, toAPI(response.get()), m_client.clientInfo);
}
void WebResourceLoadClient::didReceiveContentLengthForResource(WebPageProxy* page, WebFrameProxy* frame, uint64_t resourceIdentifier, uint64_t contentLength)
{
if (!m_client.didReceiveContentLengthForResource)
return;
return m_client.didReceiveContentLengthForResource(toAPI(page), toAPI(frame), resourceIdentifier, contentLength, m_client.clientInfo);
}
void WebResourceLoadClient::didFinishLoadForResource(WebPageProxy* page, WebFrameProxy* frame, uint64_t resourceIdentifier)
{
if (!m_client.didFinishLoadForResource)
return;
return m_client.didFinishLoadForResource(toAPI(page), toAPI(frame), resourceIdentifier, m_client.clientInfo);
}
void WebResourceLoadClient::didFailLoadForResource(WebPageProxy* page, WebFrameProxy* frame, uint64_t resourceIdentifier, const ResourceError& error)
{
if (!m_client.didFailLoadForResource)
return;
return m_client.didFailLoadForResource(toAPI(page), toAPI(frame), resourceIdentifier, toAPI(error), m_client.clientInfo);
}
} // namespace WebKit
/*
* Copyright (C) 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef WebResourceLoadClient_h
#define WebResourceLoadClient_h
#include "APIClient.h"
#include "WKPage.h"
namespace WebCore {
class ResourceError;
class ResourceRequest;
class ResourceResponse;
}
namespace WebKit {
class APIObject;
class WebFrameProxy;
class WebPageProxy;
class WebResourceLoadClient : public APIClient<WKPageResourceLoadClient> {
public:
void didInitiateLoadForResource(WebPageProxy*, WebFrameProxy*, uint64_t resourceIdentifier, const WebCore::ResourceRequest&);
void didSendRequestForResource(WebPageProxy*, WebFrameProxy*, uint64_t resourceIdentifier, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&);
void didReceiveResponseForResource(WebPageProxy*, WebFrameProxy*, uint64_t resourceIdentifier, const WebCore::ResourceResponse&);
void didReceiveContentLengthForResource(WebPageProxy*, WebFrameProxy*, uint64_t resourceIdentifier, uint64_t contentLength);
void didFinishLoadForResource(WebPageProxy*, WebFrameProxy*, uint64_t resourceIdentifier);
void didFailLoadForResource(WebPageProxy*, WebFrameProxy*, uint64_t resourceIdentifier, const WebCore::ResourceError&);
};
} // namespace WebKit
#endif // WebResourceLoadClient_h
......@@ -356,6 +356,7 @@ HEADERS += \
UIProcess/WebPreferences.h \
UIProcess/WebProcessManager.h \
UIProcess/WebProcessProxy.h \
UIProcess/WebResourceLoadClient.h \
UIProcess/WebUIClient.h \
UIProcess/qt/WebContextMenuProxyQt.h \
UIProcess/qt/WebPopupMenuProxyQt.h \
......@@ -552,6 +553,7 @@ SOURCES += \
UIProcess/WebPreferences.cpp \
UIProcess/WebProcessManager.cpp \
UIProcess/WebProcessProxy.cpp \
UIProcess/WebResourceLoadClient.cpp \
UIProcess/WebUIClient.cpp \
UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp \
UIProcess/qt/TiledDrawingAreaProxyQt.cpp \
......
......@@ -456,6 +456,8 @@
BC857FE612B843D800EDEB2E /* WKOpenPanelParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = BC857FE412B843D800EDEB2E /* WKOpenPanelParameters.h */; settings = {ATTRIBUTES = (Public, ); }; };
BC85806212B8505700EDEB2E /* WKOpenPanelResultListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC1DFE8E12B31CA8005DF730 /* WKOpenPanelResultListener.cpp */; };
BC85806312B8505700EDEB2E /* WKOpenPanelParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC857FE512B843D800EDEB2E /* WKOpenPanelParameters.cpp */; };
BC858A2012C0357B00EDEB2E /* WebResourceLoadClient.h in Headers */ = {isa = PBXBuildFile; fileRef = BC858A1E12C0357B00EDEB2E /* WebResourceLoadClient.h */; };
BC858A2112C0357B00EDEB2E /* WebResourceLoadClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC858A1F12C0357B00EDEB2E /* WebResourceLoadClient.cpp */; };
BC8699B5116AADAA002A925B /* WKView.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8699B2116AADAA002A925B /* WKView.h */; settings = {ATTRIBUTES = (Public, ); }; };
BC8699B6116AADAA002A925B /* WKView.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC8699B3116AADAA002A925B /* WKView.mm */; };
BC8699B7116AADAA002A925B /* WKViewInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8699B4116AADAA002A925B /* WKViewInternal.h */; };
......@@ -1119,6 +1121,8 @@
BC857FB412B830E600EDEB2E /* WebOpenPanelParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebOpenPanelParameters.cpp; sourceTree = "<group>"; };
BC857FE412B843D800EDEB2E /* WKOpenPanelParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKOpenPanelParameters.h; sourceTree = "<group>"; };
BC857FE512B843D800EDEB2E /* WKOpenPanelParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKOpenPanelParameters.cpp; sourceTree = "<group>"; };
BC858A1E12C0357B00EDEB2E /* WebResourceLoadClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebResourceLoadClient.h; sourceTree = "<group>"; };
BC858A1F12C0357B00EDEB2E /* WebResourceLoadClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebResourceLoadClient.cpp; sourceTree = "<group>"; };
BC8699B2116AADAA002A925B /* WKView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKView.h; sourceTree = "<group>"; };
BC8699B3116AADAA002A925B /* WKView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKView.mm; sourceTree = "<group>"; };
BC8699B4116AADAA002A925B /* WKViewInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKViewInternal.h; sourceTree = "<group>"; };
......@@ -1963,6 +1967,8 @@
BC111B0D112F5E4F00337BAB /* WebProcessProxy.cpp */,
BC032DCF10F4389F0058C15A /* WebProcessProxy.h */,
BCEE7AB312817095009827DA /* WebProcessProxy.messages.in */,
BC858A1F12C0357B00EDEB2E /* WebResourceLoadClient.cpp */,
BC858A1E12C0357B00EDEB2E /* WebResourceLoadClient.h */,
1A594AB8112A1FB6009DE7C7 /* WebUIClient.cpp */,
1A594AB9112A1FB6009DE7C7 /* WebUIClient.h */,
);
......@@ -2762,6 +2768,7 @@
1A4A9AA812B7E796008FE984 /* WKTextInputWindowController.h in Headers */,
1A4A9C5612B816CF008FE984 /* NetscapePluginModule.h in Headers */,
1A4A9F3312B844E2008FE984 /* PluginQuirks.h in Headers */,
BC858A2012C0357B00EDEB2E /* WebResourceLoadClient.h in Headers */,
1AA417CB12C00CCA002BE67B /* TextChecker.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
......@@ -3185,6 +3192,7 @@
1A4A9AA912B7E796008FE984 /* WKTextInputWindowController.mm in Sources */,
1A4A9C5512B816CF008FE984 /* NetscapePluginModule.cpp in Sources */,
1A4A9C9A12B821CD008FE984 /* NetscapePluginModuleMac.mm in Sources */,
BC858A2112C0357B00EDEB2E /* WebResourceLoadClient.cpp in Sources */,
1AA417EF12C00D87002BE67B /* TextCheckerMac.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
......
......@@ -141,14 +141,22 @@ void WebFrameLoaderClient::detachedFromParent3()
notImplemented();
}
void WebFrameLoaderClient::assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader*, const ResourceRequest&)
void WebFrameLoaderClient::assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader*, const ResourceRequest& request)
{
notImplemented();
WebPage* webPage = m_frame->page();
if (!webPage)
return;
webPage->send(Messages::WebPageProxy::DidInitiateLoadForResource(m_frame->frameID(), identifier, request));
}
void WebFrameLoaderClient::dispatchWillSendRequest(DocumentLoader*, unsigned long identifier, ResourceRequest&, const ResourceResponse& redirectResponse)
void WebFrameLoaderClient::dispatchWillSendRequest(DocumentLoader*, unsigned long identifier, ResourceRequest& request, const ResourceResponse& redirectResponse)
{
notImplemented();
WebPage* webPage = m_frame->page();
if (!webPage)
return;
webPage->send(Messages::WebPageProxy::DidSendRequestForResource(m_frame->frameID(), identifier, request, redirectResponse));
}
bool WebFrameLoaderClient::shouldUseCredentialStorage(DocumentLoader*, unsigned long identifier)
......@@ -191,24 +199,40 @@ bool WebFrameLoaderClient::canAuthenticateAgainstProtectionSpace(DocumentLoader*
}
#endif
void WebFrameLoaderClient::dispatchDidReceiveResponse(DocumentLoader*, unsigned long identifier, const ResourceResponse&)
void WebFrameLoaderClient::dispatchDidReceiveResponse(DocumentLoader*, unsigned long identifier, const ResourceResponse& response)
{
notImplemented();
WebPage* webPage = m_frame->page();
if (!webPage)
return;
webPage->send(Messages::WebPageProxy::DidReceiveResponseForResource(m_frame->frameID(), identifier, response));
}
void WebFrameLoaderClient::dispatchDidReceiveContentLength(DocumentLoader*, unsigned long identifier, int lengthReceived)
{
notImplemented();
WebPage* webPage = m_frame->page();
if (!webPage)
return;
webPage->send(Messages::WebPageProxy::DidReceiveContentLengthForResource(m_frame->frameID(), identifier, lengthReceived));
}
void WebFrameLoaderClient::dispatchDidFinishLoading(DocumentLoader*, unsigned long identifier)
{
notImplemented();
WebPage* webPage = m_frame->page();
if (!webPage)
return;
webPage->send(Messages::WebPageProxy::DidFinishLoadForResource(m_frame->frameID(), identifier));
}
void WebFrameLoaderClient::dispatchDidFailLoading(DocumentLoader*, unsigned long identifier, const ResourceError&)
void WebFrameLoaderClient::dispatchDidFailLoading(DocumentLoader*, unsigned long identifier, const ResourceError& error)
{
notImplemented();
WebPage* webPage = m_frame->page();
if (!webPage)
return;
webPage->send(Messages::WebPageProxy::DidFailLoadForResource(m_frame->frameID(), identifier, error));
}
bool WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int length)
......
......@@ -2154,6 +2154,14 @@
RelativePath="..\UIProcess\WebProcessProxy.messages.in"
>
</File>
<File
RelativePath="..\UIProcess\WebResourceLoadClient.cpp"
>
</File>
<File
RelativePath="..\UIProcess\WebResourceLoadClient.h"
>
</File>
<File
RelativePath="..\UIProcess\WebUIClient.cpp"
>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment