<!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>[163098] trunk</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/163098">163098</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2014-01-30 12:00:12 -0800 (Thu, 30 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add WKNavigationDelegate class
https://bugs.webkit.org/show_bug.cgi?id=127927

Reviewed by Dan Bernstein.

Source/WebKit2:

* UIProcess/API/Cocoa/WKNavigationDelegate.h: Copied from Source/WebKit2/UIProcess/Cocoa/NavigationState.h.
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView navigationDelegate]):
(-[WKWebView setNavigationDelegate:]):
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::navigationDelegate):
(WebKit::NavigationState::setNavigationDelegate):
* WebKit2.xcodeproj/project.pbxproj:

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm:
(TEST):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.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="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2CocoaNavigationmm">trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm</a></li>
</ul>

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

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (163097 => 163098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-01-30 19:50:03 UTC (rev 163097)
+++ trunk/Source/WebKit2/ChangeLog        2014-01-30 20:00:12 UTC (rev 163098)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2014-01-30  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Add WKNavigationDelegate class
+        https://bugs.webkit.org/show_bug.cgi?id=127927
+
+        Reviewed by Dan Bernstein.
+
+        * UIProcess/API/Cocoa/WKNavigationDelegate.h: Copied from Source/WebKit2/UIProcess/Cocoa/NavigationState.h.
+        * UIProcess/API/Cocoa/WKWebView.h:
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView navigationDelegate]):
+        (-[WKWebView setNavigationDelegate:]):
+        * UIProcess/Cocoa/NavigationState.h:
+        * UIProcess/Cocoa/NavigationState.mm:
+        (WebKit::NavigationState::navigationDelegate):
+        (WebKit::NavigationState::setNavigationDelegate):
+        * WebKit2.xcodeproj/project.pbxproj:
+
</ins><span class="cx"> 2014-01-30  Tim Horton  &lt;timothy_horton@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         WebKit2 View Gestures (Swipe): Provide a way for clients to provide views to swipe
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKNavigationDelegatehfromrev163097trunkSourceWebKit2UIProcessCocoaNavigationStateh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationDelegate.h (from rev 163097, trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h) (0 => 163098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationDelegate.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationDelegate.h        2014-01-30 20:00:12 UTC (rev 163098)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+/*
+ * 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.
+ */
+
+#import &lt;Foundation/Foundation.h&gt;
+#import &lt;WebKit2/WKFoundation.h&gt;
+
+#if WK_API_ENABLED
+
+@protocol WKNavigationDelegate &lt;NSObject&gt;
+
+@end
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h (163097 => 163098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h        2014-01-30 19:50:03 UTC (rev 163097)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h        2014-01-30 20:00:12 UTC (rev 163098)
</span><span class="lines">@@ -37,6 +37,8 @@
</span><span class="cx"> @class WKNavigation;
</span><span class="cx"> @class WKWebViewConfiguration;
</span><span class="cx"> 
</span><ins>+@protocol WKNavigationDelegate;
+
</ins><span class="cx"> /*!
</span><span class="cx">  A @link WKWebView @/link displays interactive Web content.
</span><span class="cx">  @helperclass @link WKWebViewConfiguration @/link
</span><span class="lines">@@ -53,6 +55,8 @@
</span><span class="cx"> /*! @abstract A copy of the configuration with which the @link WKWebView @/link was initialized. */
</span><span class="cx"> @property (nonatomic, readonly) WKWebViewConfiguration *configuration;
</span><span class="cx"> 
</span><ins>+@property (nonatomic, weak) id &lt;WKNavigationDelegate&gt; navigationDelegate;
+
</ins><span class="cx"> /*! @abstract Returns a view initialized with the specified frame and configuration.
</span><span class="cx">  @param frame The frame for the new view.
</span><span class="cx">  @param configuration The configuration for the new view.
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (163097 => 163098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2014-01-30 19:50:03 UTC (rev 163097)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2014-01-30 20:00:12 UTC (rev 163098)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx"> 
</span><span class="cx"> #import &quot;NavigationState.h&quot;
</span><ins>+#import &quot;WKNavigationDelegate.h&quot;
</ins><span class="cx"> #import &quot;WKNavigationInternal.h&quot;
</span><span class="cx"> #import &quot;WKProcessClass.h&quot;
</span><span class="cx"> #import &quot;WKWebViewConfiguration.h&quot;
</span><span class="lines">@@ -126,6 +127,16 @@
</span><span class="cx">     return [[_configuration copy] autorelease];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (id &lt;WKNavigationDelegate&gt;)navigationDelegate
+{
+    return [_navigationState-&gt;navigationDelegate().leakRef() autorelease];
+}
+
+- (void)setNavigationDelegate:(id &lt;WKNavigationDelegate&gt;)navigationDelegate
+{
+    _navigationState-&gt;setNavigationDelegate(navigationDelegate);
+}
+
</ins><span class="cx"> - (WKNavigation *)loadRequest:(NSURLRequest *)request
</span><span class="cx"> {
</span><span class="cx">     uint64_t navigationID = _page-&gt;loadRequest(request);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaNavigationStateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h (163097 => 163098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h        2014-01-30 19:50:03 UTC (rev 163097)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h        2014-01-30 20:00:12 UTC (rev 163098)
</span><span class="lines">@@ -32,9 +32,11 @@
</span><span class="cx"> 
</span><span class="cx"> #import &lt;wtf/HashMap.h&gt;
</span><span class="cx"> #import &lt;wtf/RetainPtr.h&gt;
</span><ins>+#import &quot;WeakObjCPtr.h&quot;
</ins><span class="cx"> 
</span><del>-OBJC_CLASS WKNavigation;
-OBJC_CLASS WKWebView;
</del><ins>+@class WKNavigation;
+@class WKWebView;
+@protocol WKNavigationDelegate;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="lines">@@ -43,10 +45,15 @@
</span><span class="cx">     explicit NavigationState(WKWebView *);
</span><span class="cx">     ~NavigationState();
</span><span class="cx"> 
</span><ins>+    RetainPtr&lt;id &lt;WKNavigationDelegate&gt; &gt; navigationDelegate();
+    void setNavigationDelegate(id &lt;WKNavigationDelegate&gt;);
+
</ins><span class="cx">     RetainPtr&lt;WKNavigation&gt; createLoadRequestNavigation(uint64_t navigationID, NSURLRequest *);
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     HashMap&lt;uint64_t, RetainPtr&lt;WKNavigation&gt;&gt; m_navigations;
</span><ins>+
+    WeakObjCPtr&lt;id &lt;WKNavigationDelegate&gt; &gt; m_delegate;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaNavigationStatemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm (163097 => 163098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm        2014-01-30 19:50:03 UTC (rev 163097)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm        2014-01-30 20:00:12 UTC (rev 163098)
</span><span class="lines">@@ -40,6 +40,16 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+RetainPtr&lt;id &lt;WKNavigationDelegate&gt; &gt; NavigationState::navigationDelegate()
+{
+    return m_delegate.get();
+}
+
+void NavigationState::setNavigationDelegate(id &lt;WKNavigationDelegate&gt; delegate)
+{
+    m_delegate = delegate;
+}
+
</ins><span class="cx"> RetainPtr&lt;WKNavigation&gt; NavigationState::createLoadRequestNavigation(uint64_t navigationID, NSURLRequest *request)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_navigations.contains(navigationID));
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (163097 => 163098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-01-30 19:50:03 UTC (rev 163097)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-01-30 20:00:12 UTC (rev 163098)
</span><span class="lines">@@ -293,6 +293,7 @@
</span><span class="cx">                 1ABC3DF11899C6B6004F0626 /* WKNavigationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ABC3DF01899C6B6004F0626 /* WKNavigationInternal.h */; };
</span><span class="cx">                 1ABC3DF51899E437004F0626 /* NavigationState.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1ABC3DF31899E437004F0626 /* NavigationState.mm */; };
</span><span class="cx">                 1ABC3DF61899E437004F0626 /* NavigationState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ABC3DF41899E437004F0626 /* NavigationState.h */; };
</span><ins>+                1ABC3DFC1899F51C004F0626 /* WKNavigationDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ABC3DFB1899F51C004F0626 /* WKNavigationDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
</ins><span class="cx">                 1AC1336718565B5700F3EC05 /* UserData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC1336518565B5700F3EC05 /* UserData.cpp */; };
</span><span class="cx">                 1AC1336818565B5700F3EC05 /* UserData.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC1336618565B5700F3EC05 /* UserData.h */; };
</span><span class="cx">                 1AC1336C18565C7A00F3EC05 /* APIPageHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC1336B18565C7A00F3EC05 /* APIPageHandle.h */; };
</span><span class="lines">@@ -1944,6 +1945,7 @@
</span><span class="cx">                 1ABC3DF01899C6B6004F0626 /* WKNavigationInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNavigationInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1ABC3DF31899E437004F0626 /* NavigationState.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NavigationState.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1ABC3DF41899E437004F0626 /* NavigationState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavigationState.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                1ABC3DFB1899F51C004F0626 /* WKNavigationDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNavigationDelegate.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 1AC1336518565B5700F3EC05 /* UserData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserData.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AC1336618565B5700F3EC05 /* UserData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserData.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AC1336B18565C7A00F3EC05 /* APIPageHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIPageHandle.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -4261,6 +4263,7 @@
</span><span class="cx">                                 1A43E826188F38E2009E4D30 /* Deprecated */,
</span><span class="cx">                                 1A5B1C4F1898606F004FCF9B /* WKNavigation.h */,
</span><span class="cx">                                 1A5B1C4E1898606F004FCF9B /* WKNavigation.mm */,
</span><ins>+                                1ABC3DFB1899F51C004F0626 /* WKNavigationDelegate.h */,
</ins><span class="cx">                                 1ABC3DF01899C6B6004F0626 /* WKNavigationInternal.h */,
</span><span class="cx">                                 1AFDD3161891C94700153970 /* WKPreferences.h */,
</span><span class="cx">                                 1AFDD3181891CA1200153970 /* WKPreferences.mm */,
</span><span class="lines">@@ -6209,6 +6212,7 @@
</span><span class="cx">                                 515E7728183DD6F60007203F /* AsyncRequest.h in Headers */,
</span><span class="cx">                                 1A91010A1268C8CA001842F5 /* FindIndicatorWindow.h in Headers */,
</span><span class="cx">                                 BCE81D8D1319F7EF00241910 /* FontInfo.h in Headers */,
</span><ins>+                                1ABC3DFC1899F51C004F0626 /* WKNavigationDelegate.h in Headers */,
</ins><span class="cx">                                 BC17753F118BABF0007D9E9A /* GenericCallback.h in Headers */,
</span><span class="cx">                                 BC06F42F12DBB9B6002D78DE /* GeolocationPermissionRequestManager.h in Headers */,
</span><span class="cx">                                 BC06F44A12DBD1F5002D78DE /* GeolocationPermissionRequestManagerProxy.h in Headers */,
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (163097 => 163098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-01-30 19:50:03 UTC (rev 163097)
+++ trunk/Tools/ChangeLog        2014-01-30 20:00:12 UTC (rev 163098)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2014-01-30  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Add WKNavigationDelegate class
+        https://bugs.webkit.org/show_bug.cgi?id=127927
+
+        Reviewed by Dan Bernstein.
+
+        * TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm:
+        (TEST):
+
</ins><span class="cx"> 2014-01-30  David Farler  &lt;dfarler@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Enable iOS Tools builds by default
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2CocoaNavigationmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm (163097 => 163098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm        2014-01-30 19:50:03 UTC (rev 163097)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm        2014-01-30 20:00:12 UTC (rev 163098)
</span><span class="lines">@@ -26,12 +26,34 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #import &lt;WebKit2/WKNavigation.h&gt;
</span><ins>+#import &lt;WebKit2/WKNavigationDelegate.h&gt;
</ins><span class="cx"> #import &lt;WebKit2/WKWebView.h&gt;
</span><span class="cx"> #import &lt;wtf/RetainPtr.h&gt;
</span><span class="cx"> #import &quot;Test.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx"> 
</span><ins>+@interface NavigationDelegate : NSObject &lt;WKNavigationDelegate&gt;
+@end
+
+@implementation NavigationDelegate
+@end
+
+TEST(WKNavigation, NavigationDelegate)
+{
+    RetainPtr&lt;WKWebView&gt; webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);
+
+    NavigationDelegate *delegate = [[NavigationDelegate alloc] init];
+    [webView setNavigationDelegate:delegate];
+
+    @autoreleasepool {
+        EXPECT_EQ(delegate, [webView navigationDelegate]);
+    }
+
+    [delegate release];
+    EXPECT_NULL([webView navigationDelegate]);
+}
+
</ins><span class="cx"> TEST(WKNavigation, LoadRequest)
</span><span class="cx"> {
</span><span class="cx">     RetainPtr&lt;WKWebView&gt; webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);
</span></span></pre>
</div>
</div>

</body>
</html>