diff options
Diffstat (limited to 'Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp')
-rw-r--r-- | Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp | 67 |
1 files changed, 36 insertions, 31 deletions
diff --git a/Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp b/Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp index 1319b76f3..915f44a7f 100644 --- a/Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp +++ b/Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp @@ -25,10 +25,15 @@ #include "config.h" -#include "MutableDictionary.h" +#include "APIDictionary.h" +#include "APIUserContentExtension.h" +#include "WKAPICast.h" #include "WKArray.h" +#include "WKContextPrivate.h" #include "WKMutableDictionary.h" -#include "WKSharedAPICast.h" +#include "WKPreferencesRefPrivate.h" +#include "WebPageGroup.h" +#include "WebUserContentControllerProxy.h" #if PLATFORM(MAC) #include "WKContextPrivateMac.h" @@ -36,53 +41,53 @@ // Deprecated functions that should be removed from the framework once nobody uses them. -using namespace WebKit; - extern "C" { -WK_EXPORT bool WKArrayIsMutable(WKArrayRef array); - -WK_EXPORT bool WKDictionaryAddItem(WKMutableDictionaryRef dictionary, WKStringRef key, WKTypeRef item); -WK_EXPORT bool WKDictionaryIsMutable(WKDictionaryRef dictionary); -WK_EXPORT void WKDictionaryRemoveItem(WKMutableDictionaryRef dictionary, WKStringRef key); - -#if PLATFORM(MAC) -WK_EXPORT CGContextRef WKGraphicsContextGetCGContext(WKGraphicsContextRef graphicsContext); -#endif +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); } -bool WKArrayIsMutable(WKArrayRef) -{ - return false; -} +using namespace WebKit; -bool WKDictionaryIsMutable(WKDictionaryRef dictionaryRef) +void WKContextSetUsesNetworkProcess(WKContextRef, bool) { - return toImpl(dictionaryRef)->isMutable(); } -bool WKDictionaryAddItem(WKMutableDictionaryRef dictionaryRef, WKStringRef keyRef, WKTypeRef itemRef) +void WKContextSetProcessModel(WKContextRef, WKProcessModel) { - return toImpl(dictionaryRef)->add(toImpl(keyRef)->string(), toImpl(itemRef)); } -void WKDictionaryRemoveItem(WKMutableDictionaryRef dictionaryRef, WKStringRef keyRef) +WKStringRef WKPageGroupCopyIdentifier(WKPageGroupRef) { - toImpl(dictionaryRef)->remove(toImpl(keyRef)->string()); + return nullptr; } - -#if PLATFORM(MAC) -CGContextRef WKGraphicsContextGetCGContext(WKGraphicsContextRef graphicsContext) +void WKPageGroupAddUserContentFilter(WKPageGroupRef pageGroupRef, WKUserContentFilterRef userContentFilterRef) { - return nullptr; +#if ENABLE(CONTENT_EXTENSIONS) + toImpl(pageGroupRef)->userContentController().addUserContentExtension(*toImpl(userContentFilterRef)); +#else + UNUSED_PARAM(pageGroupRef); + UNUSED_PARAM(userContentFilterRef); +#endif } -bool WKContextGetProcessSuppressionEnabled(WKContextRef) +void WKPageGroupRemoveUserContentFilter(WKPageGroupRef pageGroupRef, WKStringRef userContentFilterNameRef) { - return true; +#if ENABLE(CONTENT_EXTENSIONS) + toImpl(pageGroupRef)->userContentController().removeUserContentExtension(toWTFString(userContentFilterNameRef)); +#else + UNUSED_PARAM(pageGroupRef); + UNUSED_PARAM(userContentFilterNameRef); +#endif } -void WKContextSetProcessSuppressionEnabled(WKContextRef, bool) +void WKPageGroupRemoveAllUserContentFilters(WKPageGroupRef pageGroupRef) { -} +#if ENABLE(CONTENT_EXTENSIONS) + toImpl(pageGroupRef)->userContentController().removeAllUserContentExtensions(); +#else + UNUSED_PARAM(pageGroupRef); #endif +} |