<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[179786] trunk/Source/WebKit2</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/179786">179786</a></dd>
<dt>Author</dt> <dd>timothy_horton@apple.com</dd>
<dt>Date</dt> <dd>2015-02-07 15:46:18 -0800 (Sat, 07 Feb 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add API::HistoryClient and split some things out of API::NavigationClient
https://bugs.webkit.org/show_bug.cgi?id=141264

Reviewed by Darin Adler.

* UIProcess/API/APIHistoryClient.h: Added.
(API::HistoryClient::~HistoryClient):
(API::HistoryClient::didNavigateWithNavigationData):
(API::HistoryClient::didPerformClientRedirect):
(API::HistoryClient::didPerformServerRedirect):
(API::HistoryClient::didUpdateHistoryTitle):
* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::didNavigateWithNavigationData): Deleted.
(API::NavigationClient::didPerformClientRedirect): Deleted.
(API::NavigationClient::didPerformServerRedirect): Deleted.
(API::NavigationClient::didUpdateHistoryTitle): Deleted.
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::createHistoryClient):
(WebKit::NavigationState::HistoryClient::HistoryClient):
(WebKit::NavigationState::HistoryClient::~HistoryClient):
(WebKit::NavigationState::HistoryClient::didNavigateWithNavigationData):
(WebKit::NavigationState::HistoryClient::didPerformClientRedirect):
(WebKit::NavigationState::HistoryClient::didPerformServerRedirect):
(WebKit::NavigationState::HistoryClient::didUpdateHistoryTitle):
(WebKit::NavigationState::NavigationClient::didNavigateWithNavigationData): Deleted.
(WebKit::NavigationState::NavigationClient::didPerformClientRedirect): Deleted.
(WebKit::NavigationState::NavigationClient::didPerformServerRedirect): Deleted.
(WebKit::NavigationState::NavigationClient::didUpdateHistoryTitle): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setHistoryClient):
(WebKit::WebPageProxy::didNavigateWithNavigationData):
(WebKit::WebPageProxy::didPerformClientRedirect):
(WebKit::WebPageProxy::didPerformServerRedirect):
(WebKit::WebPageProxy::didUpdateHistoryTitle):
* UIProcess/WebPageProxy.h:
Add a API::HistoryClient and move the few things that belong on it out of API::NavigationClient.
Adjust accordingly in WebPageProxy and NavigationState.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView setNavigationDelegate:]):
(-[WKWebView setUIDelegate:]):
(-[WKWebView _setHistoryDelegate:]):
Lazily push the NavigationState/UIDelegate clients down to WebPageProxy upon
installation of a delegate, so that alternative (C SPI) delegate setters can
be separately created.

