Add an APILoaderClient base class
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Jan 2014 02:00:12 +0000 (02:00 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Jan 2014 02:00:12 +0000 (02:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=127527

Reviewed by Tim Horton.

* UIProcess/API/APILoaderClient.h: Added.
(API::LoaderClient::~LoaderClient):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(setUpPageLoaderClient):
(-[WKBrowsingContextController setLoadDelegate:]):
(+[WKBrowsingContextController _browsingContextControllerForPageRef:]):
* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::WebLoaderClient):
* UIProcess/WebLoaderClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setLoaderClient):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::didChangeBackForwardList):
(WebKit::WebPageProxy::willGoToBackForwardListItem):
(WebKit::WebPageProxy::findPlugin):
(WebKit::WebPageProxy::didStartProgress):
(WebKit::WebPageProxy::didChangeProgress):
(WebKit::WebPageProxy::didFinishProgress):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::didReceiveTitleForFrame):
(WebKit::WebPageProxy::didFirstLayoutForFrame):
(WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
(WebKit::WebPageProxy::didLayout):
(WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
(WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
(WebKit::WebPageProxy::didRunInsecureContentForFrame):
(WebKit::WebPageProxy::didDetectXSSForFrame):
(WebKit::WebPageProxy::webGLPolicyForURL):
(WebKit::WebPageProxy::processDidBecomeUnresponsive):
(WebKit::WebPageProxy::interactionOccurredWhileProcessUnresponsive):
(WebKit::WebPageProxy::processDidBecomeResponsive):
(WebKit::WebPageProxy::processDidCrash):
(WebKit::WebPageProxy::canAuthenticateAgainstProtectionSpaceInFrame):
(WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy):
(WebKit::WebPageProxy::didFailToInitializePlugin):
(WebKit::WebPageProxy::didBlockInsecurePluginVersion):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::loaderClient):
* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@162670 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/APILoaderClient.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/C/WKPage.cpp
Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm
Source/WebKit2/UIProcess/WebLoaderClient.cpp
Source/WebKit2/UIProcess/WebLoaderClient.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj

index 1be8858..0b470f1 100644 (file)
@@ -1,3 +1,59 @@
+2014-01-23  Anders Carlsson  <andersca@apple.com>
+
+        Add an APILoaderClient base class
+        https://bugs.webkit.org/show_bug.cgi?id=127527
+
+        Reviewed by Tim Horton.
+
+        * UIProcess/API/APILoaderClient.h: Added.
+        (API::LoaderClient::~LoaderClient):
+        * UIProcess/API/C/WKPage.cpp:
+        (WKPageSetPageLoaderClient):
+        * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
+        (setUpPageLoaderClient):
+        (-[WKBrowsingContextController setLoadDelegate:]):
+        (+[WKBrowsingContextController _browsingContextControllerForPageRef:]):
+        * UIProcess/WebLoaderClient.cpp:
+        (WebKit::WebLoaderClient::WebLoaderClient):
+        * UIProcess/WebLoaderClient.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::setLoaderClient):
+        (WebKit::WebPageProxy::close):
+        (WebKit::WebPageProxy::didChangeBackForwardList):
+        (WebKit::WebPageProxy::willGoToBackForwardListItem):
+        (WebKit::WebPageProxy::findPlugin):
+        (WebKit::WebPageProxy::didStartProgress):
+        (WebKit::WebPageProxy::didChangeProgress):
+        (WebKit::WebPageProxy::didFinishProgress):
+        (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
+        (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
+        (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
+        (WebKit::WebPageProxy::didCommitLoadForFrame):
+        (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
+        (WebKit::WebPageProxy::didFinishLoadForFrame):
+        (WebKit::WebPageProxy::didFailLoadForFrame):
+        (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
+        (WebKit::WebPageProxy::didReceiveTitleForFrame):
+        (WebKit::WebPageProxy::didFirstLayoutForFrame):
+        (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
+        (WebKit::WebPageProxy::didLayout):
+        (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
+        (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
+        (WebKit::WebPageProxy::didRunInsecureContentForFrame):
+        (WebKit::WebPageProxy::didDetectXSSForFrame):
+        (WebKit::WebPageProxy::webGLPolicyForURL):
+        (WebKit::WebPageProxy::processDidBecomeUnresponsive):
+        (WebKit::WebPageProxy::interactionOccurredWhileProcessUnresponsive):
+        (WebKit::WebPageProxy::processDidBecomeResponsive):
+        (WebKit::WebPageProxy::processDidCrash):
+        (WebKit::WebPageProxy::canAuthenticateAgainstProtectionSpaceInFrame):
+        (WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy):
+        (WebKit::WebPageProxy::didFailToInitializePlugin):
+        (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
+        * UIProcess/WebPageProxy.h:
+        (WebKit::WebPageProxy::loaderClient):
+        * WebKit2.xcodeproj/project.pbxproj:
+
 2014-01-23  Ryuan Choi  <ryuan.choi@samsung.com>
 
         Build break after r162650
diff --git a/Source/WebKit2/UIProcess/API/APILoaderClient.h b/Source/WebKit2/UIProcess/API/APILoaderClient.h
new file mode 100644 (file)
index 0000000..cb87678
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2014 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 APILoaderClient_h
+#define APILoaderClient_h
+
+#include "PluginModuleInfo.h"
+#include "SameDocumentNavigationType.h"
+#include <WebCore/FrameLoaderTypes.h>
+#include <WebCore/LayoutMilestones.h>
+#include <wtf/Forward.h>
+
+namespace WebCore {
+class ResourceError;
+}
+
+namespace WebKit {
+class AuthenticationChallengeProxy;
+class ImmutableDictionary;
+class WebBackForwardListItem;
+class WebFrameProxy;
+class WebPageProxy;
+class WebProtectionSpace;
+}
+
+namespace API {
+
+class Object;
+
+class LoaderClient {
+public:
+    virtual ~LoaderClient() { }
+
+    virtual void didStartProvisionalLoadForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) = 0;
+    virtual void didReceiveServerRedirectForProvisionalLoadForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) = 0;
+    virtual void didFailProvisionalLoadWithErrorForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, const WebCore::ResourceError&, API::Object*) = 0;
+    virtual void didCommitLoadForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) = 0;
+    virtual void didFinishDocumentLoadForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) = 0;
+    virtual void didFinishLoadForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) = 0;
+    virtual void didFailLoadWithErrorForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, const WebCore::ResourceError&, API::Object*) = 0;
+    virtual void didSameDocumentNavigationForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, WebKit::SameDocumentNavigationType, API::Object*) = 0;
+    virtual void didReceiveTitleForFrame(WebKit::WebPageProxy*, const WTF::String&, WebKit::WebFrameProxy*, API::Object*) = 0;
+    virtual void didFirstLayoutForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) = 0;
+
+    // FIXME: We should consider removing didFirstVisuallyNonEmptyLayoutForFrame since it is replaced by didLayout.
+    virtual void didFirstVisuallyNonEmptyLayoutForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) = 0;
+
+    virtual void didRemoveFrameFromHierarchy(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) = 0;
+    virtual void didDisplayInsecureContentForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) = 0;
+    virtual void didRunInsecureContentForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) = 0;
+    virtual void didDetectXSSForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, API::Object*) = 0;
+
+    virtual void didLayout(WebKit::WebPageProxy*, WebCore::LayoutMilestones, API::Object*) = 0;
+    
+    virtual bool canAuthenticateAgainstProtectionSpaceInFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, WebKit::WebProtectionSpace*) = 0;
+    virtual void didReceiveAuthenticationChallengeInFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, WebKit::AuthenticationChallengeProxy*) = 0;
+
+    virtual void didStartProgress(WebKit::WebPageProxy*) = 0;
+    virtual void didChangeProgress(WebKit::WebPageProxy*)= 0;
+    virtual void didFinishProgress(WebKit::WebPageProxy*)= 0;
+
+    // FIXME: These three functions should not be part of this client.
+    virtual void processDidBecomeUnresponsive(WebKit::WebPageProxy*) = 0;
+    virtual void interactionOccurredWhileProcessUnresponsive(WebKit::WebPageProxy*) = 0;
+    virtual void processDidBecomeResponsive(WebKit::WebPageProxy*) = 0;
+    virtual void processDidCrash(WebKit::WebPageProxy*) = 0;
+
+    virtual void didChangeBackForwardList(WebKit::WebPageProxy*, WebKit::WebBackForwardListItem* addedItem, Vector<RefPtr<API::Object>>* removedItems) = 0;
+    virtual void willGoToBackForwardListItem(WebKit::WebPageProxy*, WebKit::WebBackForwardListItem*, API::Object*) = 0;
+
+#if ENABLE(NETSCAPE_PLUGIN_API)
+    virtual WebKit::PluginModuleLoadPolicy pluginLoadPolicy(WebKit::WebPageProxy*, WebKit::PluginModuleLoadPolicy currentPluginLoadPolicy, WebKit::ImmutableDictionary*, WTF::String& unavailabilityDescription, WTF::String& useBlockedPluginTitle) = 0;
+    virtual void didFailToInitializePlugin(WebKit::WebPageProxy*, WebKit::ImmutableDictionary*) = 0;
+    virtual void didBlockInsecurePluginVersion(WebKit::WebPageProxy*, WebKit::ImmutableDictionary*) = 0;
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
+
+#if ENABLE(WEBGL)
+    virtual WebCore::WebGLLoadPolicy webGLLoadPolicy(WebKit::WebPageProxy*, const WTF::String&) const = 0;
+#endif // ENABLE(WEBGL)
+};
+
+} // namespace API
+
+#endif // APILoaderClient_h
index a89410c..0411273 100644 (file)
@@ -33,6 +33,8 @@
 #include "WKAPICast.h"
 #include "WKPluginInformation.h"
 #include "WebBackForwardList.h"
