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: Rest 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 to be exported. * WebCore.exp.in: Source/WebKit2: Rest 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. This patch adds the communication from the WebProcess <-> UIProcess about starting/stopping listening for cookies changing, and adds a mechanism for the WebProcess to notify the UIProcess when the cookies have changed. The WebProcess sends a message to the UIProcess when the cookies change, and the UIProcess passes this along to the WebCookieManagerProxyClient. * UIProcess/API/C/WKCookieManager.cpp: (WKCookieManagerSetClient): Call through to WebCookieManagerProxy. (WKCookieManagerStartObservingCookieChanges): Ditto. (WKCookieManagerStopObservingCookieChanges): Ditto. * UIProcess/API/C/WKCookieManager.h: Add new functions and a WKCookieManagerClient which is responsible for cookiesDidChange. * UIProcess/WebCookieManagerProxy.cpp: (WebKit::WebCookieManagerProxy::initializeClient): (WebKit::WebCookieManagerProxy::startObservingCookieChanges): Send the message down to the web process. (WebKit::WebCookieManagerProxy::stopObservingCookieChanges): Ditto. (WebKit::WebCookieManagerProxy::cookiesDidChange): Tell the WKCookieManagerClient the cookies were modified. * UIProcess/WebCookieManagerProxy.h: * UIProcess/WebCookieManagerProxy.messages.in: Add new messages. * UIProcess/WebCookieManagerProxyClient.cpp: Added. (WebKit::WebCookieManagerProxyClient::cookiesDidChange): Calls through to the client saying that cookies changed. * UIProcess/WebCookieManagerProxyClient.h: Added. * WebProcess/Cookies/WebCookieManager.cpp: (WebKit::WebCookieManager::startObservingCookieChanges): Call through to WebCore::startObservingCookieChanges (on platforms that support it). (WebKit::WebCookieManager::stopObservingCookieChanges): Ditto (for stopObservingCookieChanges). (WebKit::WebCookieManager::dispatchDidModifyCookies): Send a message to the UI process that cookies changed. * WebProcess/Cookies/WebCookieManager.h: * WebProcess/Cookies/WebCookieManager.messages.in: Add new files. * WebKit2.pro: * WebKit2.xcodeproj/project.pbxproj: * GNUmakefile.am: * win/WebKit2.vcproj: Canonical link: https://commits.webkit.org/70158@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@80263 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Brian Weinstein
committed
Mar 3, 2011
1 parent
2d60e04
commit d846022ae7cdab85aa4fc7eadde7071fd8b7ae20
Showing
18 changed files
with
262 additions
and
4 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
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
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
@@ -22,4 +22,6 @@ | ||
|
||
messages -> WebCookieManagerProxy { | ||
DidGetHostnamesWithCookies(Vector<WTF::String> hostnames, uint64_t callbackID); | ||
|
||
CookiesDidChange() | ||
} |
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,41 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
#include "config.h" | ||
#include "WebCookieManagerProxyClient.h" | ||
|
||
#include "WKAPICast.h" | ||
|
||
namespace WebKit { | ||
|
||
void WebCookieManagerProxyClient::cookiesDidChange(WebCookieManagerProxy* cookieManager) | ||
{ | ||
if (!m_client.cookiesDidChange) | ||
return; | ||
|
||
m_client.cookiesDidChange(toAPI(cookieManager), m_client.clientInfo); | ||
} | ||
|
||
} // namespace WebKit |
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,44 @@ | ||
/* | ||
* 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 WebCookieManagerProxyClient_h | ||
#define WebCookieManagerProxyClient_h | ||
|
||
#include "APIClient.h" | ||
#include "WKCookieManager.h" | ||
#include <wtf/Forward.h> | ||
|
||
namespace WebKit { | ||
|
||
class WebCookieManagerProxy; | ||
|
||
class WebCookieManagerProxyClient : public APIClient<WKCookieManagerClient> { | ||
public: | ||
void cookiesDidChange(WebCookieManagerProxy*); | ||
}; | ||
|
||
} // namespace WebKit | ||
|
||
#endif // WebCookieManagerProxyClient_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
Oops, something went wrong.