PlatformStrategiesWinCE.cpp [plain text]
#include "config.h"
#include "PlatformStrategiesWinCE.h"
#include "IntSize.h"
#include "Page.h"
#include "PageGroup.h"
#include "PlatformCookieJar.h"
#include "PluginDatabase.h"
using namespace WebCore;
void PlatformStrategiesWinCE::initialize()
{
DEPRECATED_DEFINE_STATIC_LOCAL(PlatformStrategiesWinCE, platformStrategies, ());
}
PlatformStrategiesWinCE::PlatformStrategiesWinCE()
{
setPlatformStrategies(this);
}
CookiesStrategy* PlatformStrategiesWinCE::createCookiesStrategy()
{
return this;
}
DatabaseStrategy* PlatformStrategiesWinCE::createDatabaseStrategy()
{
return this;
}
LoaderStrategy* PlatformStrategiesWinCE::createLoaderStrategy()
{
return this;
}
PasteboardStrategy* PlatformStrategiesWinCE::createPasteboardStrategy()
{
return 0;
}
PluginStrategy* PlatformStrategiesWinCE::createPluginStrategy()
{
return this;
}
SharedWorkerStrategy* PlatformStrategiesWinCE::createSharedWorkerStrategy()
{
return this;
}
StorageStrategy* PlatformStrategiesWinCE::createStorageStrategy()
{
return this;
}
VisitedLinkStrategy* PlatformStrategiesWinCE::createVisitedLinkStrategy()
{
return this;
}
String PlatformStrategiesWinCE::cookiesForDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
{
return WebCore::cookiesForDOM(session, firstParty, url);
}
void PlatformStrategiesWinCE::setCookiesFromDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url, const String& cookieString)
{
WebCore::setCookiesFromDOM(session, firstParty, url, cookieString);
}
bool PlatformStrategiesWinCE::cookiesEnabled(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
{
return WebCore::cookiesEnabled(session, firstParty, url);
}
String PlatformStrategiesWinCE::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
{
return WebCore::cookieRequestHeaderFieldValue(session, firstParty, url);
}
bool PlatformStrategiesWinCE::getRawCookies(const NetworkStorageSession& session, const URL& firstParty, const URL& url, Vector<Cookie>& rawCookies)
{
return WebCore::getRawCookies(session, firstParty, url, rawCookies);
}
void PlatformStrategiesWinCE::deleteCookie(const NetworkStorageSession& session, const URL& url, const String& cookieName)
{
WebCore::deleteCookie(session, url, cookieName);
}
void PlatformStrategiesWinCE::refreshPlugins()
{
PluginDatabase::installedPlugins()->refresh();
}
void PlatformStrategiesWinCE::getPluginInfo(const Page*, Vector<PluginInfo>& outPlugins)
{
const Vector<PluginPackage*>& plugins = PluginDatabase::installedPlugins()->plugins();
outPlugins.resize(plugins.size());
for (size_t i = 0; i < plugins.size(); ++i) {
PluginPackage* package = plugins[i];
PluginInfo info;
info.name = package->name();
info.file = package->fileName();
info.desc = package->description();
const MIMEToDescriptionsMap& mimeToDescriptions = package->mimeToDescriptions();
info.mimes.reserveCapacity(mimeToDescriptions.size());
MIMEToDescriptionsMap::const_iterator end = mimeToDescriptions.end();
for (MIMEToDescriptionsMap::const_iterator it = mimeToDescriptions.begin(); it != end; ++it) {
MimeClassInfo mime;
mime.type = it->key;
mime.desc = it->value;
mime.extensions = package->mimeToExtensions().get(mime.type);
info.mimes.append(mime);
}
outPlugins[i] = info;
}
}
bool PlatformStrategiesWinCE::isLinkVisited(Page* page, LinkHash hash, const URL&, const AtomicString&)
{
return page->group().isLinkVisited(hash);
}
void PlatformStrategiesWinCE::addVisitedLink(Page* page, LinkHash hash)
{
page->group().addVisitedLinkHash(hash);
}