+#include "WebLoaderClient.h"
+#include "WebPageMessages.h"
 #include "WebPageProxy.h"
 #include "WebPolicyClient.h"
 #include "WebProcessProxy.h"
@@ -668,7 +670,23 @@ void WKPageSetPageFormClient(WKPageRef pageRef, const WKPageFormClientBase* wkCl
 
 void WKPageSetPageLoaderClient(WKPageRef pageRef, const WKPageLoaderClientBase* wkClient)
 {
-    toImpl(pageRef)->initializeLoaderClient(wkClient);
+    WebPageProxy* webPageProxy = toImpl(pageRef);
+
+    auto loaderClient = std::make_unique<WebLoaderClient>(wkClient);
+
+    // It would be nice to get rid of this code and transition all clients to using didLayout instead of
+    // didFirstLayoutInFrame and didFirstVisuallyNonEmptyLayoutInFrame. In the meantime, this is required
+    // for backwards compatibility.
+    WebCore::LayoutMilestones milestones = 0;
+    if (loaderClient->client().didFirstLayoutForFrame)
+        milestones |= WebCore::DidFirstLayout;
+    if (loaderClient->client().didFirstVisuallyNonEmptyLayoutForFrame)
+        milestones |= WebCore::DidFirstVisuallyNonEmptyLayout;
+
+    if (milestones)
+        webPageProxy->process().send(Messages::WebPage::ListenForLayoutMilestones(milestones), webPageProxy->pageID());
+
+    webPageProxy->setLoaderClient(std::move(loaderClient));
 }
 
 void WKPageSetPagePolicyClient(WKPageRef pageRef, const WKPagePolicyClientBase* wkClient)
index 47a877c..af6eac4 100644 (file)
@@ -616,7 +616,7 @@ static void setUpPageLoaderClient(WKBrowsingContextController *browsingContext,
 
     loaderClient.didLayout = didLayout;
 
-    page.initializeLoaderClient(&loaderClient.base);
+    WKPageSetPageLoaderClient(toAPI(&page), &loaderClient.base);
 }
 
 static WKPolicyDecisionHandler makePolicyDecisionBlock(WKFramePolicyListenerRef listener)
@@ -728,7 +728,7 @@ static void setUpPagePolicyClient(WKBrowsingContextController *browsingContext,
     if (loadDelegate)
         setUpPageLoaderClient(self, *_page);
     else
-        _page->initializeLoaderClient(nullptr);
+        _page->setLoaderClient(nullptr);
 }
 
 - (id <WKBrowsingContextPolicyDelegate>)policyDelegate
@@ -807,7 +807,7 @@ static void setUpPagePolicyClient(WKBrowsingContextController *browsingContext,
 
 + (WKBrowsingContextController *)_browsingContextControllerForPageRef:(WKPageRef)pageRef
 {
-    return (WKBrowsingContextController *)WebKit::toImpl(pageRef)->loaderClient().client().base.clientInfo;
+    return (WKBrowsingContextController *)static_cast<const WebLoaderClient*>(WebKit::toImpl(pageRef)->loaderClient())->client().base.clientInfo;
 }
 
 @end
index c138a27..74071ab 100644 (file)
@@ -38,6 +38,11 @@ using namespace WebCore;
 
 namespace WebKit {
 
+WebLoaderClient::WebLoaderClient(const WKPageLoaderClientBase* client)
+{
+    initialize(client);
+}
+
 void WebLoaderClient::didStartProvisionalLoadForFrame(WebPageProxy* page, WebFrameProxy* frame, API::Object* userData)
 {
     if (!m_client.didStartProvisionalLoadForFrame)
index 61518e8..eaa91c5 100644 (file)
 #define WebLoaderClient_h
 
 #include "APIClient.h"
-#include "PluginModuleInfo.h"
-#include "SameDocumentNavigationType.h"
-#include "WKPage.h"
-#include <WebCore/FrameLoaderTypes.h>
-#include <WebCore/LayoutMilestones.h>
-#include <wtf/Forward.h>
-#include <wtf/RefPtr.h>
-#include <wtf/Vector.h>
+#include "APILoaderClient.h"
+#include "WKPageLoaderClient.h"
 
 namespace API {
 class Object;
@@ -58,53 +52,56 @@ class WebFrameProxy;
 class WebPageProxy;
 class WebProtectionSpace;
 
-class WebLoaderClient : public API::Client<WKPageLoaderClientBase> {
+class WebLoaderClient : public API::Client<WKPageLoaderClientBase>, public API::LoaderClient {
 public:
-    void didStartProvisionalLoadForFrame(WebPageProxy*, WebFrameProxy*, API::Object*);
-    void didReceiveServerRedirectForProvisionalLoadForFrame(WebPageProxy*, WebFrameProxy*, API::Object*);
-    void didFailProvisionalLoadWithErrorForFrame(WebPageProxy*, WebFrameProxy*, const WebCore::ResourceError&, API::Object*);
-    void didCommitLoadForFrame(WebPageProxy*, WebFrameProxy*, API::Object*);
-    void didFinishDocumentLoadForFrame(WebPageProxy*, WebFrameProxy*, API::Object*);
-    void didFinishLoadForFrame(WebPageProxy*, WebFrameProxy*, API::Object*);
-    void didFailLoadWithErrorForFrame(WebPageProxy*, WebFrameProxy*, const WebCore::ResourceError&, API::Object*);
-    void didSameDocumentNavigationForFrame(WebPageProxy*, WebFrameProxy*, SameDocumentNavigationType, API::Object*);
-    void didReceiveTitleForFrame(WebPageProxy*, const String&, WebFrameProxy*, API::Object*);
-    void didFirstLayoutForFrame(WebPageProxy*, WebFrameProxy*, API::Object*);
+    explicit WebLoaderClient(const WKPageLoaderClientBase*);
+
+private:
+    virtual void didStartProvisionalLoadForFrame(WebPageProxy*, WebFrameProxy*, API::Object*) override;
+    virtual void didReceiveServerRedirectForProvisionalLoadForFrame(WebPageProxy*, WebFrameProxy*, API::Object*);
+    virtual void didFailProvisionalLoadWithErrorForFrame(WebPageProxy*, WebFrameProxy*, const WebCore::ResourceError&, API::Object*) override;
+    virtual void didCommitLoadForFrame(WebPageProxy*, WebFrameProxy*, API::Object*) override;
+    virtual void didFinishDocumentLoadForFrame(WebPageProxy*, WebFrameProxy*, API::Object*) override;
+    virtual void didFinishLoadForFrame(WebPageProxy*, WebFrameProxy*, API::Object*) override;
+    virtual void didFailLoadWithErrorForFrame(WebPageProxy*, WebFrameProxy*, const WebCore::ResourceError&, API::Object*) override;
+    virtual void didSameDocumentNavigationForFrame(WebPageProxy*, WebFrameProxy*, SameDocumentNavigationType, API::Object*) override;
+    virtual void didReceiveTitleForFrame(WebPageProxy*, const WTF::String&, WebFrameProxy*, API::Object*) override;
+    virtual void didFirstLayoutForFrame(WebPageProxy*, WebFrameProxy*, API::Object*) override;
 
     // FIXME: We should consider removing didFirstVisuallyNonEmptyLayoutForFrame since it is replaced by didLayout.
-    void didFirstVisuallyNonEmptyLayoutForFrame(WebPageProxy*, WebFrameProxy*, API::Object*);
+    virtual void didFirstVisuallyNonEmptyLayoutForFrame(WebPageProxy*, WebFrameProxy*, API::Object*) override;
 
-    void didRemoveFrameFromHierarchy(WebPageProxy*, WebFrameProxy*, API::Object*);
-    void didDisplayInsecureContentForFrame(WebPageProxy*, WebFrameProxy*, API::Object*);
-    void didRunInsecureContentForFrame(WebPageProxy*, WebFrameProxy*, API::Object*);
-    void didDetectXSSForFrame(WebPageProxy*, WebFrameProxy*, API::Object*);
+    virtual void didRemoveFrameFromHierarchy(WebPageProxy*, WebFrameProxy*, API::Object*) override;
+    virtual void didDisplayInsecureContentForFrame(WebPageProxy*, WebFrameProxy*, API::Object*) override;
+    virtual void didRunInsecureContentForFrame(WebPageProxy*, WebFrameProxy*, API::Object*) override;
+    virtual void didDetectXSSForFrame(WebPageProxy*, WebFrameProxy*, API::Object*) override;
 
-    void didLayout(WebPageProxy*, WebCore::LayoutMilestones, API::Object*);
+    virtual void didLayout(WebPageProxy*, WebCore::LayoutMilestones, API::Object*) override;
     
-    bool canAuthenticateAgainstProtectionSpaceInFrame(WebPageProxy*, WebFrameProxy*, WebProtectionSpace*);
-    void didReceiveAuthenticationChallengeInFrame(WebPageProxy*, WebFrameProxy*, AuthenticationChallengeProxy*);
+    bool canAuthenticateAgainstProtectionSpaceInFrame(WebPageProxy*, WebFrameProxy*, WebProtectionSpace*) override;
+    virtual void didReceiveAuthenticationChallengeInFrame(WebPageProxy*, WebFrameProxy*, AuthenticationChallengeProxy*) override;
 
-    void didStartProgress(WebPageProxy*);
-    void didChangeProgress(WebPageProxy*);
-    void didFinishProgress(WebPageProxy*);
+    virtual void didStartProgress(WebPageProxy*) override;
+    virtual void didChangeProgress(WebPageProxy*) override;
+    virtual void didFinishProgress(WebPageProxy*) override;
 
     // FIXME: These three functions should not be part of this client.
-    void processDidBecomeUnresponsive(WebPageProxy*);
-    void interactionOccurredWhileProcessUnresponsive(WebPageProxy*);
-    void processDidBecomeResponsive(WebPageProxy*);
-    void processDidCrash(WebPageProxy*);
+    virtual void processDidBecomeUnresponsive(WebPageProxy*) override;
+    virtual void interactionOccurredWhileProcessUnresponsive(WebPageProxy*) override;
+    virtual void processDidBecomeResponsive(WebPageProxy*) override;
+    virtual void processDidCrash(WebPageProxy*) override;
 
-    void didChangeBackForwardList(WebPageProxy*, WebBackForwardListItem* addedItem, Vector<RefPtr<API::Object>>* removedItems);
-    void willGoToBackForwardListItem(WebPageProxy*, WebBackForwardListItem*, API::Object*);
+    virtual void didChangeBackForwardList(WebPageProxy*, WebBackForwardListItem* addedItem, Vector<RefPtr<API::Object>>* removedItems) override;
+    virtual void willGoToBackForwardListItem(WebPageProxy*, WebBackForwardListItem*, API::Object*) override;
 
 #if ENABLE(NETSCAPE_PLUGIN_API)
-    PluginModuleLoadPolicy pluginLoadPolicy(WebPageProxy*, PluginModuleLoadPolicy currentPluginLoadPolicy, ImmutableDictionary*, String& unavailabilityDescription, String& useBlockedPluginTitle);
-    void didFailToInitializePlugin(WebPageProxy*, ImmutableDictionary*);
-    void didBlockInsecurePluginVersion(WebPageProxy*, ImmutableDictionary*);
+    PluginModuleLoadPolicy pluginLoadPolicy(WebPageProxy*, PluginModuleLoadPolicy currentPluginLoadPolicy, ImmutableDictionary*, WTF::String& unavailabilityDescription, WTF::String& useBlockedPluginTitle) override;
+    virtual void didFailToInitializePlugin(WebPageProxy*, ImmutableDictionary*) override;
+    virtual void didBlockInsecurePluginVersion(WebPageProxy*, ImmutableDictionary*) override;
 #endif // ENABLE(NETSCAPE_PLUGIN_API)
 
 #if ENABLE(WEBGL)
-    WebCore::WebGLLoadPolicy webGLLoadPolicy(WebPageProxy*, const String&) const;
+    WebCore::WebGLLoadPolicy webGLLoadPolicy(WebPageProxy*, const WTF::String&) const;
 #endif // ENABLE(WEBGL)
 };
 
index da5b733..1310cda 100644 (file)
@@ -28,6 +28,8 @@
 #include "WebPageProxy.h"
 
 #include "APIArray.h"
+#include "APILoaderClient.h"
+#include "APIPolicyClient.h"
 #include "APIURLRequest.h"
 #include "AuthenticationChallengeProxy.h"
 #include "AuthenticationDecisionListener.h"
@@ -398,24 +400,9 @@ PassRefPtr<API::Array> WebPageProxy::relatedPages() const
     return API::Array::create(std::move(result));
 }
 
-void WebPageProxy::initializeLoaderClient(const WKPageLoaderClientBase* loadClient)
+void WebPageProxy::setLoaderClient(std::unique_ptr<API::LoaderClient> loaderClient)
 {
-    m_loaderClient.initialize(loadClient);
-    
-    if (!loadClient)
-        return;
-
-    // It would be nice to get rid of this code and transition all clients to using didLayout instead of
-    // didFirstLayoutInFrame and didFirstVisuallyNonEmptyLayoutInFrame. In the meantime, this is required
-    // for backwards compatibility.
-    WebCore::LayoutMilestones milestones = 0;
-    if (m_loaderClient.client().didFirstLayoutForFrame)
-        milestones |= WebCore::DidFirstLayout;
-    if (m_loaderClient.client().didFirstVisuallyNonEmptyLayoutForFrame)
-        milestones |= WebCore::DidFirstVisuallyNonEmptyLayout;
-
-    if (milestones)
-        m_process->send(Messages::WebPage::ListenForLayoutMilestones(milestones), m_pageID);
+    m_loaderClient = std::move(loaderClient);
 }
 
 void WebPageProxy::setPolicyClient(std::unique_ptr<API::PolicyClient> policyClient)
@@ -557,7 +544,7 @@ void WebPageProxy::close()
 
     resetState();
 
-    m_loaderClient.initialize(0);
+    m_loaderClient = nullptr;
     m_policyClient = nullptr;
     m_formClient.initialize(0);
     m_uiClient.initialize(0);
@@ -830,7 +817,8 @@ void WebPageProxy::tryRestoreScrollPosition()
 
 void WebPageProxy::didChangeBackForwardList(WebBackForwardListItem* added, Vector<RefPtr<API::Object>>* removed)
 {
-    m_loaderClient.didChangeBackForwardList(this, added, removed);
+    if (m_loaderClient)
+        m_loaderClient->didChangeBackForwardList(this, added, removed);
 }
 
 void WebPageProxy::willGoToBackForwardListItem(uint64_t itemID, IPC::MessageDecoder& decoder)
@@ -840,8 +828,10 @@ void WebPageProxy::willGoToBackForwardListItem(uint64_t itemID, IPC::MessageDeco
     if (!decoder.decode(messageDecoder))
         return;
 
-    if (WebBackForwardListItem* item = m_process->webBackForwardItem(itemID))
-        m_loaderClient.willGoToBackForwardListItem(this, item, userData.get());
+    if (WebBackForwardListItem* item = m_process->webBackForwardItem(itemID)) {
+        if (m_loaderClient)
+            m_loaderClient->willGoToBackForwardListItem(this, item, userData.get());
+    }
 }
 
 bool WebPageProxy::canShowMIMEType(const String& mimeType)
@@ -1336,7 +1326,8 @@ void WebPageProxy::findPlugin(const String& mimeType, uint32_t processType, cons
 
 #if PLATFORM(MAC)
     RefPtr<ImmutableDictionary> pluginInformation = createPluginInformationDictionary(plugin, frameURLString, String(), pageURLString, String(), String());
-    pluginLoadPolicy = m_loaderClient.pluginLoadPolicy(this, static_cast<PluginModuleLoadPolicy>(pluginLoadPolicy), pluginInformation.get(), unavailabilityDescription, useBlockedPluginTitle);
+    if (m_loaderClient)
+        pluginLoadPolicy = m_loaderClient->pluginLoadPolicy(this, static_cast<PluginModuleLoadPolicy>(pluginLoadPolicy), pluginInformation.get(), unavailabilityDescription, useBlockedPluginTitle);
 #else
     UNUSED_PARAM(frameURLString);
     UNUSED_PARAM(pageURLString);
@@ -2072,7 +2063,8 @@ void WebPageProxy::didStartProgress()
     m_pageLoadState.didStartProgress(transaction);
 
     m_pageLoadState.commitChanges();
-    m_loaderClient.didStartProgress(this);
+    if (m_loaderClient)
+        m_loaderClient->didStartProgress(this);
 }
 
 void WebPageProxy::didChangeProgress(double value)
@@ -2081,7 +2073,8 @@ void WebPageProxy::didChangeProgress(double value)
     m_pageLoadState.didChangeProgress(transaction, value);
 
     m_pageLoadState.commitChanges();
-    m_loaderClient.didChangeProgress(this);
+    if (m_loaderClient)
+        m_loaderClient->didChangeProgress(this);
 }
 
 void WebPageProxy::didFinishProgress()
@@ -2090,7 +2083,8 @@ void WebPageProxy::didFinishProgress()
     m_pageLoadState.didFinishProgress(transaction);
 
     m_pageLoadState.commitChanges();
-    m_loaderClient.didFinishProgress(this);
+    if (m_loaderClient)
+        m_loaderClient->didFinishProgress(this);
 }
 
 void WebPageProxy::didStartProvisionalLoadForFrame(uint64_t frameID, const String& url, const String& unreachableURL, IPC::MessageDecoder& decoder)
@@ -2115,7 +2109,8 @@ void WebPageProxy::didStartProvisionalLoadForFrame(uint64_t frameID, const Strin
     frame->didStartProvisionalLoad(url);
 
     m_pageLoadState.commitChanges();
-    m_loaderClient.didStartProvisionalLoadForFrame(this, frame, userData.get());
+    if (m_loaderClient)
+        m_loaderClient->didStartProvisionalLoadForFrame(this, frame, userData.get());
 }
 
 void WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame(uint64_t frameID, const String& url, IPC::MessageDecoder& decoder)
@@ -2137,7 +2132,8 @@ void WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame(uint64_t f
     frame->didReceiveServerRedirectForProvisionalLoad(url);
 
     m_pageLoadState.commitChanges();
-    m_loaderClient.didReceiveServerRedirectForProvisionalLoadForFrame(this, frame, userData.get());
+    if (m_loaderClient)
+        m_loaderClient->didReceiveServerRedirectForProvisionalLoadForFrame(this, frame, userData.get());
 }
 
 void WebPageProxy::didFailProvisionalLoadForFrame(uint64_t frameID, const ResourceError& error, IPC::MessageDecoder& decoder)
@@ -2158,7 +2154,8 @@ void WebPageProxy::didFailProvisionalLoadForFrame(uint64_t frameID, const Resour
     frame->didFailProvisionalLoad();
 
     m_pageLoadState.commitChanges();
-    m_loaderClient.didFailProvisionalLoadWithErrorForFrame(this, frame, error, userData.get());
+    if (m_loaderClient)
+        m_loaderClient->didFailProvisionalLoadWithErrorForFrame(this, frame, error, userData.get());
 }
 
 void WebPageProxy::clearLoadDependentCallbacks()
@@ -2211,7 +2208,8 @@ void WebPageProxy::didCommitLoadForFrame(uint64_t frameID, const String& mimeTyp
         m_pageScaleFactor = 1;
 
     m_pageLoadState.commitChanges();
-    m_loaderClient.didCommitLoadForFrame(this, frame, userData.get());
+    if (m_loaderClient)
+        m_loaderClient->didCommitLoadForFrame(this, frame, userData.get());
 }
 
 void WebPageProxy::didFinishDocumentLoadForFrame(uint64_t frameID, IPC::MessageDecoder& decoder)
@@ -2224,7 +2222,8 @@ void WebPageProxy::didFinishDocumentLoadForFrame(uint64_t frameID, IPC::MessageD
     WebFrameProxy* frame = m_process->webFrame(frameID);
     MESSAGE_CHECK(frame);
 
-    m_loaderClient.didFinishDocumentLoadForFrame(this, frame, userData.get());
+    if (m_loaderClient)
+        m_loaderClient->didFinishDocumentLoadForFrame(this, frame, userData.get());
 }
 
 void WebPageProxy::didFinishLoadForFrame(uint64_t frameID, IPC::MessageDecoder& decoder)
@@ -2245,7 +2244,8 @@ void WebPageProxy::didFinishLoadForFrame(uint64_t frameID, IPC::MessageDecoder&
     frame->didFinishLoad();
 
     m_pageLoadState.commitChanges();
-    m_loaderClient.didFinishLoadForFrame(this, frame, userData.get());
+    if (m_loaderClient)
+        m_loaderClient->didFinishLoadForFrame(this, frame, userData.get());
 }
 
 void WebPageProxy::didFailLoadForFrame(uint64_t frameID, const ResourceError& error, IPC::MessageDecoder& decoder)
@@ -2268,7 +2268,8 @@ void WebPageProxy::didFailLoadForFrame(uint64_t frameID, const ResourceError& er
     frame->didFailLoad();
 
     m_pageLoadState.commitChanges();
-    m_loaderClient.didFailLoadWithErrorForFrame(this, frame, error, userData.get());
+    if (m_loaderClient)
+        m_loaderClient->didFailLoadWithErrorForFrame(this, frame, error, userData.get());
 }
 
 void WebPageProxy::didSameDocumentNavigationForFrame(uint64_t frameID, uint32_t opaqueSameDocumentNavigationType, const String& url, IPC::MessageDecoder& decoder)
@@ -2291,7 +2292,8 @@ void WebPageProxy::didSameDocumentNavigationForFrame(uint64_t frameID, uint32_t
     frame->didSameDocumentNavigation(url);
 
     m_pageLoadState.commitChanges();
-    m_loaderClient.didSameDocumentNavigationForFrame(this, frame, static_cast<SameDocumentNavigationType>(opaqueSameDocumentNavigationType), userData.get());
+    if (m_loaderClient)
+        m_loaderClient->didSameDocumentNavigationForFrame(this, frame, static_cast<SameDocumentNavigationType>(opaqueSameDocumentNavigationType), userData.get());
 }
 
 void WebPageProxy::didReceiveTitleForFrame(uint64_t frameID, const String& title, IPC::MessageDecoder& decoder)
@@ -2312,7 +2314,8 @@ void WebPageProxy::didReceiveTitleForFrame(uint64_t frameID, const String& title
     frame->didChangeTitle(title);
     
     m_pageLoadState.commitChanges();
-    m_loaderClient.didReceiveTitleForFrame(this, title, frame, userData.get());
+    if (m_loaderClient)
+        m_loaderClient->didReceiveTitleForFrame(this, title, frame, userData.get());
 }
 
 void WebPageProxy::didFirstLayoutForFrame(uint64_t frameID, IPC::MessageDecoder& decoder)
@@ -2325,7 +2328,8 @@ void WebPageProxy::didFirstLayoutForFrame(uint64_t frameID, IPC::MessageDecoder&
     WebFrameProxy* frame = m_process->webFrame(frameID);
     MESSAGE_CHECK(frame);
 
-    m_loaderClient.didFirstLayoutForFrame(this, frame, userData.get());
+    if (m_loaderClient)
+        m_loaderClient->didFirstLayoutForFrame(this, frame, userData.get());
 }
 
 void WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame(uint64_t frameID, IPC::MessageDecoder& decoder)
@@ -2338,7 +2342,8 @@ void WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame(uint64_t frameID, IPC:
     WebFrameProxy* frame = m_process->webFrame(frameID);
     MESSAGE_CHECK(frame);
 
-    m_loaderClient.didFirstVisuallyNonEmptyLayoutForFrame(this, frame, userData.get());
+    if (m_loaderClient)
+        m_loaderClient->didFirstVisuallyNonEmptyLayoutForFrame(this, frame, userData.get());
 }
 
 void WebPageProxy::didLayout(uint32_t layoutMilestones, IPC::MessageDecoder& decoder)
@@ -2348,7 +2353,8 @@ void WebPageProxy::didLayout(uint32_t layoutMilestones, IPC::MessageDecoder& dec
     if (!decoder.decode(messageDecoder))
         return;
 
-    m_loaderClient.didLayout(this, static_cast<LayoutMilestones>(layoutMilestones), userData.get());
+    if (m_loaderClient)
+        m_loaderClient->didLayout(this, static_cast<LayoutMilestones>(layoutMilestones), userData.get());
 }
 
 void WebPageProxy::didRemoveFrameFromHierarchy(uint64_t frameID, IPC::MessageDecoder& decoder)
@@ -2361,7 +2367,8 @@ void WebPageProxy::didRemoveFrameFromHierarchy(uint64_t frameID, IPC::MessageDec
     WebFrameProxy* frame = m_process->webFrame(frameID);
     MESSAGE_CHECK(frame);
 
-    m_loaderClient.didRemoveFrameFromHierarchy(this, frame, userData.get());
+    if (m_loaderClient)
+        m_loaderClient->didRemoveFrameFromHierarchy(this, frame, userData.get());
 }
 
 void WebPageProxy::didDisplayInsecureContentForFrame(uint64_t frameID, IPC::MessageDecoder& decoder)
@@ -2378,7 +2385,8 @@ void WebPageProxy::didDisplayInsecureContentForFrame(uint64_t frameID, IPC::Mess
     m_pageLoadState.didDisplayOrRunInsecureContent(transaction);
 
     m_pageLoadState.commitChanges();
-    m_loaderClient.didDisplayInsecureContentForFrame(this, frame, userData.get());
+    if (m_loaderClient)
+        m_loaderClient->didDisplayInsecureContentForFrame(this, frame, userData.get());
 }
 
 void WebPageProxy::didRunInsecureContentForFrame(uint64_t frameID, IPC::MessageDecoder& decoder)
@@ -2395,7 +2403,8 @@ void WebPageProxy::didRunInsecureContentForFrame(uint64_t frameID, IPC::MessageD
     m_pageLoadState.didDisplayOrRunInsecureContent(transaction);
 
     m_pageLoadState.commitChanges();
-    m_loaderClient.didRunInsecureContentForFrame(this, frame, userData.get());
+    if (m_loaderClient)
+        m_loaderClient->didRunInsecureContentForFrame(this, frame, userData.get());
 }
 
 void WebPageProxy::didDetectXSSForFrame(uint64_t frameID, IPC::MessageDecoder& decoder)
@@ -2408,7 +2417,8 @@ void WebPageProxy::didDetectXSSForFrame(uint64_t frameID, IPC::MessageDecoder& d
     WebFrameProxy* frame = m_process->webFrame(frameID);
     MESSAGE_CHECK(frame);
 
-    m_loaderClient.didDetectXSSForFrame(this, frame, userData.get());
+    if (m_loaderClient)
+        m_loaderClient->didDetectXSSForFrame(this, frame, userData.get());
 }
 
 void WebPageProxy::frameDidBecomeFrameSet(uint64_t frameID, bool value)
@@ -2699,7 +2709,10 @@ void WebPageProxy::unavailablePluginButtonClicked(uint32_t opaquePluginUnavailab
 #if ENABLE(WEBGL)
 void WebPageProxy::webGLPolicyForURL(const String& url, uint32_t& loadPolicy)
 {
-    loadPolicy = static_cast<uint32_t>(m_loaderClient.webGLLoadPolicy(this, url));
+    if (!m_loaderClient)
+        loadPolicy = WebGLAllow;
+    else
+        loadPolicy = static_cast<uint32_t>(m_loaderClient->webGLLoadPolicy(this, url));
 }
 #endif // ENABLE(WEBGL)
 
@@ -3729,7 +3742,8 @@ void WebPageProxy::processDidBecomeUnresponsive()
 
     updateBackingStoreDiscardableState();
 
-    m_loaderClient.processDidBecomeUnresponsive(this);
+    if (m_loaderClient)
+        m_loaderClient->processDidBecomeUnresponsive(this);
 }
 
 void WebPageProxy::interactionOccurredWhileProcessUnresponsive()
@@ -3737,7 +3751,8 @@ void WebPageProxy::interactionOccurredWhileProcessUnresponsive()
     if (!isValid())
         return;
 
-    m_loaderClient.interactionOccurredWhileProcessUnresponsive(this);
+    if (m_loaderClient)
+        m_loaderClient->interactionOccurredWhileProcessUnresponsive(this);
 }
 
 void WebPageProxy::processDidBecomeResponsive()
@@ -3747,7 +3762,8 @@ void WebPageProxy::processDidBecomeResponsive()
     
     updateBackingStoreDiscardableState();
 
-    m_loaderClient.processDidBecomeResponsive(this);
+    if (m_loaderClient)
+        m_loaderClient->processDidBecomeResponsive(this);
 }
 
 void WebPageProxy::processDidCrash()
@@ -3762,7 +3778,8 @@ void WebPageProxy::processDidCrash()
 
     m_pageClient.processDidCrash();
 
-    m_loaderClient.processDidCrash(this);
+    if (m_loaderClient)
+        m_loaderClient->processDidCrash(this);
 }
 
 void WebPageProxy::resetState()
