Commit 02c9476f authored by weinig@apple.com's avatar weinig@apple.com
Browse files

Simplify [WebView userAgentForURL:]. No need to call into helper function.

Reviewed by Mark Rowe.

* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::userAgent):
* WebView/WebView.mm:
(-[WebView userAgentForURL:]):
* WebView/WebViewInternal.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51562 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent aeb999ad
2009-12-01 Sam Weinig <sam@webkit.org>
Reviewed by Mark Rowe.
Simplify [WebView userAgentForURL:]. No need to call into helper function.
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::userAgent):
* WebView/WebView.mm:
(-[WebView userAgentForURL:]):
* WebView/WebViewInternal.h:
2009-11-24 Gavin Barraclough <barraclough@apple.com>
 
Reviewed by Geoff Garen.
......
......@@ -1224,7 +1224,7 @@ String WebFrameLoaderClient::userAgent(const KURL& url)
if (!webView)
return String("");
return [webView _userAgentForURL:url];
return [webView userAgentForURL:url];
}
static const MouseEvent* findMouseEvent(const Event* event)
......
......@@ -3197,7 +3197,14 @@ static bool needsWebViewInitThreadWorkaround()
// Get the appropriate user-agent string for a particular URL.
- (NSString *)userAgentForURL:(NSURL *)url
{
return [self _userAgentForURL:KURL([url absoluteURL])];
if (_private->useSiteSpecificSpoofing) {
// No current site-specific spoofs.
}
if (_private->userAgent.isNull())
_private->userAgent = [[self class] _standardUserAgentWithApplicationName:_private->applicationNameForUserAgent];
return _private->userAgent;
}
- (void)setHostWindow:(NSWindow *)hostWindow
......@@ -5299,19 +5306,6 @@ static WebFrameView *containingFrameView(NSView *view)
}
#endif // ENABLE(ICONDATABASE)
// Get the appropriate user-agent string for a particular URL.
- (WebCore::String)_userAgentForURL:(const WebCore::KURL&)url
{
if (_private->useSiteSpecificSpoofing) {
// No current site-specific spoofs.
}
if (_private->userAgent.isNull())
_private->userAgent = [[self class] _standardUserAgentWithApplicationName:_private->applicationNameForUserAgent];
return _private->userAgent;
}
- (void)_addObject:(id)object forIdentifier:(unsigned long)identifier
{
ASSERT(!_private->identifierMap.contains(identifier));
......
......@@ -67,7 +67,6 @@ namespace WebCore {
- (WebCore::Frame*)_mainCoreFrame;
- (WebFrame *)_selectedOrMainFrame;
- (WebCore::String)_userAgentForURL:(const WebCore::KURL&)url;
- (WebCore::KeyboardUIMode)_keyboardUIMode;
- (BOOL)_becomingFirstResponderFromOutside;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment