WKDeprecatedFunctions.cpp [plain text]
#include "config.h"
#include "APIDictionary.h"
#include "APIUserContentExtension.h"
#include "WKAPICast.h"
#include "WKArray.h"
#include "WKContextPrivate.h"
#include "WKMutableDictionary.h"
#include "WKPreferencesRefPrivate.h"
#include "WebPageGroup.h"
#include "WebUserContentControllerProxy.h"
#if PLATFORM(MAC)
#include "WKContextPrivateMac.h"
#endif
extern "C" {
WK_EXPORT WKStringRef WKPageGroupCopyIdentifier(WKPageGroupRef pageGroup);
WK_EXPORT void WKPageGroupAddUserContentFilter(WKPageGroupRef pageGroup, WKUserContentFilterRef userContentFilter);
WK_EXPORT void WKPageGroupRemoveUserContentFilter(WKPageGroupRef pageGroup, WKStringRef userContentFilterName);
WK_EXPORT void WKPageGroupRemoveAllUserContentFilters(WKPageGroupRef pageGroup);
}
using namespace WebKit;
void WKContextSetUsesNetworkProcess(WKContextRef, bool)
{
}
void WKContextSetProcessModel(WKContextRef, WKProcessModel)
{
}
WKStringRef WKPageGroupCopyIdentifier(WKPageGroupRef)
{
return nullptr;
}
void WKPageGroupAddUserContentFilter(WKPageGroupRef pageGroupRef, WKUserContentFilterRef userContentFilterRef)
{
#if ENABLE(CONTENT_EXTENSIONS)
toImpl(pageGroupRef)->userContentController().addUserContentExtension(*toImpl(userContentFilterRef));
#else
UNUSED_PARAM(pageGroupRef);
UNUSED_PARAM(userContentFilterRef);
#endif
}
void WKPageGroupRemoveUserContentFilter(WKPageGroupRef pageGroupRef, WKStringRef userContentFilterNameRef)
{
#if ENABLE(CONTENT_EXTENSIONS)
toImpl(pageGroupRef)->userContentController().removeUserContentExtension(toWTFString(userContentFilterNameRef));
#else
UNUSED_PARAM(pageGroupRef);
UNUSED_PARAM(userContentFilterNameRef);
#endif
}
void WKPageGroupRemoveAllUserContentFilters(WKPageGroupRef pageGroupRef)
{
#if ENABLE(CONTENT_EXTENSIONS)
toImpl(pageGroupRef)->userContentController().removeAllUserContentExtensions();
#else
UNUSED_PARAM(pageGroupRef);
#endif
}