@@ -3960,8 +3977,11 @@ void WebPageProxy::canAuthenticateAgainstProtectionSpaceInFrame(uint64_t frameID
     MESSAGE_CHECK(frame);
 
     RefPtr<WebProtectionSpace> protectionSpace = WebProtectionSpace::create(coreProtectionSpace);
-    
-    canAuthenticate = m_loaderClient.canAuthenticateAgainstProtectionSpaceInFrame(this, frame, protectionSpace.get());
+
+    if (!m_loaderClient)
+        canAuthenticate = false;
+    else
+        canAuthenticate = m_loaderClient->canAuthenticateAgainstProtectionSpaceInFrame(this, frame, protectionSpace.get());
 }
 
 void WebPageProxy::didReceiveAuthenticationChallenge(uint64_t frameID, const AuthenticationChallenge& coreChallenge, uint64_t challengeID)
@@ -3977,7 +3997,8 @@ void WebPageProxy::didReceiveAuthenticationChallengeProxy(uint64_t frameID, Pass
     MESSAGE_CHECK(frame);
 
     RefPtr<AuthenticationChallengeProxy> authenticationChallenge = prpAuthenticationChallenge;
-    m_loaderClient.didReceiveAuthenticationChallengeInFrame(this, frame, authenticationChallenge.get());
+    if (m_loaderClient)
+        m_loaderClient->didReceiveAuthenticationChallengeInFrame(this, frame, authenticationChallenge.get());
 }
 
 void WebPageProxy::exceededDatabaseQuota(uint64_t frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, PassRefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply> reply)