* WebKit2.xcodeproj/project.pbxproj:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPINavigationClienth">trunk/Source/WebKit2/UIProcess/API/APINavigationClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaNavigationStateh">trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaNavigationStatemm">trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIHistoryClienth">trunk/Source/WebKit2/UIProcess/API/APIHistoryClient.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (179785 => 179786)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-02-07 23:17:26 UTC (rev 179785)
+++ trunk/Source/WebKit2/ChangeLog        2015-02-07 23:46:18 UTC (rev 179786)
</span><span class="lines">@@ -1,3 +1,55 @@
</span><ins>+2015-02-07  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+        Add API::HistoryClient and split some things out of API::NavigationClient
+        https://bugs.webkit.org/show_bug.cgi?id=141264
+
+        Reviewed by Darin Adler.
+
+        * UIProcess/API/APIHistoryClient.h: Added.
+        (API::HistoryClient::~HistoryClient):
+        (API::HistoryClient::didNavigateWithNavigationData):
+        (API::HistoryClient::didPerformClientRedirect):
+        (API::HistoryClient::didPerformServerRedirect):
+        (API::HistoryClient::didUpdateHistoryTitle):
+        * UIProcess/API/APINavigationClient.h:
+        (API::NavigationClient::didNavigateWithNavigationData): Deleted.
+        (API::NavigationClient::didPerformClientRedirect): Deleted.
+        (API::NavigationClient::didPerformServerRedirect): Deleted.
+        (API::NavigationClient::didUpdateHistoryTitle): Deleted.
+        * UIProcess/Cocoa/NavigationState.h:
+        * UIProcess/Cocoa/NavigationState.mm:
+        (WebKit::NavigationState::createHistoryClient):
+        (WebKit::NavigationState::HistoryClient::HistoryClient):
+        (WebKit::NavigationState::HistoryClient::~HistoryClient):
+        (WebKit::NavigationState::HistoryClient::didNavigateWithNavigationData):
+        (WebKit::NavigationState::HistoryClient::didPerformClientRedirect):
+        (WebKit::NavigationState::HistoryClient::didPerformServerRedirect):
+        (WebKit::NavigationState::HistoryClient::didUpdateHistoryTitle):
+        (WebKit::NavigationState::NavigationClient::didNavigateWithNavigationData): Deleted.
+        (WebKit::NavigationState::NavigationClient::didPerformClientRedirect): Deleted.
+        (WebKit::NavigationState::NavigationClient::didPerformServerRedirect): Deleted.
+        (WebKit::NavigationState::NavigationClient::didUpdateHistoryTitle): Deleted.
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::setHistoryClient):
+        (WebKit::WebPageProxy::didNavigateWithNavigationData):
+        (WebKit::WebPageProxy::didPerformClientRedirect):
+        (WebKit::WebPageProxy::didPerformServerRedirect):
+        (WebKit::WebPageProxy::didUpdateHistoryTitle):
+        * UIProcess/WebPageProxy.h:
+        Add a API::HistoryClient and move the few things that belong on it out of API::NavigationClient.
+        Adjust accordingly in WebPageProxy and NavigationState.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView initWithFrame:configuration:]):
+        (-[WKWebView setNavigationDelegate:]):
+        (-[WKWebView setUIDelegate:]):
+        (-[WKWebView _setHistoryDelegate:]):
+        Lazily push the NavigationState/UIDelegate clients down to WebPageProxy upon
+        installation of a delegate, so that alternative (C SPI) delegate setters can
+        be separately created.
+
+        * WebKit2.xcodeproj/project.pbxproj:
+
</ins><span class="cx"> 2015-02-07  Antti Koivisto  &lt;antti@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         And as a further followup restore the 8bit test too.
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIHistoryClienth"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/APIHistoryClient.h (0 => 179786)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIHistoryClient.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/APIHistoryClient.h        2015-02-07 23:46:18 UTC (rev 179786)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+/*
+ * Copyright (C) 2014, 2015 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 APIHistoryClient_h
+#define APIHistoryClient_h
+
+#include &lt;wtf/Forward.h&gt;
+
+namespace WebKit {
+class WebPageProxy;
+struct WebNavigationDataStore;
+}
+
+namespace API {
+
+class HistoryClient {
+public:
+    virtual ~HistoryClient() { }
+
+    virtual void didNavigateWithNavigationData(WebKit::WebPageProxy&amp;, const WebKit::WebNavigationDataStore&amp;) { }
+    virtual void didPerformClientRedirect(WebKit::WebPageProxy&amp;, const WTF::String&amp;, const WTF::String&amp;) { }
+    virtual void didPerformServerRedirect(WebKit::WebPageProxy&amp;, const WTF::String&amp;, const WTF::String&amp;) { }
+    virtual void didUpdateHistoryTitle(WebKit::WebPageProxy&amp;, const WTF::String&amp;, const WTF::String&amp;) { }
+};
+
+} // namespace API
+
+#endif // APIHistoryClient_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPINavigationClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APINavigationClient.h (179785 => 179786)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APINavigationClient.h        2015-02-07 23:17:26 UTC (rev 179785)
+++ trunk/Source/WebKit2/UIProcess/API/APINavigationClient.h        2015-02-07 23:46:18 UTC (rev 179786)
</span><span class="lines">@@ -85,11 +85,6 @@
</span><span class="cx"> 
</span><span class="cx">     virtual PassRefPtr&lt;Data&gt; webCryptoMasterKey(WebKit::WebPageProxy&amp;) { return nullptr; }
</span><span class="cx"> 
</span><del>-    virtual void didNavigateWithNavigationData(WebKit::WebPageProxy&amp;, const WebKit::WebNavigationDataStore&amp;) { }
-    virtual void didPerformClientRedirect(WebKit::WebPageProxy&amp;, const WTF::String&amp;, const WTF::String&amp;) { }
-    virtual void didPerformServerRedirect(WebKit::WebPageProxy&amp;, const WTF::String&amp;, const WTF::String&amp;) { }
-    virtual void didUpdateHistoryTitle(WebKit::WebPageProxy&amp;, const WTF::String&amp;, const WTF::String&amp;) { }
-
</del><span class="cx"> #if USE(QUICK_LOOK)
</span><span class="cx">     virtual void didStartLoadForQuickLookDocumentInMainFrame(const WTF::String&amp; fileName, const WTF::String&amp; uti) { }
</span><span class="cx">     virtual void didFinishLoadForQuickLookDocumentInMainFrame(const WebKit::QuickLookDocumentData&amp;) { }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (179785 => 179786)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2015-02-07 23:17:26 UTC (rev 179785)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2015-02-07 23:46:18 UTC (rev 179786)
</span><span class="lines">@@ -357,11 +357,7 @@
</span><span class="cx">         _page-&gt;setApplicationNameForUserAgent(applicationNameForUserAgent);
</span><span class="cx"> 
</span><span class="cx">     _navigationState = std::make_unique&lt;WebKit::NavigationState&gt;(self);
</span><del>-    _page-&gt;setNavigationClient(_navigationState-&gt;createNavigationClient());
-
</del><span class="cx">     _uiDelegate = std::make_unique&lt;WebKit::UIDelegate&gt;(self);
</span><del>-    _page-&gt;setUIClient(_uiDelegate-&gt;createUIClient());
-
</del><span class="cx">     _page-&gt;setFindClient(std::make_unique&lt;WebKit::FindClient&gt;(self));
</span><span class="cx">     _page-&gt;setDiagnosticLoggingClient(std::make_unique&lt;WebKit::DiagnosticLoggingClient&gt;(self));
</span><span class="cx"> 
</span><span class="lines">@@ -412,6 +408,7 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)setNavigationDelegate:(id &lt;WKNavigationDelegate&gt;)navigationDelegate
</span><span class="cx"> {
</span><ins>+    _page-&gt;setNavigationClient(_navigationState-&gt;createNavigationClient());
</ins><span class="cx">     _navigationState-&gt;setNavigationDelegate(navigationDelegate);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -422,6 +419,7 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)setUIDelegate:(id&lt;WKUIDelegate&gt;)UIDelegate
</span><span class="cx"> {
</span><ins>+    _page-&gt;setUIClient(_uiDelegate-&gt;createUIClient());
</ins><span class="cx">     _uiDelegate-&gt;setDelegate(UIDelegate);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1667,6 +1665,7 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setHistoryDelegate:(id &lt;WKHistoryDelegatePrivate&gt;)historyDelegate
</span><span class="cx"> {
</span><ins>+    _page-&gt;setHistoryClient(_navigationState-&gt;createHistoryClient());
</ins><span class="cx">     _navigationState-&gt;setHistoryDelegate(historyDelegate);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaNavigationStateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h (179785 => 179786)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h        2015-02-07 23:17:26 UTC (rev 179785)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h        2015-02-07 23:46:18 UTC (rev 179786)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx"> 
</span><ins>+#import &quot;APIHistoryClient.h&quot;
</ins><span class="cx"> #import &quot;APINavigationClient.h&quot;
</span><span class="cx"> #import &quot;PageLoadState.h&quot;
</span><span class="cx"> #import &quot;ProcessThrottler.h&quot;
</span><span class="lines">@@ -57,6 +58,7 @@
</span><span class="cx">     static NavigationState&amp; fromWebPage(WebPageProxy&amp;);
</span><span class="cx"> 
</span><span class="cx">     std::unique_ptr&lt;API::NavigationClient&gt; createNavigationClient();
</span><ins>+    std::unique_ptr&lt;API::HistoryClient&gt; createHistoryClient();
</ins><span class="cx"> 
</span><span class="cx">     RetainPtr&lt;id &lt;WKNavigationDelegate&gt; &gt; navigationDelegate();
</span><span class="cx">     void setNavigationDelegate(id &lt;WKNavigationDelegate&gt;);
</span><span class="lines">@@ -94,11 +96,6 @@
</span><span class="cx">         virtual void processDidCrash(WebPageProxy&amp;) override;
</span><span class="cx">         virtual PassRefPtr&lt;API::Data&gt; webCryptoMasterKey(WebPageProxy&amp;) override;
</span><span class="cx"> 
</span><del>-        virtual void didNavigateWithNavigationData(WebPageProxy&amp;, const WebNavigationDataStore&amp;) override;
-        virtual void didPerformClientRedirect(WebPageProxy&amp;, const WTF::String&amp;, const WTF::String&amp;) override;
-        virtual void didPerformServerRedirect(WebPageProxy&amp;, const WTF::String&amp;, const WTF::String&amp;) override;
-        virtual void didUpdateHistoryTitle(WebPageProxy&amp;, const WTF::String&amp;, const WTF::String&amp;) override;
-
</del><span class="cx"> #if USE(QUICK_LOOK)
</span><span class="cx">         virtual void didStartLoadForQuickLookDocumentInMainFrame(const WTF::String&amp; fileName, const WTF::String&amp; uti) override;
</span><span class="cx">         virtual void didFinishLoadForQuickLookDocumentInMainFrame(const QuickLookDocumentData&amp;) override;
</span><span class="lines">@@ -109,6 +106,20 @@
</span><span class="cx"> 
</span><span class="cx">         NavigationState&amp; m_navigationState;
</span><span class="cx">     };
</span><ins>+    
+    class HistoryClient final : public API::HistoryClient {
+    public:
+        explicit HistoryClient(NavigationState&amp;);
+        ~HistoryClient();
+        
+    private:
+        virtual void didNavigateWithNavigationData(WebPageProxy&amp;, const WebNavigationDataStore&amp;) override;
+        virtual void didPerformClientRedirect(WebPageProxy&amp;, const WTF::String&amp;, const WTF::String&amp;) override;
+        virtual void didPerformServerRedirect(WebPageProxy&amp;, const WTF::String&amp;, const WTF::String&amp;) override;
+        virtual void didUpdateHistoryTitle(WebPageProxy&amp;, const WTF::String&amp;, const WTF::String&amp;) override;
+        
+        NavigationState&amp; m_navigationState;
+    };
</ins><span class="cx"> 
</span><span class="cx">     // PageLoadState::Observer
</span><span class="cx">     virtual void willChangeIsLoading() override;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaNavigationStatemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm (179785 => 179786)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm        2015-02-07 23:17:26 UTC (rev 179785)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm        2015-02-07 23:46:18 UTC (rev 179786)
</span><span class="lines">@@ -108,6 +108,11 @@
</span><span class="cx"> {
</span><span class="cx">     return std::make_unique&lt;NavigationClient&gt;(*this);
</span><span class="cx"> }
</span><ins>+    
+std::unique_ptr&lt;API::HistoryClient&gt; NavigationState::createHistoryClient()
+{
+    return std::make_unique&lt;HistoryClient&gt;(*this);
+}
</ins><span class="cx"> 
</span><span class="cx"> RetainPtr&lt;id &lt;WKNavigationDelegate&gt; &gt; NavigationState::navigationDelegate()
</span><span class="cx"> {
</span><span class="lines">@@ -634,9 +639,18 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> // HistoryDelegatePrivate support
</span><ins>+    
+NavigationState::HistoryClient::HistoryClient(NavigationState&amp; navigationState)
+    : m_navigationState(navigationState)
+{
+}
</ins><span class="cx"> 
</span><del>-void NavigationState::NavigationClient::didNavigateWithNavigationData(WebKit::WebPageProxy&amp;, const WebKit::WebNavigationDataStore&amp; navigationDataStore)
</del><ins>+NavigationState::HistoryClient::~HistoryClient()
</ins><span class="cx"> {
</span><ins>+}
+
+void NavigationState::HistoryClient::didNavigateWithNavigationData(WebKit::WebPageProxy&amp;, const WebKit::WebNavigationDataStore&amp; navigationDataStore)
+{
</ins><span class="cx">     if (!m_navigationState.m_historyDelegateMethods.webViewDidNavigateWithNavigationData)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -647,7 +661,7 @@
</span><span class="cx">     [historyDelegate _webView:m_navigationState.m_webView didNavigateWithNavigationData:wrapper(*API::NavigationData::create(navigationDataStore))];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NavigationState::NavigationClient::didPerformClientRedirect(WebKit::WebPageProxy&amp;, const WTF::String&amp; sourceURL, const WTF::String&amp; destinationURL)
</del><ins>+void NavigationState::HistoryClient::didPerformClientRedirect(WebKit::WebPageProxy&amp;, const WTF::String&amp; sourceURL, const WTF::String&amp; destinationURL)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_navigationState.m_historyDelegateMethods.webViewDidPerformClientRedirectFromURLToURL)
</span><span class="cx">         return;
</span><span class="lines">@@ -659,7 +673,7 @@
</span><span class="cx">     [historyDelegate _webView:m_navigationState.m_webView didPerformClientRedirectFromURL:[NSURL _web_URLWithWTFString:sourceURL] toURL:[NSURL _web_URLWithWTFString:destinationURL]];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NavigationState::NavigationClient::didPerformServerRedirect(WebKit::WebPageProxy&amp;, const WTF::String&amp; sourceURL, const WTF::String&amp; destinationURL)
</del><ins>+void NavigationState::HistoryClient::didPerformServerRedirect(WebKit::WebPageProxy&amp;, const WTF::String&amp; sourceURL, const WTF::String&amp; destinationURL)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_navigationState.m_historyDelegateMethods.webViewDidPerformServerRedirectFromURLToURL)
</span><span class="cx">         return;
</span><span class="lines">@@ -671,7 +685,7 @@
</span><span class="cx">     [historyDelegate _webView:m_navigationState.m_webView didPerformServerRedirectFromURL:[NSURL _web_URLWithWTFString:sourceURL] toURL:[NSURL _web_URLWithWTFString:destinationURL]];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NavigationState::NavigationClient::didUpdateHistoryTitle(WebKit::WebPageProxy&amp;, const WTF::String&amp; title, const WTF::String&amp; url)
</del><ins>+void NavigationState::HistoryClient::didUpdateHistoryTitle(WebKit::WebPageProxy&amp;, const WTF::String&amp; title, const WTF::String&amp; url)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_navigationState.m_historyDelegateMethods.webViewDidUpdateHistoryTitleForURL)
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (179785 => 179786)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2015-02-07 23:17:26 UTC (rev 179785)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2015-02-07 23:46:18 UTC (rev 179786)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include &quot;APIFormClient.h&quot;
</span><span class="cx"> #include &quot;APIFrameInfo.h&quot;
</span><span class="cx"> #include &quot;APIGeometry.h&quot;
</span><ins>+#include &quot;APIHistoryClient.h&quot;
</ins><span class="cx"> #include &quot;APILegacyContextHistoryClient.h&quot;
</span><span class="cx"> #include &quot;APILoaderClient.h&quot;
</span><span class="cx"> #include &quot;APINavigation.h&quot;
</span><span class="lines">@@ -508,6 +509,11 @@
</span><span class="cx"> 
</span><span class="cx">     preferencesDidChange();
</span><span class="cx"> }
</span><ins>+    
+void WebPageProxy::setHistoryClient(std::unique_ptr&lt;API::HistoryClient&gt; historyClient)
+{
+    m_historyClient = WTF::move(historyClient);
+}
</ins><span class="cx"> 
</span><span class="cx"> void WebPageProxy::setNavigationClient(std::unique_ptr&lt;API::NavigationClient&gt; navigationClient)
</span><span class="cx"> {
</span><span class="lines">@@ -3155,9 +3161,9 @@
</span><span class="cx">     MESSAGE_CHECK(frame);
</span><span class="cx">     MESSAGE_CHECK(frame-&gt;page() == this);
</span><span class="cx"> 
</span><del>-    if (m_navigationClient) {
</del><ins>+    if (m_historyClient) {
</ins><span class="cx">         if (frame-&gt;isMainFrame())
</span><del>-            m_navigationClient-&gt;didNavigateWithNavigationData(*this, store);
</del><ins>+            m_historyClient-&gt;didNavigateWithNavigationData(*this, store);
</ins><span class="cx">     } else
</span><span class="cx">         m_loaderClient-&gt;didNavigateWithNavigationData(*this, store, *frame);
</span><span class="cx">     process().processPool().historyClient().didNavigateWithNavigationData(process().processPool(), *this, store, *frame);
</span><span class="lines">@@ -3175,9 +3181,9 @@
</span><span class="cx">     MESSAGE_CHECK_URL(sourceURLString);
</span><span class="cx">     MESSAGE_CHECK_URL(destinationURLString);
</span><span class="cx"> 
</span><del>-    if (m_navigationClient) {
</del><ins>+    if (m_historyClient) {
</ins><span class="cx">         if (frame-&gt;isMainFrame())
</span><del>-            m_navigationClient-&gt;didPerformClientRedirect(*this, sourceURLString, destinationURLString);
</del><ins>+            m_historyClient-&gt;didPerformClientRedirect(*this, sourceURLString, destinationURLString);
</ins><span class="cx">     } else
</span><span class="cx">         m_loaderClient-&gt;didPerformClientRedirect(*this, sourceURLString, destinationURLString, *frame);
</span><span class="cx">     process().processPool().historyClient().didPerformClientRedirect(process().processPool(), *this, sourceURLString, destinationURLString, *frame);
</span><span class="lines">@@ -3195,9 +3201,9 @@
</span><span class="cx">     MESSAGE_CHECK_URL(sourceURLString);
</span><span class="cx">     MESSAGE_CHECK_URL(destinationURLString);
</span><span class="cx"> 
</span><del>-    if (m_navigationClient) {
</del><ins>+    if (m_historyClient) {
</ins><span class="cx">         if (frame-&gt;isMainFrame())
</span><del>-            m_navigationClient-&gt;didPerformServerRedirect(*this, sourceURLString, destinationURLString);
</del><ins>+            m_historyClient-&gt;didPerformServerRedirect(*this, sourceURLString, destinationURLString);
</ins><span class="cx">     } else
</span><span class="cx">         m_loaderClient-&gt;didPerformServerRedirect(*this, sourceURLString, destinationURLString, *frame);
</span><span class="cx">     process().processPool().historyClient().didPerformServerRedirect(process().processPool(), *this, sourceURLString, destinationURLString, *frame);
</span><span class="lines">@@ -3211,9 +3217,9 @@
</span><span class="cx"> 
</span><span class="cx">     MESSAGE_CHECK_URL(url);
</span><span class="cx"> 
</span><del>-    if (m_navigationClient) {
</del><ins>+    if (m_historyClient) {
</ins><span class="cx">         if (frame-&gt;isMainFrame())
</span><del>-            m_navigationClient-&gt;didUpdateHistoryTitle(*this, title, url);
</del><ins>+            m_historyClient-&gt;didUpdateHistoryTitle(*this, title, url);
</ins><span class="cx">     } else
</span><span class="cx">         m_loaderClient-&gt;didUpdateHistoryTitle(*this, title, url, *frame);
</span><span class="cx">     process().processPool().historyClient().didUpdateHistoryTitle(process().processPool(), *this, title, url, *frame);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (179785 => 179786)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2015-02-07 23:17:26 UTC (rev 179785)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2015-02-07 23:46:18 UTC (rev 179786)
</span><span class="lines">@@ -115,6 +115,7 @@
</span><span class="cx"> class ContextMenuClient;
</span><span class="cx"> class FindClient;
</span><span class="cx"> class FormClient;
</span><ins>+class HistoryClient;
</ins><span class="cx"> class LoaderClient;
</span><span class="cx"> class Navigation;
</span><span class="cx"> class NavigationClient;
</span><span class="lines">@@ -316,6 +317,7 @@
</span><span class="cx">     void initializeFindMatchesClient(const WKPageFindMatchesClientBase*);
</span><span class="cx">     void setFormClient(std::unique_ptr&lt;API::FormClient&gt;);
</span><span class="cx">     void setNavigationClient(std::unique_ptr&lt;API::NavigationClient&gt;);
</span><ins>+    void setHistoryClient(std::unique_ptr&lt;API::HistoryClient&gt;);
</ins><span class="cx">     void setLoaderClient(std::unique_ptr&lt;API::LoaderClient&gt;);
</span><span class="cx">     void setPolicyClient(std::unique_ptr&lt;API::PolicyClient&gt;);
</span><span class="cx"> 
</span><span class="lines">@@ -1374,6 +1376,7 @@
</span><span class="cx">     std::unique_ptr&lt;API::LoaderClient&gt; m_loaderClient;
</span><span class="cx">     std::unique_ptr&lt;API::PolicyClient&gt; m_policyClient;
</span><span class="cx">     std::unique_ptr&lt;API::NavigationClient&gt; m_navigationClient;
</span><ins>+    std::unique_ptr&lt;API::HistoryClient&gt; m_historyClient;
</ins><span class="cx">     std::unique_ptr&lt;API::FormClient&gt; m_formClient;
</span><span class="cx">     std::unique_ptr&lt;API::UIClient&gt; m_uiClient;
</span><span class="cx"> #if PLATFORM(EFL)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (179785 => 179786)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2015-02-07 23:17:26 UTC (rev 179785)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2015-02-07 23:46:18 UTC (rev 179786)
</span><span class="lines">@@ -649,6 +649,7 @@
</span><span class="cx">                 2DA944BD188511E700ED86DB /* NetworkProcessIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DA944BC188511E700ED86DB /* NetworkProcessIOS.mm */; };
</span><span class="cx">                 2DABA7721A817B1700EF0F1A /* WKPageRenderingProgressEventsInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DABA7711A817B1700EF0F1A /* WKPageRenderingProgressEventsInternal.h */; };
</span><span class="cx">                 2DABA7741A817EE600EF0F1A /* WKPluginLoadPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DABA7731A817EE600EF0F1A /* WKPluginLoadPolicy.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                2DABA7761A82B42100EF0F1A /* APIHistoryClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DABA7751A82B42100EF0F1A /* APIHistoryClient.h */; };
</ins><span class="cx">                 2DACE64E18ADBFF000E4CA76 /* _WKThumbnailViewInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DACE64D18ADBFF000E4CA76 /* _WKThumbnailViewInternal.h */; };
</span><span class="cx">                 2DAF06D618BD1A470081CEB1 /* SmartMagnificationController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DAF06D418BD1A470081CEB1 /* SmartMagnificationController.h */; };
</span><span class="cx">                 2DAF06D718BD1A470081CEB1 /* SmartMagnificationController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DAF06D518BD1A470081CEB1 /* SmartMagnificationController.mm */; };
</span><span class="lines">@@ -2771,6 +2772,7 @@
</span><span class="cx">                 2DA944BC188511E700ED86DB /* NetworkProcessIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = NetworkProcessIOS.mm; path = NetworkProcess/ios/NetworkProcessIOS.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2DABA7711A817B1700EF0F1A /* WKPageRenderingProgressEventsInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKPageRenderingProgressEventsInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2DABA7731A817EE600EF0F1A /* WKPluginLoadPolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKPluginLoadPolicy.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                2DABA7751A82B42100EF0F1A /* APIHistoryClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIHistoryClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 2DACE64D18ADBFF000E4CA76 /* _WKThumbnailViewInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKThumbnailViewInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2DAF06D418BD1A470081CEB1 /* SmartMagnificationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SmartMagnificationController.h; path = ios/SmartMagnificationController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2DAF06D518BD1A470081CEB1 /* SmartMagnificationController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = SmartMagnificationController.mm; path = ios/SmartMagnificationController.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -6184,6 +6186,7 @@
</span><span class="cx">                                 37E25D6D18FDE5D6005D3A00 /* APIFormClient.h */,
</span><span class="cx">                                 2DF9EEE31A781FB400B6CFBE /* APIFrameInfo.cpp */,
</span><span class="cx">                                 2DF9EEE41A781FB400B6CFBE /* APIFrameInfo.h */,
</span><ins>+                                2DABA7751A82B42100EF0F1A /* APIHistoryClient.h */,
</ins><span class="cx">                                 7CE4D2061A46775700C7F152 /* APILegacyContextHistoryClient.h */,
</span><span class="cx">                                 1A2464F21891E45100234C5B /* APILoaderClient.h */,
</span><span class="cx">                                 7CD3A4801A5D02FA009623B8 /* APINavigation.cpp */,
</span><span class="lines">@@ -7786,6 +7789,7 @@
</span><span class="cx">                                 1AE00D6C18327C1200087DD7 /* StringReference.h in Headers */,
</span><span class="cx">                                 296BD85D15019BC30071F424 /* StringUtilities.h in Headers */,
</span><span class="cx">                                 CE1A0BD61A48E6C60054EF74 /* TCCSPI.h in Headers */,
</span><ins>+                                2DABA7761A82B42100EF0F1A /* APIHistoryClient.h in Headers */,
</ins><span class="cx">                                 1AA417CB12C00CCA002BE67B /* TextChecker.h in Headers */,
</span><span class="cx">                                 1QQ417CB12C00CCA002BE67B /* TextCheckerCompletion.h in Headers */,
</span><span class="cx">                                 1A5E4DA412D3BD3D0099A2BB /* TextCheckerState.h in Headers */,
</span></span></pre>
</div>
</div>

</body>
</html>