Diff
Modified: trunk/Source/WebKit2/ChangeLog (160035 => 160036)
--- trunk/Source/WebKit2/ChangeLog 2013-12-03 21:50:43 UTC (rev 160035)
+++ trunk/Source/WebKit2/ChangeLog 2013-12-03 21:53:21 UTC (rev 160036)
@@ -1,3 +1,21 @@
+2013-12-03 Anders Carlsson <[email protected]>
+
+ Deprecate WKNotificationProvider
+ https://bugs.webkit.org/show_bug.cgi?id=125178
+
+ Reviewed by Sam Weinig.
+
+ * Shared/API/c/WKDeclarationSpecifiers.h:
+ Add WK_DEPRECATED and WK_ENUM_DEPRECATED macros so we can things as deprecated.
+
+ * UIProcess/API/C/WKNotificationManager.cpp:
+ (WKNotificationManagerSetProvider):
+ * UIProcess/API/C/WKNotificationManager.h:
+ WKNotificationManagerSetProvider now takes a WKNotificationProviderBase.
+
+ * UIProcess/API/C/WKNotificationProvider.h:
+ Deprecate WKNotificationProvider and kWKNotificationProviderCurrentVersion.
+
2013-12-03 Brady Eidson <[email protected]>
Indexed Database work should be done on a non-main queue
Modified: trunk/Source/WebKit2/Shared/API/c/WKDeclarationSpecifiers.h (160035 => 160036)
--- trunk/Source/WebKit2/Shared/API/c/WKDeclarationSpecifiers.h 2013-12-03 21:50:43 UTC (rev 160035)
+++ trunk/Source/WebKit2/Shared/API/c/WKDeclarationSpecifiers.h 2013-12-03 21:53:21 UTC (rev 160036)
@@ -46,4 +46,16 @@
#endif
#endif /* !defined(WK_INLINE) */
+#if defined(__has_extension) && __has_extension(enumerator_attributes) && __has_extension(attribute_unavailable_with_message)
+#define WK_DEPRECATED(message) __attribute__((deprecated(message)))
+#else
+#define WK_DEPRECATED(message)
+#endif
+
+#if defined(__has_extension) && __has_extension(enumerator_attributes) && __has_extension(attribute_unavailable_with_message)
+#define WK_ENUM_DEPRECATED(message) __attribute__((deprecated(message)))
+#else
+#define WK_ENUM_DEPRECATED(message)
+#endif
+
#endif /* WKDeclarationSpecifiers_h */
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKNotificationManager.cpp (160035 => 160036)
--- trunk/Source/WebKit2/UIProcess/API/C/WKNotificationManager.cpp 2013-12-03 21:50:43 UTC (rev 160035)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKNotificationManager.cpp 2013-12-03 21:53:21 UTC (rev 160036)
@@ -36,9 +36,9 @@
return toAPI(WebNotificationManagerProxy::APIType);
}
-void WKNotificationManagerSetProvider(WKNotificationManagerRef managerRef, const WKNotificationProvider* wkProvider)
+void WKNotificationManagerSetProvider(WKNotificationManagerRef managerRef, const WKNotificationProviderBase* wkProvider)
{
- toImpl(managerRef)->initializeProvider(reinterpret_cast<const WKNotificationProviderBase*>(wkProvider));
+ toImpl(managerRef)->initializeProvider(wkProvider);
}
void WKNotificationManagerProviderDidShowNotification(WKNotificationManagerRef managerRef, uint64_t notificationID)
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKNotificationManager.h (160035 => 160036)
--- trunk/Source/WebKit2/UIProcess/API/C/WKNotificationManager.h 2013-12-03 21:50:43 UTC (rev 160035)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKNotificationManager.h 2013-12-03 21:53:21 UTC (rev 160036)
@@ -34,7 +34,7 @@
#endif
WK_EXPORT WKTypeID WKNotificationManagerGetTypeID();
-WK_EXPORT void WKNotificationManagerSetProvider(WKNotificationManagerRef managerRef, const WKNotificationProvider* wkProvider);
+WK_EXPORT void WKNotificationManagerSetProvider(WKNotificationManagerRef managerRef, const WKNotificationProviderBase* wkProvider);
WK_EXPORT void WKNotificationManagerProviderDidShowNotification(WKNotificationManagerRef managerRef, uint64_t notificationID);
WK_EXPORT void WKNotificationManagerProviderDidClickNotification(WKNotificationManagerRef managerRef, uint64_t notificationID);
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKNotificationProvider.h (160035 => 160036)
--- trunk/Source/WebKit2/UIProcess/API/C/WKNotificationProvider.h 2013-12-03 21:50:43 UTC (rev 160035)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKNotificationProvider.h 2013-12-03 21:53:21 UTC (rev 160036)
@@ -58,8 +58,7 @@
WKNotificationProviderClearNotificationsCallback clearNotifications;
} WKNotificationProviderV0;
-// FIXME: Deprecate.
-enum { kWKNotificationProviderCurrentVersion = 0 };
+enum { kWKNotificationProviderCurrentVersion WK_ENUM_DEPRECATED("Use an explicit version number instead") = 0, };
typedef struct WKNotificationProvider {
int version;
const void* clientInfo;
@@ -72,7 +71,7 @@
WKNotificationProviderRemoveNotificationManagerCallback removeNotificationManager;
WKNotificationProviderNotificationPermissionsCallback notificationPermissions;
WKNotificationProviderClearNotificationsCallback clearNotifications;
-} WKNotificationProvider;
+} WKNotificationProvider WK_DEPRECATED("Use an explicit versioned struct instead");
#ifdef __cplusplus
}
Modified: trunk/Tools/ChangeLog (160035 => 160036)
--- trunk/Tools/ChangeLog 2013-12-03 21:50:43 UTC (rev 160035)
+++ trunk/Tools/ChangeLog 2013-12-03 21:53:21 UTC (rev 160036)
@@ -1,3 +1,18 @@
+2013-12-03 Anders Carlsson <[email protected]>
+
+ Deprecate WKNotificationProvider
+ https://bugs.webkit.org/show_bug.cgi?id=125178
+
+ Reviewed by Sam Weinig.
+
+ Update for WebKit2 changes.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::initialize):
+ * WebKitTestRunner/WebNotificationProvider.cpp:
+ (WTR::WebNotificationProvider::provider):
+ * WebKitTestRunner/WebNotificationProvider.h:
+
2013-12-03 Brent Fulgham <[email protected]>
[Win] Support 64-bit Application Support Libraries Location
Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (160035 => 160036)
--- trunk/Tools/WebKitTestRunner/TestController.cpp 2013-12-03 21:50:43 UTC (rev 160035)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp 2013-12-03 21:53:21 UTC (rev 160036)
@@ -376,8 +376,8 @@
WKContextSetInjectedBundleClient(m_context.get(), &injectedBundleClient);
WKNotificationManagerRef notificationManager = WKContextGetNotificationManager(m_context.get());
- WKNotificationProvider notificationKit = m_webNotificationProvider.provider();
- WKNotificationManagerSetProvider(notificationManager, ¬ificationKit);
+ WKNotificationProviderV0 notificationKit = m_webNotificationProvider.provider();
+ WKNotificationManagerSetProvider(notificationManager, ¬ificationKit.base);
if (testPluginDirectory())
WKContextSetAdditionalPluginsDirectory(m_context.get(), testPluginDirectory());
Modified: trunk/Tools/WebKitTestRunner/WebNotificationProvider.cpp (160035 => 160036)
--- trunk/Tools/WebKitTestRunner/WebNotificationProvider.cpp 2013-12-03 21:50:43 UTC (rev 160035)
+++ trunk/Tools/WebKitTestRunner/WebNotificationProvider.cpp 2013-12-03 21:53:21 UTC (rev 160036)
@@ -68,11 +68,10 @@
WKNotificationManagerSetProvider(m_notificationManager.get(), 0);
}
-WKNotificationProvider WebNotificationProvider::provider()
+WKNotificationProviderV0 WebNotificationProvider::provider()
{
- WKNotificationProvider notificationProvider = {
- kWKNotificationProviderCurrentVersion,
- this,
+ WKNotificationProviderV0 notificationProvider = {
+ { kWKNotificationProviderCurrentVersion, this },
WTR::showWebNotification,
WTR::closeWebNotification,
0, // didDestroyNotification
Modified: trunk/Tools/WebKitTestRunner/WebNotificationProvider.h (160035 => 160036)
--- trunk/Tools/WebKitTestRunner/WebNotificationProvider.h 2013-12-03 21:50:43 UTC (rev 160035)
+++ trunk/Tools/WebKitTestRunner/WebNotificationProvider.h 2013-12-03 21:53:21 UTC (rev 160036)
@@ -37,7 +37,7 @@
public:
WebNotificationProvider();
~WebNotificationProvider();
- WKNotificationProvider provider();
+ WKNotificationProviderV0 provider();
void showWebNotification(WKPageRef, WKNotificationRef);
void closeWebNotification(WKNotificationRef);