@@ -4135,7 +4156,8 @@ void WebPageProxy::didChangePageCount(unsigned pageCount)
 #if ENABLE(NETSCAPE_PLUGIN_API)
 void WebPageProxy::didFailToInitializePlugin(const String& mimeType, const String& frameURLString, const String& pageURLString)
 {
-    m_loaderClient.didFailToInitializePlugin(this, createPluginInformationDictionary(mimeType, frameURLString, pageURLString).get());
+    if (m_loaderClient)
+        m_loaderClient->didFailToInitializePlugin(this, createPluginInformationDictionary(mimeType, frameURLString, pageURLString).get());
 }
 
 void WebPageProxy::didBlockInsecurePluginVersion(const String& mimeType, const String& pluginURLString, const String& frameURLString, const String& pageURLString, bool replacementObscured)
@@ -4154,7 +4176,8 @@ void WebPageProxy::didBlockInsecurePluginVersion(const String& mimeType, const S
     UNUSED_PARAM(replacementObscured);
 #endif
 
-    m_loaderClient.didBlockInsecurePluginVersion(this, pluginInformation.get());
+    if (m_loaderClient)
+        m_loaderClient->didBlockInsecurePluginVersion(this, pluginInformation.get());
 }
 #endif // ENABLE(NETSCAPE_PLUGIN_API)
 
