diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp')
-rw-r--r-- | Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp index 47f326439..5ba47cc38 100644 --- a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp +++ b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp @@ -29,11 +29,16 @@ #include "APIArray.h" #include "APIData.h" #include "APIError.h" +#include "APIURL.h" #include "APIURLRequest.h" +#include "InjectedBundleBackForwardListItem.h" #include "InjectedBundleDOMWindowExtension.h" #include "InjectedBundleScriptWorld.h" #include "WKAPICast.h" #include "WKBundleAPICast.h" +#include "WKSharedAPICast.h" +#include "WebFrame.h" +#include "WebPage.h" #include <WebCore/SharedBuffer.h> #include <wtf/text/WTFString.h> @@ -247,7 +252,7 @@ void InjectedBundlePageLoaderClient::didLayoutForFrame(WebPage* page, WebFrame* m_client.didLayoutForFrame(toAPI(page), toAPI(frame), m_client.base.clientInfo); } -void InjectedBundlePageLoaderClient::didLayout(WebPage* page, LayoutMilestones milestones, RefPtr<API::Object>& userData) +void InjectedBundlePageLoaderClient::didReachLayoutMilestone(WebPage* page, LayoutMilestones milestones, RefPtr<API::Object>& userData) { if (!m_client.didLayout) return; @@ -341,15 +346,15 @@ void InjectedBundlePageLoaderClient::featuresUsedInPage(WebPage* page, const Vec if (!m_client.featuresUsedInPage) return; - return m_client.featuresUsedInPage(toAPI(page), toAPI(API::Array::createStringArray(features).get()), m_client.base.clientInfo); + return m_client.featuresUsedInPage(toAPI(page), toAPI(API::Array::createStringArray(features).ptr()), m_client.base.clientInfo); } -void InjectedBundlePageLoaderClient::willDestroyFrame(WebPage* page, WebFrame* frame) +API::String* InjectedBundlePageLoaderClient::userAgentForURL(WebFrame* frame, API::URL* url) const { - if (!m_client.willDestroyFrame) - return; - - m_client.willDestroyFrame(toAPI(page), toAPI(frame), m_client.base.clientInfo); + if (!m_client.userAgentForURL) + return nullptr; + WKStringRef userAgent = m_client.userAgentForURL(toAPI(frame), toAPI(url), m_client.base.clientInfo); + return toImpl(userAgent); } - + } // namespace WebKit |