Changeset 160036 in webkit


Ignore:
Timestamp:
Dec 3, 2013 1:53:21 PM (10 years ago)
Author:
andersca@apple.com
Message:

Deprecate WKNotificationProvider
https://bugs.webkit.org/show_bug.cgi?id=125178

Reviewed by Sam Weinig.

Source/WebKit2:

  • 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.

Tools:

Update for WebKit2 changes.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::initialize):

  • WebKitTestRunner/WebNotificationProvider.cpp:

(WTR::WebNotificationProvider::provider):

  • WebKitTestRunner/WebNotificationProvider.h:
Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r160033 r160036  
     12013-12-03  Anders Carlsson  <andersca@apple.com>
     2
     3        Deprecate WKNotificationProvider
     4        https://bugs.webkit.org/show_bug.cgi?id=125178
     5
     6        Reviewed by Sam Weinig.
     7
     8        * Shared/API/c/WKDeclarationSpecifiers.h:
     9        Add WK_DEPRECATED and WK_ENUM_DEPRECATED macros so we can things as deprecated.
     10
     11        * UIProcess/API/C/WKNotificationManager.cpp:
     12        (WKNotificationManagerSetProvider):
     13        * UIProcess/API/C/WKNotificationManager.h:
     14        WKNotificationManagerSetProvider now takes a WKNotificationProviderBase.
     15
     16        * UIProcess/API/C/WKNotificationProvider.h:
     17        Deprecate WKNotificationProvider and kWKNotificationProviderCurrentVersion.
     18
    1192013-12-03  Brady Eidson  <beidson@apple.com>
    220
  • trunk/Source/WebKit2/Shared/API/c/WKDeclarationSpecifiers.h

    r157643 r160036  
    4747#endif /* !defined(WK_INLINE) */
    4848
     49#if defined(__has_extension) && __has_extension(enumerator_attributes) && __has_extension(attribute_unavailable_with_message)
     50#define WK_DEPRECATED(message) __attribute__((deprecated(message)))
     51#else
     52#define WK_DEPRECATED(message)
     53#endif
     54
     55#if defined(__has_extension) && __has_extension(enumerator_attributes) && __has_extension(attribute_unavailable_with_message)
     56#define WK_ENUM_DEPRECATED(message) __attribute__((deprecated(message)))
     57#else
     58#define WK_ENUM_DEPRECATED(message)
     59#endif
     60
    4961#endif /* WKDeclarationSpecifiers_h */
  • trunk/Source/WebKit2/UIProcess/API/C/WKNotificationManager.cpp

    r159988 r160036  
    3737}
    3838
    39 void WKNotificationManagerSetProvider(WKNotificationManagerRef managerRef, const WKNotificationProvider* wkProvider)
     39void WKNotificationManagerSetProvider(WKNotificationManagerRef managerRef, const WKNotificationProviderBase* wkProvider)
    4040{
    41     toImpl(managerRef)->initializeProvider(reinterpret_cast<const WKNotificationProviderBase*>(wkProvider));
     41    toImpl(managerRef)->initializeProvider(wkProvider);
    4242}
    4343
  • trunk/Source/WebKit2/UIProcess/API/C/WKNotificationManager.h

    r105364 r160036  
    3535
    3636WK_EXPORT WKTypeID WKNotificationManagerGetTypeID();
    37 WK_EXPORT void WKNotificationManagerSetProvider(WKNotificationManagerRef managerRef, const WKNotificationProvider* wkProvider);
     37WK_EXPORT void WKNotificationManagerSetProvider(WKNotificationManagerRef managerRef, const WKNotificationProviderBase* wkProvider);
    3838
    3939WK_EXPORT void WKNotificationManagerProviderDidShowNotification(WKNotificationManagerRef managerRef, uint64_t notificationID);
  • trunk/Source/WebKit2/UIProcess/API/C/WKNotificationProvider.h

    r159981 r160036  
    5959} WKNotificationProviderV0;
    6060
    61 // FIXME: Deprecate.
    62 enum { kWKNotificationProviderCurrentVersion = 0 };
     61enum { kWKNotificationProviderCurrentVersion WK_ENUM_DEPRECATED("Use an explicit version number instead") = 0, };
    6362typedef struct WKNotificationProvider {
    6463    int                                                                   version;
     
    7372    WKNotificationProviderNotificationPermissionsCallback                 notificationPermissions;
    7473    WKNotificationProviderClearNotificationsCallback                      clearNotifications;
    75 } WKNotificationProvider;
     74} WKNotificationProvider WK_DEPRECATED("Use an explicit versioned struct instead");
    7675
    7776#ifdef __cplusplus
  • trunk/Tools/ChangeLog

    r160035 r160036  
     12013-12-03  Anders Carlsson  <andersca@apple.com>
     2
     3        Deprecate WKNotificationProvider
     4        https://bugs.webkit.org/show_bug.cgi?id=125178
     5
     6        Reviewed by Sam Weinig.
     7
     8        Update for WebKit2 changes.
     9
     10        * WebKitTestRunner/TestController.cpp:
     11        (WTR::TestController::initialize):
     12        * WebKitTestRunner/WebNotificationProvider.cpp:
     13        (WTR::WebNotificationProvider::provider):
     14        * WebKitTestRunner/WebNotificationProvider.h:
     15
    1162013-12-03  Brent Fulgham  <bfulgham@apple.com>
    217
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r159387 r160036  
    377377
    378378    WKNotificationManagerRef notificationManager = WKContextGetNotificationManager(m_context.get());
    379     WKNotificationProvider notificationKit = m_webNotificationProvider.provider();
    380     WKNotificationManagerSetProvider(notificationManager, &notificationKit);
     379    WKNotificationProviderV0 notificationKit = m_webNotificationProvider.provider();
     380    WKNotificationManagerSetProvider(notificationManager, &notificationKit.base);
    381381
    382382    if (testPluginDirectory())
  • trunk/Tools/WebKitTestRunner/WebNotificationProvider.cpp

    r150474 r160036  
    6969}
    7070
    71 WKNotificationProvider WebNotificationProvider::provider()
     71WKNotificationProviderV0 WebNotificationProvider::provider()
    7272{
    73     WKNotificationProvider notificationProvider = {
    74         kWKNotificationProviderCurrentVersion,
    75         this,
     73    WKNotificationProviderV0 notificationProvider = {
     74        { kWKNotificationProviderCurrentVersion, this },
    7675        WTR::showWebNotification,
    7776        WTR::closeWebNotification,
  • trunk/Tools/WebKitTestRunner/WebNotificationProvider.h

    r150474 r160036  
    3838    WebNotificationProvider();
    3939    ~WebNotificationProvider();
    40     WKNotificationProvider provider();
     40    WKNotificationProviderV0 provider();
    4141
    4242    void showWebNotification(WKPageRef, WKNotificationRef);
Note: See TracChangeset for help on using the changeset viewer.