Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Source/WebCore: 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 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: Canonical link: https://commits.webkit.org/70040@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@80145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Brian Weinstein
committed
Mar 2, 2011
1 parent
398d095
commit 9d675cd89d5be2b70a593fe001574d946bb2c089
Showing
22 changed files
with
359 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -25449,6 +25449,10 @@ | ||
RelativePath="..\platform\CookieJar.h" | ||
> | ||
</File> | ||
<File | ||
RelativePath="..\platform\CookiesStrategy.h" | ||
> | ||
</File> | ||
<File | ||
RelativePath="..\platform\CrossThreadCopier.cpp" | ||
> | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright (C) 2011 Apple Inc. All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions | ||
* are met: | ||
* 1. Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* 2. Redistributions in binary form must reproduce the above copyright | ||
* notice, this list of conditions and the following disclaimer in the | ||
* documentation and/or other materials provided with the distribution. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' | ||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS | ||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF | ||
* THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
#ifndef CookiesStrategy_h | ||
#define CookiesStrategy_h | ||
|
||
#if USE(PLATFORM_STRATEGIES) | ||
|
||
namespace WebCore { | ||
|
||
class CookiesStrategy { | ||
public: | ||
virtual void notifyCookiesChanged() = 0; | ||
|
||
protected: | ||
virtual ~CookiesStrategy() { } | ||
}; | ||
|
||
} // namespace WebCore | ||
|
||
#endif // USE(PLATFORM_STRATEGIES) | ||
|
||
#endif // CookiesStrategy_h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -29,6 +29,8 @@ | ||
namespace WebCore { | ||
|
||
void setCookieStoragePrivateBrowsingEnabled(bool); | ||
void startObservingCookieChanges(); | ||
void stopObservingCookieChanges(); | ||
|
||
} | ||
|
||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.