summaryrefslogtreecommitdiff
path: root/Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp')
-rw-r--r--Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp67
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
+}