Need a way to retrieve custom user agent from a WKPage
authorbweinstein@apple.com <bweinstein@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Oct 2010 20:16:18 +0000 (20:16 +0000)
committerbweinstein@apple.com <bweinstein@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Oct 2010 20:16:18 +0000 (20:16 +0000)
commit9a10f01d8ae4ac979412eb374f72aa3e745581b7
tree5f01541c01170d5707b2db1dcf03ac2f9c37c28f
parentca4c8ada9e187e4bae3224740082d780b021f7d4
Need a way to retrieve custom user agent from a WKPage
https://bugs.webkit.org/show_bug.cgi?id=48360
<rdar://problem/8466537>

Reviewed by Darin Adler.

Add an exported function on WKPage to get the page's custom user agent.

* UIProcess/API/C/WKPage.cpp:
(WKPageCopyCustomUserAgent): Exported function that returns the custom user
    agent.
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close): Clear the custom user agent string.
(WebKit::WebPageProxy::processDidCrash): Ditto.
(WebKit::WebPageProxy::setCustomUserAgent): Add a new early return if we're setting
    the custom user agent to what it was before, and set the custom user agent member
    variable.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::customUserAgent): Returns the custom user agent.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@70561 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit2/ChangeLog
WebKit2/UIProcess/API/C/WKPage.cpp
WebKit2/UIProcess/API/C/WKPage.h
WebKit2/UIProcess/WebPageProxy.cpp
WebKit2/UIProcess/WebPageProxy.h