<!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>[218164] 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/218164">218164</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2017-06-12 23:28:48 -0700 (Mon, 12 Jun 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add API::InjectedBundle::PageLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=173265

Reviewed by Alex Christensen.

It will be used by the GTK+ port instead of the C API.

* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h: Added.
(API::InjectedBundle::PageLoaderClient::willLoadURLRequest):
(API::InjectedBundle::PageLoaderClient::willLoadDataRequest):
(API::InjectedBundle::PageLoaderClient::shouldGoToBackForwardListItem):
(API::InjectedBundle::PageLoaderClient::didStartProvisionalLoadForFrame):
(API::InjectedBundle::PageLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
(API::InjectedBundle::PageLoaderClient::didFailProvisionalLoadWithErrorForFrame):
(API::InjectedBundle::PageLoaderClient::didCommitLoadForFrame):
(API::InjectedBundle::PageLoaderClient::didFinishDocumentLoadForFrame):
(API::InjectedBundle::PageLoaderClient::didFinishLoadForFrame):
(API::InjectedBundle::PageLoaderClient::didFinishProgress):
(API::InjectedBundle::PageLoaderClient::didFailLoadWithErrorForFrame):
(API::InjectedBundle::PageLoaderClient::didSameDocumentNavigationForFrame):
(API::InjectedBundle::PageLoaderClient::didReceiveTitleForFrame):
(API::InjectedBundle::PageLoaderClient::didRemoveFrameFromHierarchy):
(API::InjectedBundle::PageLoaderClient::didDisplayInsecureContentForFrame):
(API::InjectedBundle::PageLoaderClient::didRunInsecureContentForFrame):
(API::InjectedBundle::PageLoaderClient::didDetectXSSForFrame):
(API::InjectedBundle::PageLoaderClient::didFirstLayoutForFrame):
(API::InjectedBundle::PageLoaderClient::didFirstVisuallyNonEmptyLayoutForFrame):
(API::InjectedBundle::PageLoaderClient::didLayoutForFrame):
(API::InjectedBundle::PageLoaderClient::didReachLayoutMilestone):
(API::InjectedBundle::PageLoaderClient::didClearWindowObjectForFrame):
(API::InjectedBundle::PageLoaderClient::didCancelClientRedirectForFrame):
(API::InjectedBundle::PageLoaderClient::willPerformClientRedirectForFrame):
(API::InjectedBundle::PageLoaderClient::didHandleOnloadEventsForFrame):
(API::InjectedBundle::PageLoaderClient::globalObjectIsAvailableForFrame):
(API::InjectedBundle::PageLoaderClient::willDisconnectDOMWindowExtensionFromGlobalObject):
(API::InjectedBundle::PageLoaderClient::didReconnectDOMWindowExtensionToGlobalObject):
(API::InjectedBundle::PageLoaderClient::willDestroyGlobalObjectForDOMWindowExtension):
(API::InjectedBundle::PageLoaderClient::shouldForceUniversalAccessFromLocalURL):
(API::InjectedBundle::PageLoaderClient::featuresUsedInPage):
(API::InjectedBundle::PageLoaderClient::willDestroyFrame):
(API::InjectedBundle::PageLoaderClient::userAgentForURL):
(API::InjectedBundle::PageLoaderClient::layoutMilestones):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetPageLoaderClient):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::InjectedBundlePageLoaderClient):
(WebKit::InjectedBundlePageLoaderClient::willLoadURLRequest):
(WebKit::InjectedBundlePageLoaderClient::willLoadDataRequest):
(WebKit::InjectedBundlePageLoaderClient::shouldGoToBackForwardListItem):
(WebKit::InjectedBundlePageLoaderClient::didStartProvisionalLoadForFrame):
(WebKit::InjectedBundlePageLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::InjectedBundlePageLoaderClient::didFailProvisionalLoadWithErrorForFrame):
(WebKit::InjectedBundlePageLoaderClient::didCommitLoadForFrame):
(WebKit::InjectedBundlePageLoaderClient::didFinishDocumentLoadForFrame):
(WebKit::InjectedBundlePageLoaderClient::didFinishLoadForFrame):
(WebKit::InjectedBundlePageLoaderClient::didFinishProgress):
(WebKit::InjectedBundlePageLoaderClient::didFailLoadWithErrorForFrame):
(WebKit::InjectedBundlePageLoaderClient::didSameDocumentNavigationForFrame):
(WebKit::InjectedBundlePageLoaderClient::didReceiveTitleForFrame):
(WebKit::InjectedBundlePageLoaderClient::didRemoveFrameFromHierarchy):
(WebKit::InjectedBundlePageLoaderClient::didDisplayInsecureContentForFrame):
(WebKit::InjectedBundlePageLoaderClient::didRunInsecureContentForFrame):
(WebKit::InjectedBundlePageLoaderClient::didDetectXSSForFrame):
(WebKit::InjectedBundlePageLoaderClient::didFirstLayoutForFrame):
(WebKit::InjectedBundlePageLoaderClient::didFirstVisuallyNonEmptyLayoutForFrame):
(WebKit::InjectedBundlePageLoaderClient::didLayoutForFrame):
(WebKit::InjectedBundlePageLoaderClient::didReachLayoutMilestone):
(WebKit::InjectedBundlePageLoaderClient::didClearWindowObjectForFrame):
(WebKit::InjectedBundlePageLoaderClient::didCancelClientRedirectForFrame):
(WebKit::InjectedBundlePageLoaderClient::willPerformClientRedirectForFrame):
(WebKit::InjectedBundlePageLoaderClient::didHandleOnloadEventsForFrame):
(WebKit::InjectedBundlePageLoaderClient::globalObjectIsAvailableForFrame):
(WebKit::InjectedBundlePageLoaderClient::willDisconnectDOMWindowExtensionFromGlobalObject):
(WebKit::InjectedBundlePageLoaderClient::didReconnectDOMWindowExtensionToGlobalObject):
(WebKit::InjectedBundlePageLoaderClient::willDestroyGlobalObjectForDOMWindowExtension):
(WebKit::InjectedBundlePageLoaderClient::shouldForceUniversalAccessFromLocalURL):
(WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
(WebKit::InjectedBundlePageLoaderClient::userAgentForURL):
(WebKit::InjectedBundlePageLoaderClient::layoutMilestones):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::detachedFromParent2):
(WebKit::WebFrameLoaderClient::dispatchDidDispatchOnloadEvents):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidCancelClientRedirect):
(WebKit::WebFrameLoaderClient::dispatchWillPerformClientRedirect):
(WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
(WebKit::WebFrameLoaderClient::dispatchDidReachLayoutMilestone):
(WebKit::WebFrameLoaderClient::dispatchDidLayout):
(WebKit::WebFrameLoaderClient::shouldGoToHistoryItem):
(WebKit::WebFrameLoaderClient::didDisplayInsecureContent):
(WebKit::WebFrameLoaderClient::didRunInsecureContent):
(WebKit::WebFrameLoaderClient::didDetectXSS):
(WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
(WebKit::WebFrameLoaderClient::dispatchGlobalObjectAvailable):
(WebKit::WebFrameLoaderClient::dispatchWillDisconnectDOMWindowExtensionFromGlobalObject):
(WebKit::WebFrameLoaderClient::dispatchDidReconnectDOMWindowExtensionToGlobalObject):
(WebKit::WebFrameLoaderClient::dispatchWillDestroyGlobalObjectForDOMWindowExtension):
(WebKit::WebFrameLoaderClient::shouldForceUniversalAccessFromLocalURL):
* WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp:
(WebKit::WebProgressTrackerClient::progressFinished):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setInjectedBundlePageLoaderClient):
(WebKit::WebPage::close):
(WebKit::WebPage::loadRequest):
(WebKit::WebPage::loadDataImpl):
(WebKit::WebPage::userAgent):
(WebKit::WebPage::reportUsedFeatures):
(WebKit::WebPage::dispatchDidReachLayoutMilestone):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::injectedBundleLoaderClient):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIcWKBundlePagecpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPImacWKWebProcessPlugInBrowserContextControllermm">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleInjectedBundlePageLoaderClientcpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleInjectedBundlePageLoaderClienth">trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebProgressTrackerClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIAPIInjectedBundlePageLoaderClienth">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (218163 => 218164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog   2017-06-13 03:14:21 UTC (rev 218163)
+++ trunk/Source/WebKit2/ChangeLog      2017-06-13 06:28:48 UTC (rev 218164)
</span><span class="lines">@@ -1,3 +1,128 @@
</span><ins>+2017-06-12  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        Add API::InjectedBundle::PageLoaderClient
+        https://bugs.webkit.org/show_bug.cgi?id=173265
+
+        Reviewed by Alex Christensen.
+
+        It will be used by the GTK+ port instead of the C API.
+
+        * WebKit2.xcodeproj/project.pbxproj:
+        * WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h: Added.
+        (API::InjectedBundle::PageLoaderClient::willLoadURLRequest):
+        (API::InjectedBundle::PageLoaderClient::willLoadDataRequest):
+        (API::InjectedBundle::PageLoaderClient::shouldGoToBackForwardListItem):
+        (API::InjectedBundle::PageLoaderClient::didStartProvisionalLoadForFrame):
+        (API::InjectedBundle::PageLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
+        (API::InjectedBundle::PageLoaderClient::didFailProvisionalLoadWithErrorForFrame):
+        (API::InjectedBundle::PageLoaderClient::didCommitLoadForFrame):
+        (API::InjectedBundle::PageLoaderClient::didFinishDocumentLoadForFrame):
+        (API::InjectedBundle::PageLoaderClient::didFinishLoadForFrame):
+        (API::InjectedBundle::PageLoaderClient::didFinishProgress):
+        (API::InjectedBundle::PageLoaderClient::didFailLoadWithErrorForFrame):
+        (API::InjectedBundle::PageLoaderClient::didSameDocumentNavigationForFrame):
+        (API::InjectedBundle::PageLoaderClient::didReceiveTitleForFrame):
+        (API::InjectedBundle::PageLoaderClient::didRemoveFrameFromHierarchy):
+        (API::InjectedBundle::PageLoaderClient::didDisplayInsecureContentForFrame):
+        (API::InjectedBundle::PageLoaderClient::didRunInsecureContentForFrame):
+        (API::InjectedBundle::PageLoaderClient::didDetectXSSForFrame):
+        (API::InjectedBundle::PageLoaderClient::didFirstLayoutForFrame):
+        (API::InjectedBundle::PageLoaderClient::didFirstVisuallyNonEmptyLayoutForFrame):
+        (API::InjectedBundle::PageLoaderClient::didLayoutForFrame):
+        (API::InjectedBundle::PageLoaderClient::didReachLayoutMilestone):
+        (API::InjectedBundle::PageLoaderClient::didClearWindowObjectForFrame):
+        (API::InjectedBundle::PageLoaderClient::didCancelClientRedirectForFrame):
+        (API::InjectedBundle::PageLoaderClient::willPerformClientRedirectForFrame):
+        (API::InjectedBundle::PageLoaderClient::didHandleOnloadEventsForFrame):
+        (API::InjectedBundle::PageLoaderClient::globalObjectIsAvailableForFrame):
+        (API::InjectedBundle::PageLoaderClient::willDisconnectDOMWindowExtensionFromGlobalObject):
+        (API::InjectedBundle::PageLoaderClient::didReconnectDOMWindowExtensionToGlobalObject):
+        (API::InjectedBundle::PageLoaderClient::willDestroyGlobalObjectForDOMWindowExtension):
+        (API::InjectedBundle::PageLoaderClient::shouldForceUniversalAccessFromLocalURL):
+        (API::InjectedBundle::PageLoaderClient::featuresUsedInPage):
+        (API::InjectedBundle::PageLoaderClient::willDestroyFrame):
+        (API::InjectedBundle::PageLoaderClient::userAgentForURL):
+        (API::InjectedBundle::PageLoaderClient::layoutMilestones):
+        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
+        (WKBundlePageSetPageLoaderClient):
+        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
+        (WebKit::InjectedBundlePageLoaderClient::InjectedBundlePageLoaderClient):
+        (WebKit::InjectedBundlePageLoaderClient::willLoadURLRequest):
+        (WebKit::InjectedBundlePageLoaderClient::willLoadDataRequest):
+        (WebKit::InjectedBundlePageLoaderClient::shouldGoToBackForwardListItem):
+        (WebKit::InjectedBundlePageLoaderClient::didStartProvisionalLoadForFrame):
+        (WebKit::InjectedBundlePageLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
+        (WebKit::InjectedBundlePageLoaderClient::didFailProvisionalLoadWithErrorForFrame):
+        (WebKit::InjectedBundlePageLoaderClient::didCommitLoadForFrame):
+        (WebKit::InjectedBundlePageLoaderClient::didFinishDocumentLoadForFrame):
+        (WebKit::InjectedBundlePageLoaderClient::didFinishLoadForFrame):
+        (WebKit::InjectedBundlePageLoaderClient::didFinishProgress):
+        (WebKit::InjectedBundlePageLoaderClient::didFailLoadWithErrorForFrame):
+        (WebKit::InjectedBundlePageLoaderClient::didSameDocumentNavigationForFrame):
+        (WebKit::InjectedBundlePageLoaderClient::didReceiveTitleForFrame):
+        (WebKit::InjectedBundlePageLoaderClient::didRemoveFrameFromHierarchy):
+        (WebKit::InjectedBundlePageLoaderClient::didDisplayInsecureContentForFrame):
+        (WebKit::InjectedBundlePageLoaderClient::didRunInsecureContentForFrame):
+        (WebKit::InjectedBundlePageLoaderClient::didDetectXSSForFrame):
+        (WebKit::InjectedBundlePageLoaderClient::didFirstLayoutForFrame):
+        (WebKit::InjectedBundlePageLoaderClient::didFirstVisuallyNonEmptyLayoutForFrame):
+        (WebKit::InjectedBundlePageLoaderClient::didLayoutForFrame):
+        (WebKit::InjectedBundlePageLoaderClient::didReachLayoutMilestone):
+        (WebKit::InjectedBundlePageLoaderClient::didClearWindowObjectForFrame):
+        (WebKit::InjectedBundlePageLoaderClient::didCancelClientRedirectForFrame):
+        (WebKit::InjectedBundlePageLoaderClient::willPerformClientRedirectForFrame):
+        (WebKit::InjectedBundlePageLoaderClient::didHandleOnloadEventsForFrame):
+        (WebKit::InjectedBundlePageLoaderClient::globalObjectIsAvailableForFrame):
+        (WebKit::InjectedBundlePageLoaderClient::willDisconnectDOMWindowExtensionFromGlobalObject):
+        (WebKit::InjectedBundlePageLoaderClient::didReconnectDOMWindowExtensionToGlobalObject):
+        (WebKit::InjectedBundlePageLoaderClient::willDestroyGlobalObjectForDOMWindowExtension):
+        (WebKit::InjectedBundlePageLoaderClient::shouldForceUniversalAccessFromLocalURL):
+        (WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
+        (WebKit::InjectedBundlePageLoaderClient::userAgentForURL):
+        (WebKit::InjectedBundlePageLoaderClient::layoutMilestones):
+        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::detachedFromParent2):
+        (WebKit::WebFrameLoaderClient::dispatchDidDispatchOnloadEvents):
+        (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
+        (WebKit::WebFrameLoaderClient::dispatchDidCancelClientRedirect):
+        (WebKit::WebFrameLoaderClient::dispatchWillPerformClientRedirect):
+        (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
+        (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
+        (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
+        (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
+        (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
+        (WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):
+        (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
+        (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
+        (WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
+        (WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
+        (WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
+        (WebKit::WebFrameLoaderClient::dispatchDidReachLayoutMilestone):
+        (WebKit::WebFrameLoaderClient::dispatchDidLayout):
+        (WebKit::WebFrameLoaderClient::shouldGoToHistoryItem):
+        (WebKit::WebFrameLoaderClient::didDisplayInsecureContent):
+        (WebKit::WebFrameLoaderClient::didRunInsecureContent):
+        (WebKit::WebFrameLoaderClient::didDetectXSS):
+        (WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
+        (WebKit::WebFrameLoaderClient::dispatchGlobalObjectAvailable):
+        (WebKit::WebFrameLoaderClient::dispatchWillDisconnectDOMWindowExtensionFromGlobalObject):
+        (WebKit::WebFrameLoaderClient::dispatchDidReconnectDOMWindowExtensionToGlobalObject):
+        (WebKit::WebFrameLoaderClient::dispatchWillDestroyGlobalObjectForDOMWindowExtension):
+        (WebKit::WebFrameLoaderClient::shouldForceUniversalAccessFromLocalURL):
+        * WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp:
+        (WebKit::WebProgressTrackerClient::progressFinished):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::setInjectedBundlePageLoaderClient):
+        (WebKit::WebPage::close):
+        (WebKit::WebPage::loadRequest):
+        (WebKit::WebPage::loadDataImpl):
+        (WebKit::WebPage::userAgent):
+        (WebKit::WebPage::reportUsedFeatures):
+        (WebKit::WebPage::dispatchDidReachLayoutMilestone):
+        * WebProcess/WebPage/WebPage.h:
+        (WebKit::WebPage::injectedBundleLoaderClient):
+
</ins><span class="cx"> 2017-06-12  Simon Fraser  <simon.fraser@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [iOS WK2] Peeking on an image could result in a preview at the wrong size
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (218163 => 218164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj   2017-06-13 03:14:21 UTC (rev 218163)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj      2017-06-13 06:28:48 UTC (rev 218164)
</span><span class="lines">@@ -1207,6 +1207,7 @@
</span><span class="cx">          75A8D2C9187CCFAF00C39C9E /* WKWebsiteDataStore.mm in Sources */ = {isa = PBXBuildFile; fileRef = 75A8D2C5187CCF9F00C39C9E /* WKWebsiteDataStore.mm */; };
</span><span class="cx">          75A8D2D6187D1C0E00C39C9E /* WKWebsiteDataStoreInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 75A8D2D4187D1C0100C39C9E /* WKWebsiteDataStoreInternal.h */; };
</span><span class="cx">          762B748D120BC75C00819339 /* WKPreferencesRefPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 762B7484120BBA2D00819339 /* WKPreferencesRefPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+               7A3ACE1B1EEEF79B00A864A4 /* APIInjectedBundlePageLoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A3ACE1A1EEEF78C00A864A4 /* APIInjectedBundlePageLoaderClient.h */; };
</ins><span class="cx">           7A772C8D1DDD4A25000F34F1 /* com.apple.WebKit.plugin-common.sb in Copy Plug-in Sandbox Profiles */ = {isa = PBXBuildFile; fileRef = 7A1506721DD56298001F4B58 /* com.apple.WebKit.plugin-common.sb */; };
</span><span class="cx">          7A791EFA1C7CFCF100C4C52B /* WebResourceLoadStatisticsStoreMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A791EF91C7CFB3700C4C52B /* WebResourceLoadStatisticsStoreMessageReceiver.cpp */; };
</span><span class="cx">          7A791EFB1C7CFD0100C4C52B /* WebResourceLoadStatisticsStoreMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A791EF81C7CFB1000C4C52B /* WebResourceLoadStatisticsStoreMessages.h */; };
</span><span class="lines">@@ -3492,6 +3493,7 @@
</span><span class="cx">          762B7481120BBA0100819339 /* FontSmoothingLevel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontSmoothingLevel.h; sourceTree = "<group>"; };
</span><span class="cx">          762B7484120BBA2D00819339 /* WKPreferencesRefPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKPreferencesRefPrivate.h; sourceTree = "<group>"; };
</span><span class="cx">          7A1506721DD56298001F4B58 /* com.apple.WebKit.plugin-common.sb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "com.apple.WebKit.plugin-common.sb"; sourceTree = "<group>"; };
</span><ins>+               7A3ACE1A1EEEF78C00A864A4 /* APIInjectedBundlePageLoaderClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIInjectedBundlePageLoaderClient.h; sourceTree = "<group>"; };
</ins><span class="cx">           7A5E39491D5BD8A700B4B7CE /* com.macromedia.Flash Player ESR.plugin.sb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "com.macromedia.Flash Player ESR.plugin.sb"; sourceTree = "<group>"; };
</span><span class="cx">          7A791EF81C7CFB1000C4C52B /* WebResourceLoadStatisticsStoreMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebResourceLoadStatisticsStoreMessages.h; sourceTree = "<group>"; };
</span><span class="cx">          7A791EF91C7CFB3700C4C52B /* WebResourceLoadStatisticsStoreMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebResourceLoadStatisticsStoreMessageReceiver.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -7243,6 +7245,7 @@
</span><span class="cx">                          BC989D4516181691000D46D3 /* mac */,
</span><span class="cx">                          377512301DF0DEE2008A351C /* APIInjectedBundleEditorClient.h */,
</span><span class="cx">                          076E884F1A13CBC6005E90FC /* APIInjectedBundlePageContextMenuClient.h */,
</span><ins>+                               7A3ACE1A1EEEF78C00A864A4 /* APIInjectedBundlePageLoaderClient.h */,
</ins><span class="cx">                   );
</span><span class="cx">                  path = API;
</span><span class="cx">                  sourceTree = "<group>";
</span><span class="lines">@@ -8394,6 +8397,7 @@
</span><span class="cx">                          0FDCD7F71D47E92A009F08BC /* LogInitialization.h in Headers */,
</span><span class="cx">                          1A6D86C21DF75265007745E8 /* MachMessage.h in Headers */,
</span><span class="cx">                          BCC56F791159957D001CCAF9 /* MachPort.h in Headers */,
</span><ins>+                               7A3ACE1B1EEEF79B00A864A4 /* APIInjectedBundlePageLoaderClient.h in Headers */,
</ins><span class="cx">                           1A24B5F311F531E800C38269 /* MachUtilities.h in Headers */,
</span><span class="cx">                          CE1A0BD51A48E6C60054EF74 /* ManagedConfigurationSPI.h in Headers */,
</span><span class="cx">                          51933DEF1965EB31008AC3EA /* MenuUtilities.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIAPIInjectedBundlePageLoaderClienth"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h (0 => 218164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h                           (rev 0)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h      2017-06-13 06:28:48 UTC (rev 218164)
</span><span class="lines">@@ -0,0 +1,104 @@
</span><ins>+/*
+ * Copyright (C) 2017 Igalia S.L.
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include "SameDocumentNavigationType.h"
+#include <WebCore/LayoutMilestones.h>
+#include <wtf/Forward.h>
+#include <wtf/Vector.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+class DOMWindowExtension;
+class DOMWrapperWorld;
+class ResourceError;
+class ResourceRequest;
+class SharedBuffer;
+class URL;
+}
+
+namespace WebKit {
+class InjectedBundleBackForwardListItem;
+class WebFrame;
+class WebPage;
+}
+
+namespace API {
+class Object;
+
+namespace InjectedBundle {
+
+class PageLoaderClient {
+public:
+    virtual ~PageLoaderClient() = default;
+
+    virtual void willLoadURLRequest(WebKit::WebPage&, const WebCore::ResourceRequest&, API::Object*) { }
+    virtual void willLoadDataRequest(WebKit::WebPage&, const WebCore::ResourceRequest&, WebCore::SharedBuffer*, const WTF::String&, const WTF::String&, const WebCore::URL&, API::Object*) { }
+
+    virtual bool shouldGoToBackForwardListItem(WebKit::WebPage&, WebKit::InjectedBundleBackForwardListItem&, RefPtr<API::Object>&) { return false; }
+    virtual void didStartProvisionalLoadForFrame(WebKit::WebPage&, WebKit::WebFrame&, RefPtr<API::Object>&) { }
+    virtual void didReceiveServerRedirectForProvisionalLoadForFrame(WebKit::WebPage&, WebKit::WebFrame&, RefPtr<API::Object>&) { }
+    virtual void didFailProvisionalLoadWithErrorForFrame(WebKit::WebPage&, WebKit::WebFrame&, const WebCore::ResourceError&, RefPtr<API::Object>&) { }
+    virtual void didCommitLoadForFrame(WebKit::WebPage&, WebKit::WebFrame&, RefPtr<API::Object>&) { }
+    virtual void didFinishDocumentLoadForFrame(WebKit::WebPage&, WebKit::WebFrame&, RefPtr<API::Object>&) { }
+    virtual void didFinishLoadForFrame(WebKit::WebPage&, WebKit::WebFrame&, RefPtr<API::Object>&) { }
+    virtual void didFinishProgress(WebKit::WebPage&) { }
+    virtual void didFailLoadWithErrorForFrame(WebKit::WebPage&, WebKit::WebFrame&, const WebCore::ResourceError&, RefPtr<API::Object>&) { }
+    virtual void didSameDocumentNavigationForFrame(WebKit::WebPage&, WebKit::WebFrame&, WebKit::SameDocumentNavigationType, RefPtr<API::Object>&) { }
+    virtual void didReceiveTitleForFrame(WebKit::WebPage&, const WTF::String&, WebKit::WebFrame&, RefPtr<API::Object>&) { }
+    virtual void didRemoveFrameFromHierarchy(WebKit::WebPage&, WebKit::WebFrame&, RefPtr<API::Object>&) { }
+    virtual void didDisplayInsecureContentForFrame(WebKit::WebPage&, WebKit::WebFrame&, RefPtr<API::Object>&) { }
+    virtual void didRunInsecureContentForFrame(WebKit::WebPage&, WebKit::WebFrame&, RefPtr<API::Object>&) { }
+    virtual void didDetectXSSForFrame(WebKit::WebPage&, WebKit::WebFrame&, RefPtr<API::Object>&) { }
+
+    virtual void didFirstLayoutForFrame(WebKit::WebPage&, WebKit::WebFrame&, RefPtr<API::Object>&) { }
+    virtual void didFirstVisuallyNonEmptyLayoutForFrame(WebKit::WebPage&, WebKit::WebFrame&, RefPtr<API::Object>&) { }
+    virtual void didLayoutForFrame(WebKit::WebPage&, WebKit::WebFrame&) { }
+    virtual void didReachLayoutMilestone(WebKit::WebPage&, WebCore::LayoutMilestones, RefPtr<API::Object>&) { }
+
+    virtual void didClearWindowObjectForFrame(WebKit::WebPage&, WebKit::WebFrame&, WebCore::DOMWrapperWorld&) { }
+    virtual void didCancelClientRedirectForFrame(WebKit::WebPage&, WebKit::WebFrame&) { }
+    virtual void willPerformClientRedirectForFrame(WebKit::WebPage&, WebKit::WebFrame&, const WTF::String&, double /*delay*/, double /*date*/) { }
+    virtual void didHandleOnloadEventsForFrame(WebKit::WebPage&, WebKit::WebFrame&) { }
+
+    virtual void globalObjectIsAvailableForFrame(WebKit::WebPage&, WebKit::WebFrame&, WebCore::DOMWrapperWorld&) { }
+    virtual void willDisconnectDOMWindowExtensionFromGlobalObject(WebKit::WebPage&, WebCore::DOMWindowExtension*) { }
+    virtual void didReconnectDOMWindowExtensionToGlobalObject(WebKit::WebPage&, WebCore::DOMWindowExtension*) { }
+    virtual void willDestroyGlobalObjectForDOMWindowExtension(WebKit::WebPage&, WebCore::DOMWindowExtension*) { }
+
+    virtual bool shouldForceUniversalAccessFromLocalURL(WebKit::WebPage&, const WTF::String&) { return false; }
+
+    virtual void featuresUsedInPage(WebKit::WebPage&, const Vector<WTF::String>&) { }
+
+    virtual void willDestroyFrame(WebKit::WebPage&, WebKit::WebFrame&) { }
+    virtual WTF::String userAgentForURL(WebKit::WebFrame&, const WebCore::URL&) const { return WTF::String(); }
+
+    virtual WebCore::LayoutMilestones layoutMilestones() const { return 0; }
+};
+
+} // namespace InjectedBundle
+
+} // namespace API
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIcWKBundlePagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp (218163 => 218164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp    2017-06-13 03:14:21 UTC (rev 218163)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp       2017-06-13 06:28:48 UTC (rev 218164)
</span><span class="lines">@@ -35,6 +35,7 @@
</span><span class="cx"> #include "InjectedBundleNodeHandle.h"
</span><span class="cx"> #include "InjectedBundlePageEditorClient.h"
</span><span class="cx"> #include "InjectedBundlePageFormClient.h"
</span><ins>+#include "InjectedBundlePageLoaderClient.h"
</ins><span class="cx"> #include "InjectedBundlePageUIClient.h"
</span><span class="cx"> #include "PageBanner.h"
</span><span class="cx"> #include "WKAPICast.h"
</span><span class="lines">@@ -94,7 +95,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WKBundlePageSetPageLoaderClient(WKBundlePageRef pageRef, WKBundlePageLoaderClientBase* wkClient)
</span><span class="cx"> {
</span><del>-    toImpl(pageRef)->initializeInjectedBundleLoaderClient(wkClient);
</del><ins>+    toImpl(pageRef)->setInjectedBundlePageLoaderClient(std::make_unique<InjectedBundlePageLoaderClient>(wkClient));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKBundlePageSetResourceLoadClient(WKBundlePageRef pageRef, WKBundlePageResourceLoadClientBase* wkClient)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPImacWKWebProcessPlugInBrowserContextControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm (218163 => 218164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm     2017-06-13 03:14:21 UTC (rev 218163)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm        2017-06-13 06:28:48 UTC (rev 218164)
</span><span class="lines">@@ -255,7 +255,7 @@
</span><span class="cx">     client.didLayoutForFrame = didLayoutForFrame;
</span><span class="cx">     client.didLayout = didReachLayoutMilestone;
</span><span class="cx"> 
</span><del>-    page.initializeInjectedBundleLoaderClient(&client.base);
</del><ins>+    WKBundlePageSetPageLoaderClient(toAPI(&page), &client.base);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static WKURLRequestRef willSendRequestForFrame(WKBundlePageRef, WKBundleFrameRef frame, uint64_t resourceIdentifier, WKURLRequestRef request, WKURLResponseRef redirectResponse, const void* clientInfo)
</span><span class="lines">@@ -349,7 +349,7 @@
</span><span class="cx">         setUpPageLoaderClient(self, *_page);
</span><span class="cx">         setUpResourceLoadClient(self, *_page);
</span><span class="cx">     } else {
</span><del>-        _page->initializeInjectedBundleLoaderClient(nullptr);
</del><ins>+        WKBundlePageSetPageLoaderClient(toAPI(_page.get()), nullptr);
</ins><span class="cx">         _page->initializeInjectedBundleResourceLoadClient(nullptr);
</span><span class="cx">     }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleInjectedBundlePageLoaderClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp (218163 => 218164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp        2017-06-13 03:14:21 UTC (rev 218163)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp   2017-06-13 06:28:48 UTC (rev 218164)
</span><span class="lines">@@ -46,12 +46,17 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::willLoadURLRequest(WebPage* page, const ResourceRequest& request, API::Object* userData)
</del><ins>+InjectedBundlePageLoaderClient::InjectedBundlePageLoaderClient(const WKBundlePageLoaderClientBase* client)
</ins><span class="cx"> {
</span><ins>+    initialize(client);
+}
+
+void InjectedBundlePageLoaderClient::willLoadURLRequest(WebPage& page, const ResourceRequest& request, API::Object* userData)
+{
</ins><span class="cx">     if (!m_client.willLoadURLRequest)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_client.willLoadURLRequest(toAPI(page), toAPI(request), toAPI(userData), m_client.base.clientInfo);
</del><ins>+    m_client.willLoadURLRequest(toAPI(&page), toAPI(request), toAPI(userData), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static void releaseSharedBuffer(unsigned char*, const void* data)
</span><span class="lines">@@ -60,250 +65,250 @@
</span><span class="cx">     static_cast<SharedBuffer*>(const_cast<void*>(data))->deref();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::willLoadDataRequest(WebPage* page, const ResourceRequest& request, SharedBuffer* sharedBuffer, const String& MIMEType, const String& encodingName, const URL& unreachableURL, API::Object* userData)
</del><ins>+void InjectedBundlePageLoaderClient::willLoadDataRequest(WebPage& page, const ResourceRequest& request, SharedBuffer* sharedBuffer, const String& MIMEType, const String& encodingName, const URL& unreachableURL, API::Object* userData)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.willLoadDataRequest)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     RefPtr<API::Data> data;
</span><del>-    if (data) {
</del><ins>+    if (sharedBuffer) {
</ins><span class="cx">         sharedBuffer->ref();
</span><span class="cx">         data = API::Data::createWithoutCopying((const unsigned char*)sharedBuffer->data(), sharedBuffer->size(), releaseSharedBuffer, sharedBuffer);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    m_client.willLoadDataRequest(toAPI(page), toAPI(request), toAPI(data.get()), toAPI(MIMEType.impl()), toAPI(encodingName.impl()), toURLRef(unreachableURL.string().impl()), toAPI(userData), m_client.base.clientInfo);
</del><ins>+    m_client.willLoadDataRequest(toAPI(&page), toAPI(request), toAPI(data.get()), toAPI(MIMEType.impl()), toAPI(encodingName.impl()), toURLRef(unreachableURL.string().impl()), toAPI(userData), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool InjectedBundlePageLoaderClient::shouldGoToBackForwardListItem(WebPage* page, InjectedBundleBackForwardListItem* item, RefPtr<API::Object>& userData)
</del><ins>+bool InjectedBundlePageLoaderClient::shouldGoToBackForwardListItem(WebPage& page, InjectedBundleBackForwardListItem& item, RefPtr<API::Object>& userData)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.shouldGoToBackForwardListItem)
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><del>-    WKTypeRef userDataToPass = 0;
-    bool result = m_client.shouldGoToBackForwardListItem(toAPI(page), toAPI(item), &userDataToPass, m_client.base.clientInfo);
</del><ins>+    WKTypeRef userDataToPass = nullptr;
+    bool result = m_client.shouldGoToBackForwardListItem(toAPI(&page), toAPI(&item), &userDataToPass, m_client.base.clientInfo);
</ins><span class="cx">     userData = adoptRef(toImpl(userDataToPass));
</span><span class="cx">     
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::didStartProvisionalLoadForFrame(WebPage* page, WebFrame* frame, RefPtr<API::Object>& userData)
</del><ins>+void InjectedBundlePageLoaderClient::didStartProvisionalLoadForFrame(WebPage& page, WebFrame& frame, RefPtr<API::Object>& userData)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.didStartProvisionalLoadForFrame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    WKTypeRef userDataToPass = 0;
-    m_client.didStartProvisionalLoadForFrame(toAPI(page), toAPI(frame), &userDataToPass, m_client.base.clientInfo);
</del><ins>+    WKTypeRef userDataToPass = nullptr;
+    m_client.didStartProvisionalLoadForFrame(toAPI(&page), toAPI(&frame), &userDataToPass, m_client.base.clientInfo);
</ins><span class="cx">     userData = adoptRef(toImpl(userDataToPass));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame(WebPage* page, WebFrame* frame, RefPtr<API::Object>& userData)
</del><ins>+void InjectedBundlePageLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame(WebPage& page, WebFrame& frame, RefPtr<API::Object>& userData)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.didReceiveServerRedirectForProvisionalLoadForFrame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    WKTypeRef userDataToPass = 0;
-    m_client.didReceiveServerRedirectForProvisionalLoadForFrame(toAPI(page), toAPI(frame), &userDataToPass, m_client.base.clientInfo);
</del><ins>+    WKTypeRef userDataToPass = nullptr;
+    m_client.didReceiveServerRedirectForProvisionalLoadForFrame(toAPI(&page), toAPI(&frame), &userDataToPass, m_client.base.clientInfo);
</ins><span class="cx">     userData = adoptRef(toImpl(userDataToPass));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::didFailProvisionalLoadWithErrorForFrame(WebPage* page, WebFrame* frame, const ResourceError& error, RefPtr<API::Object>& userData)
</del><ins>+void InjectedBundlePageLoaderClient::didFailProvisionalLoadWithErrorForFrame(WebPage& page, WebFrame& frame, const ResourceError& error, RefPtr<API::Object>& userData)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.didFailProvisionalLoadWithErrorForFrame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    WKTypeRef userDataToPass = 0;
-    m_client.didFailProvisionalLoadWithErrorForFrame(toAPI(page), toAPI(frame), toAPI(error), &userDataToPass, m_client.base.clientInfo);
</del><ins>+    WKTypeRef userDataToPass = nullptr;
+    m_client.didFailProvisionalLoadWithErrorForFrame(toAPI(&page), toAPI(&frame), toAPI(error), &userDataToPass, m_client.base.clientInfo);
</ins><span class="cx">     userData = adoptRef(toImpl(userDataToPass));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::didCommitLoadForFrame(WebPage* page, WebFrame* frame, RefPtr<API::Object>& userData)
</del><ins>+void InjectedBundlePageLoaderClient::didCommitLoadForFrame(WebPage& page, WebFrame& frame, RefPtr<API::Object>& userData)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.didCommitLoadForFrame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    WKTypeRef userDataToPass = 0;
-    m_client.didCommitLoadForFrame(toAPI(page), toAPI(frame), &userDataToPass, m_client.base.clientInfo);
</del><ins>+    WKTypeRef userDataToPass = nullptr;
+    m_client.didCommitLoadForFrame(toAPI(&page), toAPI(&frame), &userDataToPass, m_client.base.clientInfo);
</ins><span class="cx">     userData = adoptRef(toImpl(userDataToPass));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::didFinishDocumentLoadForFrame(WebPage* page, WebFrame* frame, RefPtr<API::Object>& userData)
</del><ins>+void InjectedBundlePageLoaderClient::didFinishDocumentLoadForFrame(WebPage& page, WebFrame& frame, RefPtr<API::Object>& userData)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.didFinishDocumentLoadForFrame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    WKTypeRef userDataToPass = 0;
-    m_client.didFinishDocumentLoadForFrame(toAPI(page), toAPI(frame), &userDataToPass, m_client.base.clientInfo);
</del><ins>+    WKTypeRef userDataToPass = nullptr;
+    m_client.didFinishDocumentLoadForFrame(toAPI(&page), toAPI(&frame), &userDataToPass, m_client.base.clientInfo);
</ins><span class="cx">     userData = adoptRef(toImpl(userDataToPass));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::didFinishLoadForFrame(WebPage* page, WebFrame* frame, RefPtr<API::Object>& userData)
</del><ins>+void InjectedBundlePageLoaderClient::didFinishLoadForFrame(WebPage& page, WebFrame& frame, RefPtr<API::Object>& userData)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.didFinishLoadForFrame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    WKTypeRef userDataToPass = 0;
-    m_client.didFinishLoadForFrame(toAPI(page), toAPI(frame), &userDataToPass, m_client.base.clientInfo);
</del><ins>+    WKTypeRef userDataToPass = nullptr;
+    m_client.didFinishLoadForFrame(toAPI(&page), toAPI(&frame), &userDataToPass, m_client.base.clientInfo);
</ins><span class="cx">     userData = adoptRef(toImpl(userDataToPass));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::didFinishProgress(WebPage* page)
</del><ins>+void InjectedBundlePageLoaderClient::didFinishProgress(WebPage& page)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.didFinishProgress)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_client.didFinishProgress(toAPI(page), m_client.base.clientInfo);
</del><ins>+    m_client.didFinishProgress(toAPI(&page), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::didFailLoadWithErrorForFrame(WebPage* page, WebFrame* frame, const ResourceError& error, RefPtr<API::Object>& userData)
</del><ins>+void InjectedBundlePageLoaderClient::didFailLoadWithErrorForFrame(WebPage& page, WebFrame& frame, const ResourceError& error, RefPtr<API::Object>& userData)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.didFailLoadWithErrorForFrame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    WKTypeRef userDataToPass = 0;
-    m_client.didFailLoadWithErrorForFrame(toAPI(page), toAPI(frame), toAPI(error), &userDataToPass, m_client.base.clientInfo);
</del><ins>+    WKTypeRef userDataToPass = nullptr;
+    m_client.didFailLoadWithErrorForFrame(toAPI(&page), toAPI(&frame), toAPI(error), &userDataToPass, m_client.base.clientInfo);
</ins><span class="cx">     userData = adoptRef(toImpl(userDataToPass));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::didSameDocumentNavigationForFrame(WebPage* page, WebFrame* frame, SameDocumentNavigationType type, RefPtr<API::Object>& userData)
</del><ins>+void InjectedBundlePageLoaderClient::didSameDocumentNavigationForFrame(WebPage& page, WebFrame& frame, SameDocumentNavigationType type, RefPtr<API::Object>& userData)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.didSameDocumentNavigationForFrame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    WKTypeRef userDataToPass = 0;
-    m_client.didSameDocumentNavigationForFrame(toAPI(page), toAPI(frame), toAPI(type), &userDataToPass, m_client.base.clientInfo);
</del><ins>+    WKTypeRef userDataToPass = nullptr;
+    m_client.didSameDocumentNavigationForFrame(toAPI(&page), toAPI(&frame), toAPI(type), &userDataToPass, m_client.base.clientInfo);
</ins><span class="cx">     userData = adoptRef(toImpl(userDataToPass));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::didReceiveTitleForFrame(WebPage* page, const String& title, WebFrame* frame, RefPtr<API::Object>& userData)
</del><ins>+void InjectedBundlePageLoaderClient::didReceiveTitleForFrame(WebPage& page, const String& title, WebFrame& frame, RefPtr<API::Object>& userData)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.didReceiveTitleForFrame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    WKTypeRef userDataToPass = 0;
-    m_client.didReceiveTitleForFrame(toAPI(page), toAPI(title.impl()), toAPI(frame), &userDataToPass, m_client.base.clientInfo);
</del><ins>+    WKTypeRef userDataToPass = nullptr;
+    m_client.didReceiveTitleForFrame(toAPI(&page), toAPI(title.impl()), toAPI(&frame), &userDataToPass, m_client.base.clientInfo);
</ins><span class="cx">     userData = adoptRef(toImpl(userDataToPass));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::didRemoveFrameFromHierarchy(WebPage* page , WebFrame* frame, RefPtr<API::Object>& userData)
</del><ins>+void InjectedBundlePageLoaderClient::didRemoveFrameFromHierarchy(WebPage& page , WebFrame& frame, RefPtr<API::Object>& userData)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.didRemoveFrameFromHierarchy)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    WKTypeRef userDataToPass = 0;
-    m_client.didRemoveFrameFromHierarchy(toAPI(page), toAPI(frame), &userDataToPass, m_client.base.clientInfo);
</del><ins>+    WKTypeRef userDataToPass = nullptr;
+    m_client.didRemoveFrameFromHierarchy(toAPI(&page), toAPI(&frame), &userDataToPass, m_client.base.clientInfo);
</ins><span class="cx">     userData = adoptRef(toImpl(userDataToPass));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::didDisplayInsecureContentForFrame(WebPage* page, WebFrame* frame, RefPtr<API::Object>& userData)
</del><ins>+void InjectedBundlePageLoaderClient::didDisplayInsecureContentForFrame(WebPage& page, WebFrame& frame, RefPtr<API::Object>& userData)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.didDisplayInsecureContentForFrame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    WKTypeRef userDataToPass = 0;
-    m_client.didDisplayInsecureContentForFrame(toAPI(page), toAPI(frame), &userDataToPass, m_client.base.clientInfo);
</del><ins>+    WKTypeRef userDataToPass = nullptr;
+    m_client.didDisplayInsecureContentForFrame(toAPI(&page), toAPI(&frame), &userDataToPass, m_client.base.clientInfo);
</ins><span class="cx">     userData = adoptRef(toImpl(userDataToPass));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::didRunInsecureContentForFrame(WebPage* page, WebFrame* frame, RefPtr<API::Object>& userData)
</del><ins>+void InjectedBundlePageLoaderClient::didRunInsecureContentForFrame(WebPage& page, WebFrame& frame, RefPtr<API::Object>& userData)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.didRunInsecureContentForFrame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    WKTypeRef userDataToPass = 0;
-    m_client.didRunInsecureContentForFrame(toAPI(page), toAPI(frame), &userDataToPass, m_client.base.clientInfo);
</del><ins>+    WKTypeRef userDataToPass = nullptr;
+    m_client.didRunInsecureContentForFrame(toAPI(&page), toAPI(&frame), &userDataToPass, m_client.base.clientInfo);
</ins><span class="cx">     userData = adoptRef(toImpl(userDataToPass));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::didDetectXSSForFrame(WebPage* page, WebFrame* frame, RefPtr<API::Object>& userData)
</del><ins>+void InjectedBundlePageLoaderClient::didDetectXSSForFrame(WebPage& page, WebFrame& frame, RefPtr<API::Object>& userData)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.didDetectXSSForFrame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    WKTypeRef userDataToPass = 0;
-    m_client.didDetectXSSForFrame(toAPI(page), toAPI(frame), &userDataToPass, m_client.base.clientInfo);
</del><ins>+    WKTypeRef userDataToPass = nullptr;
+    m_client.didDetectXSSForFrame(toAPI(&page), toAPI(&frame), &userDataToPass, m_client.base.clientInfo);
</ins><span class="cx">     userData = adoptRef(toImpl(userDataToPass));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::didFirstLayoutForFrame(WebPage* page, WebFrame* frame, RefPtr<API::Object>& userData)
</del><ins>+void InjectedBundlePageLoaderClient::didFirstLayoutForFrame(WebPage& page, WebFrame& frame, RefPtr<API::Object>& userData)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.didFirstLayoutForFrame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    WKTypeRef userDataToPass = 0;
-    m_client.didFirstLayoutForFrame(toAPI(page), toAPI(frame), &userDataToPass, m_client.base.clientInfo);
</del><ins>+    WKTypeRef userDataToPass = nullptr;
+    m_client.didFirstLayoutForFrame(toAPI(&page), toAPI(&frame), &userDataToPass, m_client.base.clientInfo);
</ins><span class="cx">     userData = adoptRef(toImpl(userDataToPass));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::didFirstVisuallyNonEmptyLayoutForFrame(WebPage* page, WebFrame* frame, RefPtr<API::Object>& userData)
</del><ins>+void InjectedBundlePageLoaderClient::didFirstVisuallyNonEmptyLayoutForFrame(WebPage& page, WebFrame& frame, RefPtr<API::Object>& userData)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.didFirstVisuallyNonEmptyLayoutForFrame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    WKTypeRef userDataToPass = 0;
-    m_client.didFirstVisuallyNonEmptyLayoutForFrame(toAPI(page), toAPI(frame), &userDataToPass, m_client.base.clientInfo);
</del><ins>+    WKTypeRef userDataToPass = nullptr;
+    m_client.didFirstVisuallyNonEmptyLayoutForFrame(toAPI(&page), toAPI(&frame), &userDataToPass, m_client.base.clientInfo);
</ins><span class="cx">     userData = adoptRef(toImpl(userDataToPass));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::didLayoutForFrame(WebPage* page, WebFrame* frame)
</del><ins>+void InjectedBundlePageLoaderClient::didLayoutForFrame(WebPage& page, WebFrame& frame)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.didLayoutForFrame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_client.didLayoutForFrame(toAPI(page), toAPI(frame), m_client.base.clientInfo);
</del><ins>+    m_client.didLayoutForFrame(toAPI(&page), toAPI(&frame), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::didReachLayoutMilestone(WebPage* page, LayoutMilestones milestones, RefPtr<API::Object>& userData)
</del><ins>+void InjectedBundlePageLoaderClient::didReachLayoutMilestone(WebPage& page, LayoutMilestones milestones, RefPtr<API::Object>& userData)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.didLayout)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    WKTypeRef userDataToPass = 0;
-    m_client.didLayout(toAPI(page), toWKLayoutMilestones(milestones), &userDataToPass, m_client.base.clientInfo);
</del><ins>+    WKTypeRef userDataToPass = nullptr;
+    m_client.didLayout(toAPI(&page), toWKLayoutMilestones(milestones), &userDataToPass, m_client.base.clientInfo);
</ins><span class="cx">     userData = adoptRef(toImpl(userDataToPass));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::didClearWindowObjectForFrame(WebPage* page, WebFrame* frame, DOMWrapperWorld& world)
</del><ins>+void InjectedBundlePageLoaderClient::didClearWindowObjectForFrame(WebPage& page, WebFrame& frame, DOMWrapperWorld& world)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.didClearWindowObjectForFrame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_client.didClearWindowObjectForFrame(toAPI(page), toAPI(frame), toAPI(InjectedBundleScriptWorld::getOrCreate(world).ptr()), m_client.base.clientInfo);
</del><ins>+    m_client.didClearWindowObjectForFrame(toAPI(&page), toAPI(&frame), toAPI(InjectedBundleScriptWorld::getOrCreate(world).ptr()), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::didCancelClientRedirectForFrame(WebPage* page, WebFrame* frame)
</del><ins>+void InjectedBundlePageLoaderClient::didCancelClientRedirectForFrame(WebPage& page, WebFrame& frame)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.didCancelClientRedirectForFrame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_client.didCancelClientRedirectForFrame(toAPI(page), toAPI(frame), m_client.base.clientInfo);
</del><ins>+    m_client.didCancelClientRedirectForFrame(toAPI(&page), toAPI(&frame), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::willPerformClientRedirectForFrame(WebPage* page, WebFrame* frame, const String& url, double delay, double date)
</del><ins>+void InjectedBundlePageLoaderClient::willPerformClientRedirectForFrame(WebPage& page, WebFrame& frame, const String& url, double delay, double date)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.willPerformClientRedirectForFrame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_client.willPerformClientRedirectForFrame(toAPI(page), toAPI(frame), toURLRef(url.impl()), delay, date, m_client.base.clientInfo);
</del><ins>+    m_client.willPerformClientRedirectForFrame(toAPI(&page), toAPI(&frame), toURLRef(url.impl()), delay, date, m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::didHandleOnloadEventsForFrame(WebPage* page, WebFrame* frame)
</del><ins>+void InjectedBundlePageLoaderClient::didHandleOnloadEventsForFrame(WebPage& page, WebFrame& frame)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.didHandleOnloadEventsForFrame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_client.didHandleOnloadEventsForFrame(toAPI(page), toAPI(frame), m_client.base.clientInfo);
</del><ins>+    m_client.didHandleOnloadEventsForFrame(toAPI(&page), toAPI(&frame), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::globalObjectIsAvailableForFrame(WebPage* page, WebFrame* frame, WebCore::DOMWrapperWorld& world)
</del><ins>+void InjectedBundlePageLoaderClient::globalObjectIsAvailableForFrame(WebPage& page, WebFrame& frame, DOMWrapperWorld& world)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.globalObjectIsAvailableForFrame)
</span><span class="cx">         return;
</span><span class="cx">     
</span><span class="cx">     RefPtr<InjectedBundleScriptWorld> injectedWorld = InjectedBundleScriptWorld::getOrCreate(world);
</span><del>-    m_client.globalObjectIsAvailableForFrame(toAPI(page), toAPI(frame), toAPI(injectedWorld.get()), m_client.base.clientInfo);
</del><ins>+    m_client.globalObjectIsAvailableForFrame(toAPI(&page), toAPI(&frame), toAPI(injectedWorld.get()), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::willDisconnectDOMWindowExtensionFromGlobalObject(WebPage* page, WebCore::DOMWindowExtension* coreExtension)
</del><ins>+void InjectedBundlePageLoaderClient::willDisconnectDOMWindowExtensionFromGlobalObject(WebPage& page, DOMWindowExtension* coreExtension)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.willDisconnectDOMWindowExtensionFromGlobalObject)
</span><span class="cx">         return;
</span><span class="lines">@@ -310,10 +315,10 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr<InjectedBundleDOMWindowExtension> extension = InjectedBundleDOMWindowExtension::get(coreExtension);
</span><span class="cx">     ASSERT(extension);
</span><del>-    m_client.willDisconnectDOMWindowExtensionFromGlobalObject(toAPI(page), toAPI(extension.get()), m_client.base.clientInfo);
</del><ins>+    m_client.willDisconnectDOMWindowExtensionFromGlobalObject(toAPI(&page), toAPI(extension.get()), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::didReconnectDOMWindowExtensionToGlobalObject(WebPage* page, WebCore::DOMWindowExtension* coreExtension)
</del><ins>+void InjectedBundlePageLoaderClient::didReconnectDOMWindowExtensionToGlobalObject(WebPage& page, DOMWindowExtension* coreExtension)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.didReconnectDOMWindowExtensionToGlobalObject)
</span><span class="cx">         return;
</span><span class="lines">@@ -320,10 +325,10 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr<InjectedBundleDOMWindowExtension> extension = InjectedBundleDOMWindowExtension::get(coreExtension);
</span><span class="cx">     ASSERT(extension);
</span><del>-    m_client.didReconnectDOMWindowExtensionToGlobalObject(toAPI(page), toAPI(extension.get()), m_client.base.clientInfo);
</del><ins>+    m_client.didReconnectDOMWindowExtensionToGlobalObject(toAPI(&page), toAPI(extension.get()), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::willDestroyGlobalObjectForDOMWindowExtension(WebPage* page, WebCore::DOMWindowExtension* coreExtension)
</del><ins>+void InjectedBundlePageLoaderClient::willDestroyGlobalObjectForDOMWindowExtension(WebPage& page, DOMWindowExtension* coreExtension)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.willDestroyGlobalObjectForDOMWindowExtension)
</span><span class="cx">         return;
</span><span class="lines">@@ -330,31 +335,41 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr<InjectedBundleDOMWindowExtension> extension = InjectedBundleDOMWindowExtension::get(coreExtension);
</span><span class="cx">     ASSERT(extension);
</span><del>-    m_client.willDestroyGlobalObjectForDOMWindowExtension(toAPI(page), toAPI(extension.get()), m_client.base.clientInfo);
</del><ins>+    m_client.willDestroyGlobalObjectForDOMWindowExtension(toAPI(&page), toAPI(extension.get()), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool InjectedBundlePageLoaderClient::shouldForceUniversalAccessFromLocalURL(WebPage* page, const String& url)
</del><ins>+bool InjectedBundlePageLoaderClient::shouldForceUniversalAccessFromLocalURL(WebPage& page, const String& url)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.shouldForceUniversalAccessFromLocalURL)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    return m_client.shouldForceUniversalAccessFromLocalURL(toAPI(page), toAPI(url.impl()), m_client.base.clientInfo);
</del><ins>+    return m_client.shouldForceUniversalAccessFromLocalURL(toAPI(&page), toAPI(url.impl()), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageLoaderClient::featuresUsedInPage(WebPage* page, const Vector<String>& features)
</del><ins>+void InjectedBundlePageLoaderClient::featuresUsedInPage(WebPage& page, const Vector<String>& features)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.featuresUsedInPage)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    return m_client.featuresUsedInPage(toAPI(page), toAPI(API::Array::createStringArray(features).ptr()), m_client.base.clientInfo);
</del><ins>+    return m_client.featuresUsedInPage(toAPI(&page), toAPI(API::Array::createStringArray(features).ptr()), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-API::String* InjectedBundlePageLoaderClient::userAgentForURL(WebFrame* frame, API::URL* url) const
</del><ins>+String InjectedBundlePageLoaderClient::userAgentForURL(WebFrame& frame, const URL& url) const
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.userAgentForURL)
</span><del>-        return nullptr;
-    WKStringRef userAgent = m_client.userAgentForURL(toAPI(frame), toAPI(url), m_client.base.clientInfo);
-    return toImpl(userAgent);
</del><ins>+        return String();
+    WKStringRef userAgent = m_client.userAgentForURL(toAPI(&frame), toAPI(API::URL::create(url).ptr()), m_client.base.clientInfo);
+    return toImpl(userAgent)->string();
</ins><span class="cx"> }
</span><del>-    
</del><ins>+
+LayoutMilestones InjectedBundlePageLoaderClient::layoutMilestones() const
+{
+    LayoutMilestones milestones = 0;
+    if (m_client.didFirstLayoutForFrame)
+        milestones |= WebCore::DidFirstLayout;
+    if (m_client.didFirstVisuallyNonEmptyLayoutForFrame)
+        milestones |= WebCore::DidFirstVisuallyNonEmptyLayout;
+    return milestones;
+}
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleInjectedBundlePageLoaderClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h (218163 => 218164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h  2017-06-13 03:14:21 UTC (rev 218163)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h     2017-06-13 06:28:48 UTC (rev 218164)
</span><span class="lines">@@ -27,9 +27,8 @@
</span><span class="cx"> #define InjectedBundlePageLoaderClient_h
</span><span class="cx"> 
</span><span class="cx"> #include "APIClient.h"
</span><del>-#include "SameDocumentNavigationType.h"
</del><ins>+#include "APIInjectedBundlePageLoaderClient.h"
</ins><span class="cx"> #include "WKBundlePageLoaderClient.h"
</span><del>-#include <WebCore/LayoutMilestones.h>
</del><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx"> 
</span><span class="lines">@@ -43,64 +42,53 @@
</span><span class="cx"> };
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-namespace WebCore {
-class DOMWindowExtension;
-class DOMWrapperWorld;
-class ResourceError;
-class ResourceRequest;
-class ResourceResponse;
-class SharedBuffer;
-class URL;
-}
-
</del><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-class InjectedBundleBackForwardListItem;
-class WebPage;
-class WebFrame;
-
-class InjectedBundlePageLoaderClient : public API::Client<WKBundlePageLoaderClientBase> {
</del><ins>+class InjectedBundlePageLoaderClient : public API::Client<WKBundlePageLoaderClientBase>, public API::InjectedBundle::PageLoaderClient {
</ins><span class="cx"> public:
</span><del>-    void willLoadURLRequest(WebPage*, const WebCore::ResourceRequest&, API::Object*);
-    void willLoadDataRequest(WebPage*, const WebCore::ResourceRequest&, WebCore::SharedBuffer*, const String&, const String&, const WebCore::URL&, API::Object*);
</del><ins>+    explicit InjectedBundlePageLoaderClient(const WKBundlePageLoaderClientBase*);
</ins><span class="cx"> 
</span><del>-    bool shouldGoToBackForwardListItem(WebPage*, InjectedBundleBackForwardListItem*, RefPtr<API::Object>& userData);
-    void didStartProvisionalLoadForFrame(WebPage*, WebFrame*, RefPtr<API::Object>& userData);
-    void didReceiveServerRedirectForProvisionalLoadForFrame(WebPage*, WebFrame*, RefPtr<API::Object>& userData);
-    void didFailProvisionalLoadWithErrorForFrame(WebPage*, WebFrame*, const WebCore::ResourceError&, RefPtr<API::Object>& userData);
-    void didCommitLoadForFrame(WebPage*, WebFrame*, RefPtr<API::Object>& userData);
-    void didFinishDocumentLoadForFrame(WebPage*, WebFrame*, RefPtr<API::Object>& userData);
-    void didFinishLoadForFrame(WebPage*, WebFrame*, RefPtr<API::Object>& userData);
-    void didFinishProgress(WebPage*);
-    void didFailLoadWithErrorForFrame(WebPage*, WebFrame*, const WebCore::ResourceError&, RefPtr<API::Object>& userData);
-    void didSameDocumentNavigationForFrame(WebPage*, WebFrame*, SameDocumentNavigationType, RefPtr<API::Object>& userData);
-    void didReceiveTitleForFrame(WebPage*, const String&, WebFrame*, RefPtr<API::Object>& userData);
-    void didRemoveFrameFromHierarchy(WebPage*, WebFrame*, RefPtr<API::Object>& userData);
-    void didDisplayInsecureContentForFrame(WebPage*, WebFrame*, RefPtr<API::Object>& userData);
-    void didRunInsecureContentForFrame(WebPage*, WebFrame*, RefPtr<API::Object>& userData);
-    void didDetectXSSForFrame(WebPage*, WebFrame*, RefPtr<API::Object>& userData);
</del><ins>+    void willLoadURLRequest(WebPage&, const WebCore::ResourceRequest&, API::Object*) override;
+    void willLoadDataRequest(WebPage&, const WebCore::ResourceRequest&, WebCore::SharedBuffer*, const WTF::String&, const WTF::String&, const WebCore::URL&, API::Object*) override;
</ins><span class="cx"> 
</span><del>-    void didFirstLayoutForFrame(WebPage*, WebFrame*, RefPtr<API::Object>& userData);
-    void didFirstVisuallyNonEmptyLayoutForFrame(WebPage*, WebFrame*, RefPtr<API::Object>& userData);
-    void didLayoutForFrame(WebPage*, WebFrame*);
-    void didReachLayoutMilestone(WebPage*, WebCore::LayoutMilestones, RefPtr<API::Object>& userData);
</del><ins>+    bool shouldGoToBackForwardListItem(WebPage&, InjectedBundleBackForwardListItem&, RefPtr<API::Object>&) override;
+    void didStartProvisionalLoadForFrame(WebPage&, WebFrame&, RefPtr<API::Object>&) override;
+    void didReceiveServerRedirectForProvisionalLoadForFrame(WebPage&, WebFrame&, RefPtr<API::Object>&) override;
+    void didFailProvisionalLoadWithErrorForFrame(WebPage&, WebFrame&, const WebCore::ResourceError&, RefPtr<API::Object>&) override;
+    void didCommitLoadForFrame(WebPage&, WebFrame&, RefPtr<API::Object>&) override;
+    void didFinishDocumentLoadForFrame(WebPage&, WebFrame&, RefPtr<API::Object>&) override;
+    void didFinishLoadForFrame(WebPage&, WebFrame&, RefPtr<API::Object>&) override;
+    void didFinishProgress(WebPage&) override;
+    void didFailLoadWithErrorForFrame(WebPage&, WebFrame&, const WebCore::ResourceError&, RefPtr<API::Object>&) override;
+    void didSameDocumentNavigationForFrame(WebPage&, WebFrame&, SameDocumentNavigationType, RefPtr<API::Object>&) override;
+    void didReceiveTitleForFrame(WebPage&, const WTF::String&, WebFrame&, RefPtr<API::Object>&) override;
+    void didRemoveFrameFromHierarchy(WebPage&, WebFrame&, RefPtr<API::Object>&) override;
+    void didDisplayInsecureContentForFrame(WebPage&, WebFrame&, RefPtr<API::Object>&) override;
+    void didRunInsecureContentForFrame(WebPage&, WebFrame&, RefPtr<API::Object>&) override;
+    void didDetectXSSForFrame(WebPage&, WebFrame&, RefPtr<API::Object>&) override;
</ins><span class="cx"> 
</span><del>-    void didClearWindowObjectForFrame(WebPage*, WebFrame*, WebCore::DOMWrapperWorld&);
-    void didCancelClientRedirectForFrame(WebPage*, WebFrame*);
-    void willPerformClientRedirectForFrame(WebPage*, WebFrame*, const String& url, double delay, double date);
-    void didHandleOnloadEventsForFrame(WebPage*, WebFrame*);
</del><ins>+    void didFirstLayoutForFrame(WebPage&, WebFrame&, RefPtr<API::Object>&) override;
+    void didFirstVisuallyNonEmptyLayoutForFrame(WebPage&, WebFrame&, RefPtr<API::Object>&) override;
+    void didLayoutForFrame(WebPage&, WebFrame&) override;
+    void didReachLayoutMilestone(WebPage&, WebCore::LayoutMilestones, RefPtr<API::Object>&) override;
</ins><span class="cx"> 
</span><del>-    void globalObjectIsAvailableForFrame(WebPage*, WebFrame*, WebCore::DOMWrapperWorld&);
-    void willDisconnectDOMWindowExtensionFromGlobalObject(WebPage*, WebCore::DOMWindowExtension*);
-    void didReconnectDOMWindowExtensionToGlobalObject(WebPage*, WebCore::DOMWindowExtension*);
-    void willDestroyGlobalObjectForDOMWindowExtension(WebPage*, WebCore::DOMWindowExtension*);
</del><ins>+    void didClearWindowObjectForFrame(WebPage&, WebFrame&, WebCore::DOMWrapperWorld&) override;
+    void didCancelClientRedirectForFrame(WebPage&, WebFrame&) override;
+    void willPerformClientRedirectForFrame(WebPage&, WebFrame&, const WTF::String&, double /*delay*/, double /*date*/) override;
+    void didHandleOnloadEventsForFrame(WebPage&, WebFrame&) override;
</ins><span class="cx"> 
</span><del>-    bool shouldForceUniversalAccessFromLocalURL(WebPage*, const String& url);
</del><ins>+    void globalObjectIsAvailableForFrame(WebPage&, WebFrame&, WebCore::DOMWrapperWorld&) override;
+    void willDisconnectDOMWindowExtensionFromGlobalObject(WebPage&, WebCore::DOMWindowExtension*) override;
+    void didReconnectDOMWindowExtensionToGlobalObject(WebPage&, WebCore::DOMWindowExtension*) override;
+    void willDestroyGlobalObjectForDOMWindowExtension(WebPage&, WebCore::DOMWindowExtension*) override;
</ins><span class="cx"> 
</span><del>-    void featuresUsedInPage(WebPage*, const Vector<String>&);
</del><ins>+    bool shouldForceUniversalAccessFromLocalURL(WebPage&, const WTF::String&) override;
</ins><span class="cx"> 
</span><del>-    void willDestroyFrame(WebPage*, WebFrame*);
-    API::String* userAgentForURL(WebFrame*, API::URL*) const;
</del><ins>+    void featuresUsedInPage(WebPage&, const Vector<WTF::String>&) override;
+
+    WTF::String userAgentForURL(WebFrame&, const WebCore::URL&) const override;
+
+    WebCore::LayoutMilestones layoutMilestones() const override;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (218163 => 218164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp  2017-06-13 03:14:21 UTC (rev 218163)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp     2017-06-13 06:28:48 UTC (rev 218164)
</span><span class="lines">@@ -147,7 +147,7 @@
</span><span class="cx">     RefPtr<API::Object> userData;
</span><span class="cx"> 
</span><span class="cx">     // Notify the bundle client.
</span><del>-    webPage->injectedBundleLoaderClient().didRemoveFrameFromHierarchy(webPage, m_frame, userData);
</del><ins>+    webPage->injectedBundleLoaderClient().didRemoveFrameFromHierarchy(*webPage, *m_frame, userData);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebFrameLoaderClient::detachedFromParent3()
</span><span class="lines">@@ -269,7 +269,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // Notify the bundle client.
</span><del>-    webPage->injectedBundleLoaderClient().didHandleOnloadEventsForFrame(webPage, m_frame);
</del><ins>+    webPage->injectedBundleLoaderClient().didHandleOnloadEventsForFrame(*webPage, *m_frame);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad()
</span><span class="lines">@@ -283,7 +283,7 @@
</span><span class="cx">     RefPtr<API::Object> userData;
</span><span class="cx"> 
</span><span class="cx">     // Notify the bundle client.
</span><del>-    webPage->injectedBundleLoaderClient().didReceiveServerRedirectForProvisionalLoadForFrame(webPage, m_frame, userData);
</del><ins>+    webPage->injectedBundleLoaderClient().didReceiveServerRedirectForProvisionalLoadForFrame(*webPage, *m_frame, userData);
</ins><span class="cx"> 
</span><span class="cx">     // Notify the UIProcess.
</span><span class="cx">     webPage->send(Messages::WebPageProxy::DidReceiveServerRedirectForProvisionalLoadForFrame(m_frame->frameID(), documentLoader.navigationID(), url, UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
</span><span class="lines">@@ -306,7 +306,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // Notify the bundle client.
</span><del>-    webPage->injectedBundleLoaderClient().didCancelClientRedirectForFrame(webPage, m_frame);
</del><ins>+    webPage->injectedBundleLoaderClient().didCancelClientRedirectForFrame(*webPage, *m_frame);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebFrameLoaderClient::dispatchWillPerformClientRedirect(const URL& url, double interval, double fireDate)
</span><span class="lines">@@ -316,7 +316,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // Notify the bundle client.
</span><del>-    webPage->injectedBundleLoaderClient().willPerformClientRedirectForFrame(webPage, m_frame, url.string(), interval, fireDate);
</del><ins>+    webPage->injectedBundleLoaderClient().willPerformClientRedirectForFrame(*webPage, *m_frame, url, interval, fireDate);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebFrameLoaderClient::dispatchDidChangeLocationWithinPage()
</span><span class="lines">@@ -330,7 +330,7 @@
</span><span class="cx">     auto navigationID = static_cast<WebDocumentLoader&>(*m_frame->coreFrame()->loader().documentLoader()).navigationID();
</span><span class="cx"> 
</span><span class="cx">     // Notify the bundle client.
</span><del>-    webPage->injectedBundleLoaderClient().didSameDocumentNavigationForFrame(webPage, m_frame, SameDocumentNavigationAnchorNavigation, userData);
</del><ins>+    webPage->injectedBundleLoaderClient().didSameDocumentNavigationForFrame(*webPage, *m_frame, SameDocumentNavigationAnchorNavigation, userData);
</ins><span class="cx"> 
</span><span class="cx">     // Notify the UIProcess.
</span><span class="cx">     webPage->send(Messages::WebPageProxy::DidSameDocumentNavigationForFrame(m_frame->frameID(), navigationID, SameDocumentNavigationAnchorNavigation, m_frame->coreFrame()->document()->url().string(), UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
</span><span class="lines">@@ -356,7 +356,7 @@
</span><span class="cx">     auto navigationID = static_cast<WebDocumentLoader&>(*m_frame->coreFrame()->loader().documentLoader()).navigationID();
</span><span class="cx"> 
</span><span class="cx">     // Notify the bundle client.
</span><del>-    webPage->injectedBundleLoaderClient().didSameDocumentNavigationForFrame(webPage, m_frame, SameDocumentNavigationSessionStatePush, userData);
</del><ins>+    webPage->injectedBundleLoaderClient().didSameDocumentNavigationForFrame(*webPage, *m_frame, SameDocumentNavigationSessionStatePush, userData);
</ins><span class="cx"> 
</span><span class="cx">     // Notify the UIProcess.
</span><span class="cx">     webPage->send(Messages::WebPageProxy::DidSameDocumentNavigationForFrame(m_frame->frameID(), navigationID, SameDocumentNavigationSessionStatePush, m_frame->coreFrame()->document()->url().string(), UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
</span><span class="lines">@@ -373,7 +373,7 @@
</span><span class="cx">     auto navigationID = static_cast<WebDocumentLoader&>(*m_frame->coreFrame()->loader().documentLoader()).navigationID();
</span><span class="cx"> 
</span><span class="cx">     // Notify the bundle client.
</span><del>-    webPage->injectedBundleLoaderClient().didSameDocumentNavigationForFrame(webPage, m_frame, SameDocumentNavigationSessionStateReplace, userData);
</del><ins>+    webPage->injectedBundleLoaderClient().didSameDocumentNavigationForFrame(*webPage, *m_frame, SameDocumentNavigationSessionStateReplace, userData);
</ins><span class="cx"> 
</span><span class="cx">     // Notify the UIProcess.
</span><span class="cx">     webPage->send(Messages::WebPageProxy::DidSameDocumentNavigationForFrame(m_frame->frameID(), navigationID, SameDocumentNavigationSessionStateReplace, m_frame->coreFrame()->document()->url().string(), UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
</span><span class="lines">@@ -390,7 +390,7 @@
</span><span class="cx">     auto navigationID = static_cast<WebDocumentLoader&>(*m_frame->coreFrame()->loader().documentLoader()).navigationID();
</span><span class="cx"> 
</span><span class="cx">     // Notify the bundle client.
</span><del>-    webPage->injectedBundleLoaderClient().didSameDocumentNavigationForFrame(webPage, m_frame, SameDocumentNavigationSessionStatePop, userData);
</del><ins>+    webPage->injectedBundleLoaderClient().didSameDocumentNavigationForFrame(*webPage, *m_frame, SameDocumentNavigationSessionStatePop, userData);
</ins><span class="cx"> 
</span><span class="cx">     // Notify the UIProcess.
</span><span class="cx">     webPage->send(Messages::WebPageProxy::DidSameDocumentNavigationForFrame(m_frame->frameID(), navigationID, SameDocumentNavigationSessionStatePop, m_frame->coreFrame()->document()->url().string(), UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
</span><span class="lines">@@ -426,7 +426,7 @@
</span><span class="cx">     RefPtr<API::Object> userData;
</span><span class="cx"> 
</span><span class="cx">     // Notify the bundle client.
</span><del>-    webPage->injectedBundleLoaderClient().didStartProvisionalLoadForFrame(webPage, m_frame, userData);
</del><ins>+    webPage->injectedBundleLoaderClient().didStartProvisionalLoadForFrame(*webPage, *m_frame, userData);
</ins><span class="cx"> 
</span><span class="cx">     String unreachableURL = provisionalLoader.unreachableURL().string();
</span><span class="cx"> 
</span><span class="lines">@@ -448,7 +448,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Notify the bundle client.
</span><span class="cx">     // FIXME: Use direction of title.
</span><del>-    webPage->injectedBundleLoaderClient().didReceiveTitleForFrame(webPage, truncatedTitle.string, m_frame, userData);
</del><ins>+    webPage->injectedBundleLoaderClient().didReceiveTitleForFrame(*webPage, truncatedTitle.string, *m_frame, userData);
</ins><span class="cx"> 
</span><span class="cx">     // Notify the UIProcess.
</span><span class="cx">     webPage->send(Messages::WebPageProxy::DidReceiveTitleForFrame(m_frame->frameID(), truncatedTitle.string, UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
</span><span class="lines">@@ -464,7 +464,7 @@
</span><span class="cx">     RefPtr<API::Object> userData;
</span><span class="cx"> 
</span><span class="cx">     // Notify the bundle client.
</span><del>-    webPage->injectedBundleLoaderClient().didCommitLoadForFrame(webPage, m_frame, userData);
</del><ins>+    webPage->injectedBundleLoaderClient().didCommitLoadForFrame(*webPage, *m_frame, userData);
</ins><span class="cx"> 
</span><span class="cx">     webPage->sandboxExtensionTracker().didCommitProvisionalLoad(m_frame);
</span><span class="cx"> 
</span><span class="lines">@@ -482,7 +482,7 @@
</span><span class="cx">     RefPtr<API::Object> userData;
</span><span class="cx"> 
</span><span class="cx">     // Notify the bundle client.
</span><del>-    webPage->injectedBundleLoaderClient().didFailProvisionalLoadWithErrorForFrame(webPage, m_frame, error, userData);
</del><ins>+    webPage->injectedBundleLoaderClient().didFailProvisionalLoadWithErrorForFrame(*webPage, *m_frame, error, userData);
</ins><span class="cx"> 
</span><span class="cx">     webPage->sandboxExtensionTracker().didFailProvisionalLoad(m_frame);
</span><span class="cx"> 
</span><span class="lines">@@ -518,7 +518,7 @@
</span><span class="cx">     auto navigationID = static_cast<WebDocumentLoader&>(*m_frame->coreFrame()->loader().documentLoader()).navigationID();
</span><span class="cx"> 
</span><span class="cx">     // Notify the bundle client.
</span><del>-    webPage->injectedBundleLoaderClient().didFailLoadWithErrorForFrame(webPage, m_frame, error, userData);
</del><ins>+    webPage->injectedBundleLoaderClient().didFailLoadWithErrorForFrame(*webPage, *m_frame, error, userData);
</ins><span class="cx"> 
</span><span class="cx">     // Notify the UIProcess.
</span><span class="cx">     webPage->send(Messages::WebPageProxy::DidFailLoadForFrame(m_frame->frameID(), navigationID, error, UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
</span><span class="lines">@@ -539,7 +539,7 @@
</span><span class="cx">     auto navigationID = static_cast<WebDocumentLoader&>(*m_frame->coreFrame()->loader().documentLoader()).navigationID();
</span><span class="cx"> 
</span><span class="cx">     // Notify the bundle client.
</span><del>-    webPage->injectedBundleLoaderClient().didFinishDocumentLoadForFrame(webPage, m_frame, userData);
</del><ins>+    webPage->injectedBundleLoaderClient().didFinishDocumentLoadForFrame(*webPage, *m_frame, userData);
</ins><span class="cx"> 
</span><span class="cx">     // Notify the UIProcess.
</span><span class="cx">     webPage->send(Messages::WebPageProxy::DidFinishDocumentLoadForFrame(m_frame->frameID(), navigationID, UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
</span><span class="lines">@@ -556,7 +556,7 @@
</span><span class="cx">     auto navigationID = static_cast<WebDocumentLoader&>(*m_frame->coreFrame()->loader().documentLoader()).navigationID();
</span><span class="cx"> 
</span><span class="cx">     // Notify the bundle client.
</span><del>-    webPage->injectedBundleLoaderClient().didFinishLoadForFrame(webPage, m_frame, userData);
</del><ins>+    webPage->injectedBundleLoaderClient().didFinishLoadForFrame(*webPage, *m_frame, userData);
</ins><span class="cx"> 
</span><span class="cx">     // Notify the UIProcess.
</span><span class="cx">     webPage->send(Messages::WebPageProxy::DidFinishLoadForFrame(m_frame->frameID(), navigationID, UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
</span><span class="lines">@@ -592,7 +592,7 @@
</span><span class="cx">     if (milestones & DidFirstLayout) {
</span><span class="cx">         // FIXME: We should consider removing the old didFirstLayout API since this is doing double duty with the
</span><span class="cx">         // new didLayout API.
</span><del>-        webPage->injectedBundleLoaderClient().didFirstLayoutForFrame(webPage, m_frame, userData);
</del><ins>+        webPage->injectedBundleLoaderClient().didFirstLayoutForFrame(*webPage, *m_frame, userData);
</ins><span class="cx">         webPage->send(Messages::WebPageProxy::DidFirstLayoutForFrame(m_frame->frameID(), UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="lines">@@ -620,7 +620,7 @@
</span><span class="cx"> 
</span><span class="cx">         // FIXME: We should consider removing the old didFirstVisuallyNonEmptyLayoutForFrame API since this is doing
</span><span class="cx">         // double duty with the new didLayout API.
</span><del>-        webPage->injectedBundleLoaderClient().didFirstVisuallyNonEmptyLayoutForFrame(webPage, m_frame, userData);
</del><ins>+        webPage->injectedBundleLoaderClient().didFirstVisuallyNonEmptyLayoutForFrame(*webPage, *m_frame, userData);
</ins><span class="cx">         webPage->send(Messages::WebPageProxy::DidFirstVisuallyNonEmptyLayoutForFrame(m_frame->frameID(), UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -632,7 +632,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // Notify the bundle client.
</span><del>-    webPage->injectedBundleLoaderClient().didLayoutForFrame(webPage, m_frame);
</del><ins>+    webPage->injectedBundleLoaderClient().didLayoutForFrame(*webPage, *m_frame);
</ins><span class="cx"> 
</span><span class="cx">     webPage->recomputeShortCircuitHorizontalWheelEventsState();
</span><span class="cx"> 
</span><span class="lines">@@ -1070,7 +1070,7 @@
</span><span class="cx">     RefPtr<API::Object> userData;
</span><span class="cx"> 
</span><span class="cx">     // Ask the bundle client first
</span><del>-    bool shouldGoToBackForwardListItem = webPage->injectedBundleLoaderClient().shouldGoToBackForwardListItem(webPage, bundleItem.get(), userData);
</del><ins>+    bool shouldGoToBackForwardListItem = webPage->injectedBundleLoaderClient().shouldGoToBackForwardListItem(*webPage, *bundleItem, userData);
</ins><span class="cx">     if (!shouldGoToBackForwardListItem)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -1086,7 +1086,7 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr<API::Object> userData;
</span><span class="cx"> 
</span><del>-    webPage->injectedBundleLoaderClient().didDisplayInsecureContentForFrame(webPage, m_frame, userData);
</del><ins>+    webPage->injectedBundleLoaderClient().didDisplayInsecureContentForFrame(*webPage, *m_frame, userData);
</ins><span class="cx"> 
</span><span class="cx">     webPage->send(Messages::WebPageProxy::DidDisplayInsecureContentForFrame(m_frame->frameID(), UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
</span><span class="cx"> }
</span><span class="lines">@@ -1099,7 +1099,7 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr<API::Object> userData;
</span><span class="cx"> 
</span><del>-    webPage->injectedBundleLoaderClient().didRunInsecureContentForFrame(webPage, m_frame, userData);
</del><ins>+    webPage->injectedBundleLoaderClient().didRunInsecureContentForFrame(*webPage, *m_frame, userData);
</ins><span class="cx"> 
</span><span class="cx">     webPage->send(Messages::WebPageProxy::DidRunInsecureContentForFrame(m_frame->frameID(), UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
</span><span class="cx"> }
</span><span class="lines">@@ -1112,7 +1112,7 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr<API::Object> userData;
</span><span class="cx"> 
</span><del>-    webPage->injectedBundleLoaderClient().didDetectXSSForFrame(webPage, m_frame, userData);
</del><ins>+    webPage->injectedBundleLoaderClient().didDetectXSSForFrame(*webPage, *m_frame, userData);
</ins><span class="cx"> 
</span><span class="cx">     webPage->send(Messages::WebPageProxy::DidDetectXSSForFrame(m_frame->frameID(), UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
</span><span class="cx"> }
</span><span class="lines">@@ -1620,7 +1620,7 @@
</span><span class="cx">     if (!webPage)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    webPage->injectedBundleLoaderClient().didClearWindowObjectForFrame(webPage, m_frame, world);
</del><ins>+    webPage->injectedBundleLoaderClient().didClearWindowObjectForFrame(*webPage, *m_frame, world);
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     WebAutomationSessionProxy* automationSessionProxy = WebProcess::singleton().automationSessionProxy();
</span><span class="lines">@@ -1640,7 +1640,7 @@
</span><span class="cx">     if (!webPage)
</span><span class="cx">         return;
</span><span class="cx">     
</span><del>-    webPage->injectedBundleLoaderClient().globalObjectIsAvailableForFrame(webPage, m_frame, world);
</del><ins>+    webPage->injectedBundleLoaderClient().globalObjectIsAvailableForFrame(*webPage, *m_frame, world);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebFrameLoaderClient::dispatchWillDisconnectDOMWindowExtensionFromGlobalObject(WebCore::DOMWindowExtension* extension)
</span><span class="lines">@@ -1649,7 +1649,7 @@
</span><span class="cx">     if (!webPage)
</span><span class="cx">         return;
</span><span class="cx">         
</span><del>-    webPage->injectedBundleLoaderClient().willDisconnectDOMWindowExtensionFromGlobalObject(webPage, extension);
</del><ins>+    webPage->injectedBundleLoaderClient().willDisconnectDOMWindowExtensionFromGlobalObject(*webPage, extension);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebFrameLoaderClient::dispatchDidReconnectDOMWindowExtensionToGlobalObject(WebCore::DOMWindowExtension* extension)
</span><span class="lines">@@ -1658,7 +1658,7 @@
</span><span class="cx">     if (!webPage)
</span><span class="cx">         return;
</span><span class="cx">         
</span><del>-    webPage->injectedBundleLoaderClient().didReconnectDOMWindowExtensionToGlobalObject(webPage, extension);
</del><ins>+    webPage->injectedBundleLoaderClient().didReconnectDOMWindowExtensionToGlobalObject(*webPage, extension);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebFrameLoaderClient::dispatchWillDestroyGlobalObjectForDOMWindowExtension(WebCore::DOMWindowExtension* extension)
</span><span class="lines">@@ -1667,7 +1667,7 @@
</span><span class="cx">     if (!webPage)
</span><span class="cx">         return;
</span><span class="cx">         
</span><del>-    webPage->injectedBundleLoaderClient().willDestroyGlobalObjectForDOMWindowExtension(webPage, extension);
</del><ins>+    webPage->injectedBundleLoaderClient().willDestroyGlobalObjectForDOMWindowExtension(*webPage, extension);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebFrameLoaderClient::registerForIconNotification(bool /*listen*/)
</span><span class="lines">@@ -1748,7 +1748,7 @@
</span><span class="cx">     if (!webPage)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    return webPage->injectedBundleLoaderClient().shouldForceUniversalAccessFromLocalURL(webPage, url.string());
</del><ins>+    return webPage->injectedBundleLoaderClient().shouldForceUniversalAccessFromLocalURL(*webPage, url);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Ref<FrameNetworkingContext> WebFrameLoaderClient::createNetworkingContext()
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebProgressTrackerClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp (218163 => 218164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp      2017-06-13 03:14:21 UTC (rev 218163)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp 2017-06-13 06:28:48 UTC (rev 218164)
</span><span class="lines">@@ -73,7 +73,7 @@
</span><span class="cx">     m_webPage.setMainFrameProgressCompleted(true);
</span><span class="cx"> 
</span><span class="cx">     // Notify the bundle client.
</span><del>-    m_webPage.injectedBundleLoaderClient().didFinishProgress(&m_webPage);
</del><ins>+    m_webPage.injectedBundleLoaderClient().didFinishProgress(m_webPage);
</ins><span class="cx"> 
</span><span class="cx">     m_webPage.send(Messages::WebPageProxy::DidFinishProgress());
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (218163 => 218164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp      2017-06-13 03:14:21 UTC (rev 218163)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2017-06-13 06:28:48 UTC (rev 218164)
</span><span class="lines">@@ -339,6 +339,7 @@
</span><span class="cx"> #endif
</span><span class="cx">     , m_editorClient { std::make_unique<API::InjectedBundle::EditorClient>() }
</span><span class="cx">     , m_formClient(std::make_unique<API::InjectedBundle::FormClient>())
</span><ins>+    , m_loaderClient(std::make_unique<API::InjectedBundle::PageLoaderClient>())
</ins><span class="cx">     , m_uiClient(std::make_unique<API::InjectedBundle::PageUIClient>())
</span><span class="cx">     , m_findController(makeUniqueRef<FindController>(this))
</span><span class="cx">     , m_userContentController(WebUserContentController::getOrCreate(parameters.userContentControllerID))
</span><span class="lines">@@ -725,22 +726,19 @@
</span><span class="cx">     m_formClient = WTFMove(formClient);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPage::initializeInjectedBundleLoaderClient(WKBundlePageLoaderClientBase* client)
</del><ins>+void WebPage::setInjectedBundlePageLoaderClient(std::unique_ptr<API::InjectedBundle::PageLoaderClient> loaderClient)
</ins><span class="cx"> {
</span><del>-    m_loaderClient.initialize(client);
</del><ins>+    if (!loaderClient) {
+        m_loaderClient = std::make_unique<API::InjectedBundle::PageLoaderClient>();
+        return;
+    }
</ins><span class="cx"> 
</span><ins>+    m_loaderClient = WTFMove(loaderClient);
+
</ins><span class="cx">     // It would be nice to get rid of this code and transition all clients to using didLayout instead of
</span><span class="cx">     // didFirstLayoutInFrame and didFirstVisuallyNonEmptyLayoutInFrame. In the meantime, this is required
</span><span class="cx">     // for backwards compatibility.
</span><del>-    LayoutMilestones milestones = 0;
-    if (client) {
-        if (m_loaderClient.client().didFirstLayoutForFrame)
-            milestones |= WebCore::DidFirstLayout;
-        if (m_loaderClient.client().didFirstVisuallyNonEmptyLayoutForFrame)
-            milestones |= WebCore::DidFirstVisuallyNonEmptyLayout;
-    }
-
-    if (milestones)
</del><ins>+    if (auto milestones = m_loaderClient->layoutMilestones())
</ins><span class="cx">         listenForLayoutMilestones(milestones);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1150,7 +1148,7 @@
</span><span class="cx"> #endif
</span><span class="cx">     m_editorClient = std::make_unique<API::InjectedBundle::EditorClient>();
</span><span class="cx">     m_formClient = std::make_unique<API::InjectedBundle::FormClient>();
</span><del>-    m_loaderClient.initialize(0);
</del><ins>+    m_loaderClient = std::make_unique<API::InjectedBundle::PageLoaderClient>();
</ins><span class="cx">     m_policyClient.initialize(0);
</span><span class="cx">     m_resourceLoadClient.initialize(0);
</span><span class="cx">     m_uiClient = std::make_unique<API::InjectedBundle::PageUIClient>();
</span><span class="lines">@@ -1218,7 +1216,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Let the InjectedBundle know we are about to start the load, passing the user data from the UIProcess
</span><span class="cx">     // to all the client to set up any needed state.
</span><del>-    m_loaderClient.willLoadURLRequest(this, loadParameters.request, WebProcess::singleton().transformHandlesToObjects(loadParameters.userData.object()).get());
</del><ins>+    m_loaderClient->willLoadURLRequest(*this, loadParameters.request, WebProcess::singleton().transformHandlesToObjects(loadParameters.userData.object()).get());
</ins><span class="cx"> 
</span><span class="cx">     platformDidReceiveLoadParameters(loadParameters);
</span><span class="cx"> 
</span><span class="lines">@@ -1244,7 +1242,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Let the InjectedBundle know we are about to start the load, passing the user data from the UIProcess
</span><span class="cx">     // to all the client to set up any needed state.
</span><del>-    m_loaderClient.willLoadDataRequest(this, request, const_cast<SharedBuffer*>(substituteData.content()), substituteData.mimeType(), substituteData.textEncoding(), substituteData.failingURL(), WebProcess::singleton().transformHandlesToObjects(userData.object()).get());
</del><ins>+    m_loaderClient->willLoadDataRequest(*this, request, const_cast<SharedBuffer*>(substituteData.content()), substituteData.mimeType(), substituteData.textEncoding(), substituteData.failingURL(), WebProcess::singleton().transformHandlesToObjects(userData.object()).get());
</ins><span class="cx"> 
</span><span class="cx">     // Initate the load in WebCore.
</span><span class="cx">     m_mainFrame->coreFrame()->loader().load(FrameLoadRequest(m_mainFrame->coreFrame(), request, ShouldOpenExternalURLsPolicy::ShouldNotAllow, substituteData));
</span><span class="lines">@@ -2786,10 +2784,10 @@
</span><span class="cx"> 
</span><span class="cx"> String WebPage::userAgent(WebFrame* frame, const URL& webcoreURL) const
</span><span class="cx"> {
</span><del>-    if (frame && m_loaderClient.client().userAgentForURL) {
-        API::String* apiString = m_loaderClient.userAgentForURL(frame, API::URL::create(webcoreURL).ptr());
-        if (apiString)
-            return apiString->string();
</del><ins>+    if (frame) {
+        String userAgent = m_loaderClient->userAgentForURL(*frame, webcoreURL);
+        if (!userAgent.isEmpty())
+            return userAgent;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     String userAgent = platformUserAgent(webcoreURL);
</span><span class="lines">@@ -5598,7 +5596,7 @@
</span><span class="cx"> void WebPage::reportUsedFeatures()
</span><span class="cx"> {
</span><span class="cx">     Vector<String> namedFeatures;
</span><del>-    m_loaderClient.featuresUsedInPage(this, namedFeatures);
</del><ins>+    m_loaderClient->featuresUsedInPage(*this, namedFeatures);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPage::updateWebsitePolicies(const WebsitePolicies& websitePolicies)
</span><span class="lines">@@ -5828,7 +5826,7 @@
</span><span class="cx"> void WebPage::dispatchDidReachLayoutMilestone(WebCore::LayoutMilestones milestones)
</span><span class="cx"> {
</span><span class="cx">     RefPtr<API::Object> userData;
</span><del>-    injectedBundleLoaderClient().didReachLayoutMilestone(this, milestones, userData);
</del><ins>+    injectedBundleLoaderClient().didReachLayoutMilestone(*this, milestones, userData);
</ins><span class="cx"> 
</span><span class="cx">     // Clients should not set userData for this message, and it won't be passed through.
</span><span class="cx">     ASSERT(!userData);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (218163 => 218164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2017-06-13 03:14:21 UTC (rev 218163)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h   2017-06-13 06:28:48 UTC (rev 218164)
</span><span class="lines">@@ -28,12 +28,12 @@
</span><span class="cx"> #include "APIInjectedBundleEditorClient.h"
</span><span class="cx"> #include "APIInjectedBundleFormClient.h"
</span><span class="cx"> #include "APIInjectedBundlePageContextMenuClient.h"
</span><ins>+#include "APIInjectedBundlePageLoaderClient.h"
</ins><span class="cx"> #include "APIInjectedBundlePageUIClient.h"
</span><span class="cx"> #include "APIObject.h"
</span><span class="cx"> #include "EditingRange.h"
</span><span class="cx"> #include "InjectedBundlePageContextMenuClient.h"
</span><span class="cx"> #include "InjectedBundlePageFullScreenClient.h"
</span><del>-#include "InjectedBundlePageLoaderClient.h"
</del><span class="cx"> #include "InjectedBundlePagePolicyClient.h"
</span><span class="cx"> #include "InjectedBundlePageResourceLoadClient.h"
</span><span class="cx"> #include "LayerTreeContext.h"
</span><span class="lines">@@ -330,7 +330,7 @@
</span><span class="cx"> #endif
</span><span class="cx">     void setInjectedBundleEditorClient(std::unique_ptr<API::InjectedBundle::EditorClient>);
</span><span class="cx">     void setInjectedBundleFormClient(std::unique_ptr<API::InjectedBundle::FormClient>);
</span><del>-    void initializeInjectedBundleLoaderClient(WKBundlePageLoaderClientBase*);
</del><ins>+    void setInjectedBundlePageLoaderClient(std::unique_ptr<API::InjectedBundle::PageLoaderClient>);
</ins><span class="cx">     void initializeInjectedBundlePolicyClient(WKBundlePagePolicyClientBase*);
</span><span class="cx">     void initializeInjectedBundleResourceLoadClient(WKBundlePageResourceLoadClientBase*);
</span><span class="cx">     void setInjectedBundleUIClient(std::unique_ptr<API::InjectedBundle::PageUIClient>);
</span><span class="lines">@@ -343,7 +343,7 @@
</span><span class="cx"> #endif
</span><span class="cx">     API::InjectedBundle::EditorClient& injectedBundleEditorClient() { return *m_editorClient.get(); }
</span><span class="cx">     API::InjectedBundle::FormClient& injectedBundleFormClient() { return *m_formClient.get(); }
</span><del>-    InjectedBundlePageLoaderClient& injectedBundleLoaderClient() { return m_loaderClient; }
</del><ins>+    API::InjectedBundle::PageLoaderClient& injectedBundleLoaderClient() { return *m_loaderClient; }
</ins><span class="cx">     InjectedBundlePagePolicyClient& injectedBundlePolicyClient() { return m_policyClient; }
</span><span class="cx">     InjectedBundlePageResourceLoadClient& injectedBundleResourceLoadClient() { return m_resourceLoadClient; }
</span><span class="cx">     API::InjectedBundle::PageUIClient& injectedBundleUIClient() { return *m_uiClient.get(); }
</span><span class="lines">@@ -1382,7 +1382,7 @@
</span><span class="cx"> #endif
</span><span class="cx">     std::unique_ptr<API::InjectedBundle::EditorClient> m_editorClient;
</span><span class="cx">     std::unique_ptr<API::InjectedBundle::FormClient> m_formClient;
</span><del>-    InjectedBundlePageLoaderClient m_loaderClient;
</del><ins>+    std::unique_ptr<API::InjectedBundle::PageLoaderClient> m_loaderClient;
</ins><span class="cx">     InjectedBundlePagePolicyClient m_policyClient;
</span><span class="cx">     InjectedBundlePageResourceLoadClient m_resourceLoadClient;
</span><span class="cx">     std::unique_ptr<API::InjectedBundle::PageUIClient> m_uiClient;
</span></span></pre>
</div>
</div>

</body>
</html>