-
bweinstein@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=55427 <rdar://problem/9056027> Reviewed by Adam Roben. Add functions on CookieStorage that allow listening for changes in cookies. When the cookies are changed, they call through to CookiesStrategy::notifyCookiesChanged. No change in behavior requiring tests. * platform/CookiesStrategy.h: Added. (WebCore::CookiesStrategy::~CookiesStrategy): * platform/PlatformStrategies.h: (WebCore::PlatformStrategies::cookiesStrategy): (WebCore::PlatformStrategies::PlatformStrategies): * platform/network/CookieStorage.h: Add new function declarations. * platform/network/cf/CookieStorageCFNet.cpp: (WebCore::notifyCookiesChangedOnMainThread): Call through to CookiesStrategy::notifyCookiesChanged. (WebCore::notifyCookiesChanged): Call notifyCookiesChangedOnMainThread on the main thread. (WebCore::beginObservingCookieChanges): Set up cookie observers on the loader run loop. (WebCore::finishObservingCookieChanges): Remove our cookie observers from the loader run loop. * platform/network/mac/CookieStorageMac.mm: (-[CookieStorageObjCAdapter notifyCookiesChangedOnMainThread]): Call through to CookiesStrategy::notifyCookiesChanged. (-[CookieStorageObjCAdapter cookiesChangedNotificationHandler:]): Call notifyCookiesChangedOnMainThread on the main thread. (-[CookieStorageObjCAdapter registerForCookieChangeNotifications]): Set up the observer for cookie change notifications. (-[CookieStorageObjCAdapter unregisterForCookieChangeNotifications]): Remove the observer for cookie change notifications. (WebCore::beginObservingCookieChanges): Create our CookieStorageObjCAdapter, and call registerForCookieChangeNotifications. (WebCore::finishObservingCookieChanges): Call unregisterForCookieChangeNotifications. Add new file. * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: Set role on files we need to include in WebKit to private. Source/WebKit/mac: Part of WebKit2: Need a way to send notifications to client when cookies change https://bugs.webkit.org/show_bug.cgi?id=55427 <rdar://problem/9056027> Reviewed by Adam Roben. Add stubs for CookiesStrategy on Mac WebKit1. * WebCoreSupport/WebPlatformStrategies.h: * WebCoreSupport/WebPlatformStrategies.mm: (WebPlatformStrategies::createCookiesStrategy): (WebPlatformStrategies::notifyCookiesChanged): Source/WebKit/qt: Part of WebKit2: Need a way to send notifications to client when cookies change https://bugs.webkit.org/show_bug.cgi?id=55427 <rdar://problem/9056027> Reviewed by Adam Roben. Add stubs for CookiesStrategy on Qt WebKit1. * WebCoreSupport/WebPlatformStrategies.cpp: (WebPlatformStrategies::createCookiesStrategy): (WebPlatformStrategies::notifyCookiesChanged): * WebCoreSupport/WebPlatformStrategies.h: Source/WebKit/win: Part of WebKit2: Need a way to send notifications to client when cookies change https://bugs.webkit.org/show_bug.cgi?id=55427 <rdar://problem/9056027> Reviewed by Adam Roben. Add stubs for CookiesStrategy on Windows WebKit1. * WebCoreSupport/WebPlatformStrategies.cpp: (WebPlatformStrategies::createCookiesStrategy): (WebPlatformStrategies::notifyCookiesChanged): * WebCoreSupport/WebPlatformStrategies.h: Source/WebKit2: Part of WebKit2: Need a way to send notifications to client when cookies change https://bugs.webkit.org/show_bug.cgi?id=55427 <rdar://problem/9056027> Reviewed by Adam Roben. * WebProcess/Cookies/WebCookieManager.cpp: (WebKit::WebCookieManager::dispatchDidModifyCookies): Add a stub with a FIXME to send a message to the UI process. * WebProcess/Cookies/WebCookieManager.h: * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::createCookiesStrategy): (WebKit::WebPlatformStrategies::notifyCookiesChanged): Call WebCookieManager::dispatchDidModifyCookies. * WebProcess/WebCoreSupport/WebPlatformStrategies.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
a95f4c4d