diff options
Diffstat (limited to 'Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp')
-rw-r--r-- | Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp b/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp index 3fbed2b..2d8812f 100644 --- a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp +++ b/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp @@ -1,5 +1,6 @@ /* * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> + * Copyright (C) 2011 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -35,7 +36,10 @@ #include "Page.h" #include "PluginDatabase.h" #include "RenderPart.h" +#include "SystemInfo.h" +#include "WebKitVersion.h" #include "WebView.h" +#include <wtf/text/StringConcatenate.h> using namespace WebCore; @@ -54,7 +58,14 @@ FrameLoaderClientWinCE::~FrameLoaderClientWinCE() String FrameLoaderClientWinCE::userAgent(const KURL&) { - return "WebKitWinCE"; + DEFINE_STATIC_LOCAL(String, userAgentString, ()); + + if (userAgentString.isNull()) { + String webKitVersion = String::format("%d.%d", WEBKIT_MAJOR_VERSION, WEBKIT_MINOR_VERSION); + userAgentString = makeString("Mozilla/5.0 (", windowsVersionForUAString(), ") AppleWebKit/", webKitVersion, " (KHTML, like Gecko) Mobile Safari/", webKitVersion); + } + + return userAgentString; } PassRefPtr<DocumentLoader> FrameLoaderClientWinCE::createDocumentLoader(const WebCore::ResourceRequest& request, const SubstituteData& substituteData) @@ -182,9 +193,9 @@ PassRefPtr<Widget> FrameLoaderClientWinCE::createJavaAppletWidget(const IntSize& return 0; } -ObjectContentType FrameLoaderClientWinCE::objectContentType(const KURL& url, const String& mimeType) +ObjectContentType FrameLoaderClientWinCE::objectContentType(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages) { - return FrameLoader::defaultObjectContentType(url, mimeType); + return FrameLoader::defaultObjectContentType(url, mimeType, shouldPreferPlugInsForImages); } String FrameLoaderClientWinCE::overrideMediaType() const |