index ae8de74..fe1b9b7 100644 (file)
@@ -27,7 +27,6 @@
 #define WebPageProxy_h
 
 #include "APIObject.h"
-#include "APIPolicyClient.h"
 #include "APISession.h"
 #include "AutoCorrectionCallback.h"
 #include "Connection.h"
 #endif
 
 namespace API {
+class LoaderClient;
+class PolicyClient;
 class URLRequest;
 }
 
@@ -367,7 +368,7 @@ public:
     void initializeFindClient(const WKPageFindClientBase*);
     void initializeFindMatchesClient(const WKPageFindMatchesClientBase*);
     void initializeFormClient(const WKPageFormClientBase*);
-    void initializeLoaderClient(const WKPageLoaderClientBase*);
+    void setLoaderClient(std::unique_ptr<API::LoaderClient>);
     void setPolicyClient(std::unique_ptr<API::PolicyClient>);
     void initializeUIClient(const WKPageUIClientBase*);
 #if PLATFORM(EFL)
@@ -833,7 +834,7 @@ public:
     void endColorPicker();
 #endif
 
-    const WebLoaderClient& loaderClient() { return m_loaderClient; }
+    const API::LoaderClient* loaderClient() { return m_loaderClient.get(); }
 
     WebCore::IntSize minimumLayoutSize() const { return m_minimumLayoutSize; }
     void setMinimumLayoutSize(const WebCore::IntSize&);
@@ -1162,7 +1163,7 @@ private:
 #endif
 
     PageClient& m_pageClient;
-    WebLoaderClient m_loaderClient;
+    std::unique_ptr<API::LoaderClient> m_loaderClient;
     std::unique_ptr<API::PolicyClient> m_policyClient;
     WebFormClient m_formClient;
     WebUIClient m_uiClient;
index 56b644c..d24e696 100644 (file)
                1A2328FF162C866A00D82F7A /* MessageEncoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2328FD162C866A00D82F7A /* MessageEncoder.h */; };
                1A232902162C867300D82F7A /* MessageDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A232900162C867300D82F7A /* MessageDecoder.cpp */; };
                1A232903162C867300D82F7A /* MessageDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A232901162C867300D82F7A /* MessageDecoder.h */; };
+               1A2464F31891E45100234C5B /* APILoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2464F21891E45100234C5B /* APILoaderClient.h */; };
                1A24B5F211F531E800C38269 /* MachUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A24B5F011F531E800C38269 /* MachUtilities.cpp */; };
                1A24B5F311F531E800C38269 /* MachUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A24B5F111F531E800C38269 /* MachUtilities.h */; };
                1A24BED5120894D100FBB059 /* SharedMemory.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A24BED3120894D100FBB059 /* SharedMemory.h */; };
                1A2328FD162C866A00D82F7A /* MessageEncoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageEncoder.h; sourceTree = "<group>"; };
                1A232900162C867300D82F7A /* MessageDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MessageDecoder.cpp; sourceTree = "<group>"; };
                1A232901162C867300D82F7A /* MessageDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageDecoder.h; sourceTree = "<group>"; };
+               1A2464F21891E45100234C5B /* APILoaderClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APILoaderClient.h; sourceTree = "<group>"; };
                1A24B5F011F531E800C38269 /* MachUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MachUtilities.cpp; sourceTree = "<group>"; };
                1A24B5F111F531E800C38269 /* MachUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachUtilities.h; sourceTree = "<group>"; };
                1A24BED3120894D100FBB059 /* SharedMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SharedMemory.h; sourceTree = "<group>"; };
                                37C4C08318149C2A003688B9 /* Cocoa */,
                                BC8A501311765F4500757573 /* cpp */,
                                BC111B47112F616900337BAB /* mac */,
+                               1A2464F21891E45100234C5B /* APILoaderClient.h */,
                                1AFDD3141891B54000153970 /* APIPolicyClient.h */,
                        );
                        path = API;
                                515E772C184008B90007203F /* DatabaseProcessCreationParameters.h in Headers */,
                                33AA1067131F060000D4A575 /* WebCookieManagerProxyClient.h in Headers */,
                                3309344A1315B9220097A7BC /* WebCookieManagerProxyMessages.h in Headers */,
+                               1A2464F31891E45100234C5B /* APILoaderClient.h in Headers */,
                                BC1DD7B2114DC396005ADAF3 /* WebCoreArgumentCoders.h in Headers */,
                                512F589B12A8838800629530 /* WebCredential.h in Headers */,
                                51578B831209ECEF00A37C4A /* APIData.h in Headers */,