Part of WebKit2: Need a way to manage cookies from the web process
authorbweinstein@apple.com <bweinstein@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Feb 2011 18:02:44 +0000 (18:02 +0000)
committerbweinstein@apple.com <bweinstein@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Feb 2011 18:02:44 +0000 (18:02 +0000)
https://bugs.webkit.org/show_bug.cgi?id=55086

Reviewed by Adam Roben and looked over by Jessie Berlin.

This patch adds the plumbing and classes that are needed to manage cookies from the web process.
The functions that the API calls are currently stubs, but will be implemented in a follow-up patch.

Project file changes.
* DerivedSources.make:
* DerivedSources.pro:
* GNUmakefile.am:
* WebKit2.pri:
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
* win/WebKit2Common.vsprops:
* win/WebKit2Generated.make:

Add some needed plumbing for WebCookieManager{Proxy}.
* Platform/CoreIPC/MessageID.h:
* Shared/API/c/WKBase.h:
* Shared/APIObject.h:
* UIProcess/API/C/WKAPICast.h:

* UIProcess/API/C/WKContext.cpp:
(WKContextGetCookieManager): Gets the cookie manager proxy.
* UIProcess/API/C/WKContext.h:
* UIProcess/API/C/WKCookieManager.cpp: Added.
(WKCookieManagerGetTypeID):
(WKCookieManagerGetHostnamesWithCookies): Calls through to WebCookieManagerProxy.
(WKCookieManagerDeleteCookiesForHostname): Ditto.
(WKCookieManagerDeleteAllCookies): Ditto.
* UIProcess/API/C/WKCookieManager.h: Added.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didReceiveMessage): Add a case for the cookie manager.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext): Initialize the cookie manager.
(WebKit::WebContext::~WebContext): Invalidate the cookie manager.
(WebKit::WebContext::disconnectProcess): Ditto.
(WebKit::WebContext::didReceiveMessage): Add a case for the cookie manager.
* UIProcess/WebContext.h:
(WebKit::WebContext::cookieManagerProxy): Returns the cookie manager.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didReceiveMessage): Add a case for the cookie manager.

* UIProcess/WebCookieManagerProxy.cpp: Added.
(WebKit::WebCookieManagerProxy::create):
(WebKit::WebCookieManagerProxy::WebCookieManagerProxy):
(WebKit::WebCookieManagerProxy::~WebCookieManagerProxy):
(WebKit::WebCookieManagerProxy::invalidate):
(WebKit::WebCookieManagerProxy::didReceiveMessage):
(WebKit::WebCookieManagerProxy::getHostnamesWithCookies): Call through to the web process to get hostnames with cookies.
(WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies): Call the callback we were passed in getHostnamesWithCookies.
(WebKit::WebCookieManagerProxy::deleteCookiesForHostname): Call through to the web process to delete cookies
    for the origin.
(WebKit::WebCookieManagerProxy::deleteAllCookies): Call through to the web process to delete all cookies.
* UIProcess/WebCookieManagerProxy.h: Added.
(WebKit::WebCookieManagerProxy::clearContext):
(WebKit::WebCookieManagerProxy::type):
* UIProcess/WebCookieManagerProxy.messages.in: Added.

* WebProcess/Cookies: Added.
* WebProcess/Cookies/WebCookieManager.cpp: Added.
(WebKit::WebCookieManager::shared):
(WebKit::WebCookieManager::WebCookieManager):
(WebKit::WebCookieManager::didReceiveMessage): Call through to didReceiveWebCookieManagerMessage.
(WebKit::WebCookieManager::getHostnamesWithCookies): Build an array from a HashSet (that isn't filled yet), and
    convert that HashSet to a Vector to send to the UI process.
(WebKit::WebCookieManager::deleteCookiesForHostname): Added a stub.
(WebKit::WebCookieManager::deleteAllCookies): Ditto.
* WebProcess/Cookies/WebCookieManager.h: Added.
* WebProcess/Cookies/WebCookieManager.messages.in: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@79585 268f45cc-cd09-0410-ab3c-d52691b4dbfc

28 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/DerivedSources.make
Source/WebKit2/DerivedSources.pro
Source/WebKit2/GNUmakefile.am
Source/WebKit2/Platform/CoreIPC/MessageID.h
Source/WebKit2/Shared/API/c/WKBase.h
Source/WebKit2/Shared/APIObject.h
Source/WebKit2/UIProcess/API/C/WKAPICast.h
Source/WebKit2/UIProcess/API/C/WKContext.cpp
Source/WebKit2/UIProcess/API/C/WKContext.h
Source/WebKit2/UIProcess/API/C/WKCookieManager.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/API/C/WKCookieManager.h [new file with mode: 0644]
Source/WebKit2/UIProcess/WebContext.cpp
Source/WebKit2/UIProcess/WebContext.h
Source/WebKit2/UIProcess/WebCookieManagerProxy.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/WebCookieManagerProxy.h [new file with mode: 0644]
Source/WebKit2/UIProcess/WebCookieManagerProxy.messages.in [new file with mode: 0644]
Source/WebKit2/UIProcess/WebProcessProxy.cpp
Source/WebKit2/WebKit2.pri
Source/WebKit2/WebKit2.pro
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/Cookies/WebCookieManager.cpp [new file with mode: 0644]
Source/WebKit2/WebProcess/Cookies/WebCookieManager.h [new file with mode: 0644]
Source/WebKit2/WebProcess/Cookies/WebCookieManager.messages.in [new file with mode: 0644]
Source/WebKit2/WebProcess/WebProcess.cpp
Source/WebKit2/win/WebKit2.vcproj
Source/WebKit2/win/WebKit2Common.vsprops
Source/WebKit2/win/WebKit2Generated.make

index 22676ee..41e91e3 100644 (file)
@@ -1,3 +1,80 @@
+2011-02-23  Brian Weinstein  <bweinstein@apple.com>
+
+        Reviewed by Adam Roben and looked over by Jessie Berlin.
+
+        Part of WebKit2: Need a way to manage cookies from the web process
+        https://bugs.webkit.org/show_bug.cgi?id=55086
+        
+        This patch adds the plumbing and classes that are needed to manage cookies from the web process.
+        The functions that the API calls are currently stubs, but will be implemented in a follow-up patch.
+
+        Project file changes.
+        * DerivedSources.make:
+        * DerivedSources.pro:
+        * GNUmakefile.am:
+        * WebKit2.pri:
+        * WebKit2.pro:
+        * WebKit2.xcodeproj/project.pbxproj:
+        * win/WebKit2.vcproj:
+        * win/WebKit2Common.vsprops:
+        * win/WebKit2Generated.make:
+
+        Add some needed plumbing for WebCookieManager{Proxy}.
+        * Platform/CoreIPC/MessageID.h:
+        * Shared/API/c/WKBase.h:
+        * Shared/APIObject.h:
+        * UIProcess/API/C/WKAPICast.h:
+
+        * UIProcess/API/C/WKContext.cpp:
+        (WKContextGetCookieManager): Gets the cookie manager proxy.
+        * UIProcess/API/C/WKContext.h:
+        * UIProcess/API/C/WKCookieManager.cpp: Added.
+        (WKCookieManagerGetTypeID):
+        (WKCookieManagerGetHostnamesWithCookies): Calls through to WebCookieManagerProxy.
+        (WKCookieManagerDeleteCookiesForHostname): Ditto.
+        (WKCookieManagerDeleteAllCookies): Ditto.
+        * UIProcess/API/C/WKCookieManager.h: Added.
+
+        * UIProcess/WebProcessProxy.cpp:
+        (WebKit::WebProcessProxy::didReceiveMessage): Add a case for the cookie manager.
+        * UIProcess/WebContext.cpp:
+        (WebKit::WebContext::WebContext): Initialize the cookie manager.
+        (WebKit::WebContext::~WebContext): Invalidate the cookie manager.
+        (WebKit::WebContext::disconnectProcess): Ditto.
+        (WebKit::WebContext::didReceiveMessage): Add a case for the cookie manager.
+        * UIProcess/WebContext.h:
+        (WebKit::WebContext::cookieManagerProxy): Returns the cookie manager.
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::didReceiveMessage): Add a case for the cookie manager.
+
+        * UIProcess/WebCookieManagerProxy.cpp: Added.
+        (WebKit::WebCookieManagerProxy::create):
+        (WebKit::WebCookieManagerProxy::WebCookieManagerProxy):
+        (WebKit::WebCookieManagerProxy::~WebCookieManagerProxy):
+        (WebKit::WebCookieManagerProxy::invalidate):
+        (WebKit::WebCookieManagerProxy::didReceiveMessage): 
+        (WebKit::WebCookieManagerProxy::getHostnamesWithCookies): Call through to the web process to get hostnames with cookies.
+        (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies): Call the callback we were passed in getHostnamesWithCookies.
+        (WebKit::WebCookieManagerProxy::deleteCookiesForHostname): Call through to the web process to delete cookies
+            for the origin.
+        (WebKit::WebCookieManagerProxy::deleteAllCookies): Call through to the web process to delete all cookies.
+        * UIProcess/WebCookieManagerProxy.h: Added.
+        (WebKit::WebCookieManagerProxy::clearContext):
+        (WebKit::WebCookieManagerProxy::type):
+        * UIProcess/WebCookieManagerProxy.messages.in: Added.
+
+        * WebProcess/Cookies: Added.
+        * WebProcess/Cookies/WebCookieManager.cpp: Added.
+        (WebKit::WebCookieManager::shared):
+        (WebKit::WebCookieManager::WebCookieManager):
+        (WebKit::WebCookieManager::didReceiveMessage): Call through to didReceiveWebCookieManagerMessage.
+        (WebKit::WebCookieManager::getHostnamesWithCookies): Build an array from a HashSet (that isn't filled yet), and 
+            convert that HashSet to a Vector to send to the UI process.
+        (WebKit::WebCookieManager::deleteCookiesForHostname): Added a stub.
+        (WebKit::WebCookieManager::deleteAllCookies): Ditto.
+        * WebProcess/Cookies/WebCookieManager.h: Added.
+        * WebProcess/Cookies/WebCookieManager.messages.in: Added.
+
 2011-02-24   Amruth Raj  <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com> and Alejandro G. Castro  <alex@igalia.com>
 
         Reviewed by Martin Robinson.
index 1fff1bd..d9b8b32 100644 (file)
@@ -25,6 +25,7 @@ VPATH = \
     $(WebKit2)/Shared/Plugins \
     $(WebKit2)/WebProcess/ApplicationCache \
     $(WebKit2)/WebProcess/Authentication \
+    $(WebKit2)/WebProcess/Cookies \
     $(WebKit2)/WebProcess/Geolocation \
     $(WebKit2)/WebProcess/Plugins \
     $(WebKit2)/WebProcess/ResourceCache \
@@ -48,6 +49,8 @@ MESSAGE_RECEIVERS = \
     PluginProxy \
     WebApplicationCacheManager \
     WebApplicationCacheManagerProxy \
+    WebCookieManager \
+    WebCookieManagerProxy \
     WebContext \
     WebDatabaseManager \
     WebDatabaseManagerProxy \
index b05f4e0..184ec81 100644 (file)
@@ -77,6 +77,7 @@ VPATH = \
     PluginProcess \
     WebProcess/ApplicationCache \
     WebProcess/Authentication \
+    WebProcess/Cookies \
     WebProcess/Geolocation \
     WebProcess/Plugins \
     WebProcess/ResourceCache \
@@ -95,6 +96,8 @@ MESSAGE_RECEIVERS = \
     PluginProcessProxy.messages.in \
     PluginProxy.messages.in \
     WebContext.messages.in \
+    WebCookieManager.messages.in \
+    WebCookieManagerProxy.messages.in \
     WebDatabaseManager.messages.in \
     WebDatabaseManagerProxy.messages.in \
     WebGeolocationManager.messages.in \
index 6c9610d..5e71965 100644 (file)
@@ -45,6 +45,7 @@ libWebKit2_la_HEADERS = \
        $(WebKit2)/UIProcess/API/C/WKBackForwardListItem.h \
        $(WebKit2)/UIProcess/API/C/WKContext.h \
        $(WebKit2)/UIProcess/API/C/WKContextPrivate.h \
+       $(WebKit2)/UIProcess/API/C/WKCookieManager.h \
        $(WebKit2)/UIProcess/API/C/WKCredential.h \
        $(WebKit2)/UIProcess/API/C/WKCredentialTypes.h \
        $(WebKit2)/UIProcess/API/C/WKDatabaseManager.h \
@@ -301,6 +302,8 @@ libWebKit2_la_SOURCES = \
        Source/WebKit2/UIProcess/API/C/WKContext.cpp \
        Source/WebKit2/UIProcess/API/C/WKContext.h \
        Source/WebKit2/UIProcess/API/C/WKContextPrivate.h \
+       Source/WebKit2/UIProcess/API/C/WKCookieManager.h \
+       Source/WebKit2/UIProcess/API/C/WKCookieManager.cpp \
        Source/WebKit2/UIProcess/API/C/WKCredential.cpp \
        Source/WebKit2/UIProcess/API/C/WKCredential.h \
        Source/WebKit2/UIProcess/API/C/WKCredentialTypes.h \
@@ -403,6 +406,8 @@ libWebKit2_la_SOURCES = \
        Source/WebKit2/UIProcess/WebContextMenuProxy.cpp \
        Source/WebKit2/UIProcess/WebContextMenuProxy.h \
        Source/WebKit2/UIProcess/WebContextUserMessageCoders.h \
+       Source/WebKit2/UIProcess/WebCookieManagerProxy.h \
+       Source/WebKit2/UIProcess/WebCookieManagerProxy.cpp \
        Source/WebKit2/UIProcess/WebDatabaseManagerProxyClient.cpp \
        Source/WebKit2/UIProcess/WebDatabaseManagerProxyClient.h \
        Source/WebKit2/UIProcess/WebDatabaseManagerProxy.cpp \
@@ -460,6 +465,8 @@ libWebKit2_la_SOURCES = \
        Source/WebKit2/WebProcess/ApplicationCache/WebApplicationCacheManager.cpp \
        Source/WebKit2/WebProcess/Authentication/AuthenticationManager.cpp \
        Source/WebKit2/WebProcess/Authentication/AuthenticationManager.h \
+       Source/WebKit2/WebProcess/Cookies/WebCookieManager.h \
+       Source/WebKit2/WebProcess/Cookies/WebCookieManager.cpp \
        Source/WebKit2/WebProcess/Downloads/curl/DownloadCurl.cpp \
        Source/WebKit2/WebProcess/Downloads/Download.cpp \
        Source/WebKit2/WebProcess/Downloads/Download.h \
@@ -664,6 +671,7 @@ libWebKit2_la_CPPFLAGS = \
        -I$(srcdir)/Source/WebKit2/WebProcess \
        -I$(srcdir)/Source/WebKit2/WebProcess/ApplicationCache \
        -I$(srcdir)/Source/WebKit2/WebProcess/Authentication \
+       -I$(srcdir)/Source/WebKit2/WebProcess/Cookies \
        -I$(srcdir)/Source/WebKit2/WebProcess/Downloads \
        -I$(srcdir)/Source/WebKit2/WebProcess/Geolocation \
        -I$(srcdir)/Source/WebKit2/WebProcess/gtk \
@@ -819,6 +827,10 @@ webkit2_built_sources += \
        DerivedSources/WebKit2/WebApplicationCacheManagerProxyMessages.h \
        DerivedSources/WebKit2/WebContextMessageReceiver.cpp \
        DerivedSources/WebKit2/WebContextMessages.h \
+       DerivedSources/WebKit2/WebCookieManagerMessageReceiver.cpp \
+       DerivedSources/WebKit2/WebCookieManagerMessages.h \
+       DerivedSources/WebKit2/WebCookieManagerProxyMessageReceiver.cpp \
+       DerivedSources/WebKit2/WebCookieManagerProxyMessages.h \
        DerivedSources/WebKit2/WebDatabaseManagerMessageReceiver.cpp \
        DerivedSources/WebKit2/WebDatabaseManagerMessages.h \
        DerivedSources/WebKit2/WebDatabaseManagerProxyMessageReceiver.cpp \
@@ -867,6 +879,7 @@ vpath %.messages.in = \
        $(WebKit2)/WebProcess \
        $(WebKit2)/WebProcess/ApplicationCache \
        $(WebKit2)/WebProcess/Authentication \
+       $(WebKit2)/WebProcess/Cookies \
        $(WebKit2)/WebProcess/Geolocation \
        $(WebKit2)/WebProcess/Plugins \
        $(WebKit2)/WebProcess/ResourceCache \
index fe76e14..ed38639 100644 (file)
@@ -40,6 +40,7 @@ enum MessageClass {
     MessageClassDrawingAreaLegacy,
     MessageClassInjectedBundle,
     MessageClassWebApplicationCacheManager,
+    MessageClassWebCookieManager,
     MessageClassWebDatabaseManager,
     MessageClassWebGeolocationManagerProxy,
     MessageClassWebInspector,
@@ -54,6 +55,7 @@ enum MessageClass {
     MessageClassWebApplicationCacheManagerProxy,
     MessageClassWebContext,
     MessageClassWebContextLegacy,
+    MessageClassWebCookieManagerProxy,
     MessageClassWebDatabaseManagerProxy,
     MessageClassWebGeolocationManager,
     MessageClassWebInspectorProxy,
index eebeec1..42f6955 100644 (file)
@@ -74,6 +74,7 @@ typedef const struct OpaqueWKBackForwardList* WKBackForwardListRef;
 typedef const struct OpaqueWKBackForwardListItem* WKBackForwardListItemRef;
 typedef const struct OpaqueWKResourceCacheManager* WKResourceCacheManagerRef;
 typedef const struct OpaqueWKContext* WKContextRef;
+typedef const struct OpaqueWKCookieManager* WKCookieManagerRef;
 typedef const struct OpaqueWKCredential* WKCredentialRef;
 typedef const struct OpaqueWKDatabaseManager* WKDatabaseManagerRef;
 typedef const struct OpaqueWKDownload* WKDownloadRef;
index 52d8a80..c0f0b69 100644 (file)
@@ -66,6 +66,7 @@ public:
         TypeBackForwardListItem,
         TypeCacheManager,
         TypeContext,
+        TypeCookieManager,
         TypeDatabaseManager,
         TypeDownload,
         TypeFormSubmissionListener,
index 7b48616..4ff0253 100644 (file)
@@ -50,6 +50,7 @@ class WebBackForwardList;
 class WebBackForwardListItem;
 class WebResourceCacheManagerProxy;
 class WebContext;
+class WebCookieManagerProxy;
 class WebCredential;
 class WebDatabaseManagerProxy;
 class WebFormSubmissionListenerProxy;
@@ -74,6 +75,7 @@ WK_ADD_API_MAPPING(WKBackForwardListItemRef, WebBackForwardListItem)
 WK_ADD_API_MAPPING(WKBackForwardListRef, WebBackForwardList)
 WK_ADD_API_MAPPING(WKResourceCacheManagerRef, WebResourceCacheManagerProxy)
 WK_ADD_API_MAPPING(WKContextRef, WebContext)
+WK_ADD_API_MAPPING(WKCookieManagerRef, WebCookieManagerProxy)
 WK_ADD_API_MAPPING(WKCredentialRef, WebCredential)
 WK_ADD_API_MAPPING(WKDatabaseManagerRef, WebDatabaseManagerProxy)
 WK_ADD_API_MAPPING(WKDownloadRef, DownloadProxy)
index 64b0e2e..c9dd1d4 100644 (file)
@@ -158,6 +158,11 @@ void WKContextClearApplicationCache(WKContextRef contextRef)
     toImpl(contextRef)->clearApplicationCache();
 }
 
+WKCookieManagerRef WKContextGetCookieManager(WKContextRef contextRef)
+{
+    return toAPI(toImpl(contextRef)->cookieManagerProxy());
+}
+
 WKApplicationCacheManagerRef WKContextGetApplicationCacheManager(WKContextRef contextRef)
 {
     return toAPI(toImpl(contextRef)->applicationCacheManagerProxy());
index cba3ceb..b022059 100644 (file)
@@ -124,6 +124,7 @@ WK_EXPORT void WKContextStartMemorySampler(WKContextRef context, WKDoubleRef int
 WK_EXPORT void WKContextStopMemorySampler(WKContextRef context);
 
 WK_EXPORT WKApplicationCacheManagerRef WKContextGetApplicationCacheManager(WKContextRef context);
+WK_EXPORT WKCookieManagerRef WKContextGetCookieManager(WKContextRef context);
 WK_EXPORT WKDatabaseManagerRef WKContextGetDatabaseManager(WKContextRef context);
 WK_EXPORT WKGeolocationManagerRef WKContextGetGeolocationManager(WKContextRef context);
 WK_EXPORT WKPluginSiteDataManagerRef WKContextGetPluginSiteDataManager(WKContextRef context);
diff --git a/Source/WebKit2/UIProcess/API/C/WKCookieManager.cpp b/Source/WebKit2/UIProcess/API/C/WKCookieManager.cpp
new file mode 100644 (file)
index 0000000..3c53d0a
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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 "WKCookieManager.h"
+
+#include "WKAPICast.h"
+#include "WebCookieManagerProxy.h"
+
+using namespace WebKit;
+
+WKTypeID WKCookieManagerGetTypeID()
+{
+    return toAPI(WebCookieManagerProxy::APIType);
+}
+
+void WKCookieManagerGetHostnamesWithCookies(WKCookieManagerRef cookieManagerRef, void* context, WKCookieManagerGetCookieHostnamesFunction callback)
+{
+    toImpl(cookieManagerRef)->getHostnamesWithCookies(ArrayCallback::create(context, callback));
+}
+
+void WKCookieManagerDeleteCookiesForHostname(WKCookieManagerRef cookieManagerRef, WKStringRef hostname)
+{
+    toImpl(cookieManagerRef)->deleteCookiesForHostname(toImpl(hostname)->string());
+}
+
+void WKCookieManagerDeleteAllCookies(WKCookieManagerRef cookieManagerRef)
+{
+    toImpl(cookieManagerRef)->deleteAllCookies();
+}
diff --git a/Source/WebKit2/UIProcess/API/C/WKCookieManager.h b/Source/WebKit2/UIProcess/API/C/WKCookieManager.h
new file mode 100644 (file)
index 0000000..ad0e5a9
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * 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 WKCookieManager_h
+#define WKCookieManager_h
+
+#include <WebKit2/WKBase.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+WK_EXPORT WKTypeID WKCookieManagerGetTypeID();
+
+typedef void (*WKCookieManagerGetCookieHostnamesFunction)(WKArrayRef, WKErrorRef, void*);
+WK_EXPORT void WKCookieManagerGetHostnamesWithCookies(WKCookieManagerRef cookieManager, void* context, WKCookieManagerGetCookieHostnamesFunction function);
+
+WK_EXPORT void WKCookieManagerDeleteCookiesForHostname(WKCookieManagerRef cookieManager, WKStringRef hostname);
+WK_EXPORT void WKCookieManagerDeleteAllCookies(WKCookieManagerRef cookieManager);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // WKCookieManager_h
index 8e63d9c..5ce9ba3 100644 (file)
@@ -36,6 +36,7 @@
 #include "WebApplicationCacheManagerProxy.h"
 #include "WebContextMessageKinds.h"
 #include "WebContextUserMessageCoders.h"
+#include "WebCookieManagerProxy.h"
 #include "WebCoreArgumentCoders.h"
 #include "WebDatabaseManagerProxy.h"
 #include "WebGeolocationManagerProxy.h"
@@ -111,6 +112,7 @@ WebContext::WebContext(ProcessModel processModel, const String& injectedBundlePa
     , m_memorySamplerEnabled(false)
     , m_memorySamplerInterval(1400.0)
     , m_applicationCacheManagerProxy(WebApplicationCacheManagerProxy::create(this))
+    , m_cookieManagerProxy(WebCookieManagerProxy::create(this))
     , m_databaseManagerProxy(WebDatabaseManagerProxy::create(this))
     , m_geolocationManagerProxy(WebGeolocationManagerProxy::create(this))
     , m_pluginSiteDataManager(WebPluginSiteDataManager::create(this))
@@ -140,6 +142,9 @@ WebContext::~WebContext()
     m_applicationCacheManagerProxy->invalidate();
     m_applicationCacheManagerProxy->clearContext();
 
+    m_cookieManagerProxy->invalidate();
+    m_cookieManagerProxy->clearContext();
+
     m_geolocationManagerProxy->invalidate();
     m_geolocationManagerProxy->clearContext();
 
@@ -292,6 +297,7 @@ void WebContext::disconnectProcess(WebProcessProxy* process)
     m_downloads.clear();
 
     m_applicationCacheManagerProxy->invalidate();
+    m_cookieManagerProxy->invalidate();
     m_databaseManagerProxy->invalidate();
     m_geolocationManagerProxy->invalidate();
     m_resourceCacheManagerProxy->invalidate();
@@ -564,6 +570,11 @@ void WebContext::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Mes
         return;
     }
 
+    if (messageID.is<CoreIPC::MessageClassWebCookieManagerProxy>()) {
+        m_cookieManagerProxy->didReceiveMessage(connection, messageID, arguments);
+        return;
+    }
+
     if (messageID.is<CoreIPC::MessageClassWebDatabaseManagerProxy>()) {
         m_databaseManagerProxy->didReceiveWebDatabaseManagerProxyMessage(connection, messageID, arguments);
         return;
index 80ae867..b649bcb 100644 (file)
@@ -46,6 +46,7 @@ namespace WebKit {
 
 class DownloadProxy;
 class WebApplicationCacheManagerProxy;
+class WebCookieManagerProxy;
 class WebDatabaseManagerProxy;
 class WebGeolocationManagerProxy;
 class WebPageGroup;
@@ -136,6 +137,7 @@ public:
     static HashSet<String, CaseFoldingHash> pdfAndPostScriptMIMETypes();
 
     WebApplicationCacheManagerProxy* applicationCacheManagerProxy() const { return m_applicationCacheManagerProxy.get(); }
+    WebCookieManagerProxy* cookieManagerProxy() const { return m_cookieManagerProxy.get(); }
     WebDatabaseManagerProxy* databaseManagerProxy() const { return m_databaseManagerProxy.get(); }
     WebGeolocationManagerProxy* geolocationManagerProxy() const { return m_geolocationManagerProxy.get(); }
     WebPluginSiteDataManager* pluginSiteDataManager() const { return m_pluginSiteDataManager.get(); }
@@ -221,6 +223,7 @@ private:
     double m_memorySamplerInterval;
 
     RefPtr<WebApplicationCacheManagerProxy> m_applicationCacheManagerProxy;
+    RefPtr<WebCookieManagerProxy> m_cookieManagerProxy;
     RefPtr<WebDatabaseManagerProxy> m_databaseManagerProxy;
     RefPtr<WebGeolocationManagerProxy> m_geolocationManagerProxy;
     RefPtr<WebPluginSiteDataManager> m_pluginSiteDataManager;
diff --git a/Source/WebKit2/UIProcess/WebCookieManagerProxy.cpp b/Source/WebKit2/UIProcess/WebCookieManagerProxy.cpp
new file mode 100644 (file)
index 0000000..802f328
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ * 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 "WebCookieManagerProxy.h"
+
+#include "SecurityOriginData.h"
+#include "WebCookieManagerMessages.h"
+#include "WebContext.h"
+#include "WebSecurityOrigin.h"
+
+namespace WebKit {
+
+PassRefPtr<WebCookieManagerProxy> WebCookieManagerProxy::create(WebContext* context)
+{
+    return adoptRef(new WebCookieManagerProxy(context));
+}
+
+WebCookieManagerProxy::WebCookieManagerProxy(WebContext* context)
+    : m_webContext(context)
+{
+}
+
+WebCookieManagerProxy::~WebCookieManagerProxy()
+{
+}
+
+void WebCookieManagerProxy::invalidate()
+{
+    invalidateCallbackMap(m_arrayCallbacks);
+}
+
+void WebCookieManagerProxy::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
+{
+    didReceiveWebCookieManagerProxyMessage(connection, messageID, arguments);
+}
+
+void WebCookieManagerProxy::getHostnamesWithCookies(PassRefPtr<ArrayCallback> prpCallback)
+{
+    ASSERT(m_webContext);
+
+    RefPtr<ArrayCallback> callback = prpCallback;
+    if (!m_webContext->hasValidProcess()) {
+        callback->invalidate();
+        return;
+    }
+    
+    uint64_t callbackID = callback->callbackID();
+    m_arrayCallbacks.set(callbackID, callback.release());
+    m_webContext->process()->send(Messages::WebCookieManager::GetHostnamesWithCookies(callbackID), 0);
+}
+    
+void WebCookieManagerProxy::didGetHostnamesWithCookies(const Vector<String>& hostnameList, uint64_t callbackID)
+{
+    RefPtr<ArrayCallback> callback = m_arrayCallbacks.take(callbackID);
+    if (!callback) {
+        // FIXME: Log error or assert.
+        return;
+    }
+
+    size_t hostnameCount = hostnameList.size();
+    Vector<RefPtr<APIObject> > hostnames(hostnameCount);
+
+    for (size_t i = 0; i < hostnameCount; ++i)
+        hostnames[i] = WebString::create(hostnameList[i]);
+
+    callback->performCallbackWithReturnValue(ImmutableArray::adopt(hostnames).get());
+}
+
+void WebCookieManagerProxy::deleteCookiesForHostname(const String& hostname)
+{
+    ASSERT(m_webContext);
+    if (!m_webContext->hasValidProcess())
+        return;
+    m_webContext->process()->send(Messages::WebCookieManager::DeleteCookiesForHostname(hostname), 0);
+}
+
+void WebCookieManagerProxy::deleteAllCookies()
+{
+    ASSERT(m_webContext);
+    if (!m_webContext->hasValidProcess())
+        return;
+    m_webContext->process()->send(Messages::WebCookieManager::DeleteAllCookies(), 0);
+}
+
+} // namespace WebKit
diff --git a/Source/WebKit2/UIProcess/WebCookieManagerProxy.h b/Source/WebKit2/UIProcess/WebCookieManagerProxy.h
new file mode 100644 (file)
index 0000000..b97e5c6
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * 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 WebCookieManagerProxy_h
+#define WebCookieManagerProxy_h
+
+#include "APIObject.h"
+#include "GenericCallback.h"
+#include "ImmutableArray.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefPtr.h>
+#include <wtf/Vector.h>
+
+namespace CoreIPC {
+    class ArgumentDecoder;
+    class Connection;
+    class MessageID;
+}
+
+namespace WebKit {
+
+class WebContext;
+
+typedef GenericCallback<WKArrayRef> ArrayCallback;
+
+class WebCookieManagerProxy : public APIObject {
+public:
+    static const Type APIType = TypeCookieManager;
+
+    static PassRefPtr<WebCookieManagerProxy> create(WebContext*);
+    virtual ~WebCookieManagerProxy();
+
+    void invalidate();
+    void clearContext() { m_webContext = 0; }
+    
+    void getHostnamesWithCookies(PassRefPtr<ArrayCallback>);
+    void deleteCookiesForHostname(const String& hostname);
+    void deleteAllCookies();
+
+    void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
+
+private:
+    WebCookieManagerProxy(WebContext*);
+
+    virtual Type type() const { return APIType; }
+
+    void didGetHostnamesWithCookies(const Vector<String>&, uint64_t callbackID);
+    
+    void didReceiveWebCookieManagerProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
+
+    WebContext* m_webContext;
+    HashMap<uint64_t, RefPtr<ArrayCallback> > m_arrayCallbacks;
+};
+
+} // namespace WebKit
+
+#endif // WebCookieManagerProxy_h
diff --git a/Source/WebKit2/UIProcess/WebCookieManagerProxy.messages.in b/Source/WebKit2/UIProcess/WebCookieManagerProxy.messages.in
new file mode 100644 (file)
index 0000000..4d41ee0
--- /dev/null
@@ -0,0 +1,25 @@
+# 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.
+
+messages -> WebCookieManagerProxy {
+    DidGetHostnamesWithCookies(Vector<WTF::String> hostnames, uint64_t callbackID);
+}
index 5b1ff8f..a5310b7 100644 (file)
@@ -249,6 +249,7 @@ void WebProcessProxy::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC
         || messageID.is<CoreIPC::MessageClassWebContextLegacy>()
         || messageID.is<CoreIPC::MessageClassDownloadProxy>()
         || messageID.is<CoreIPC::MessageClassWebApplicationCacheManagerProxy>()
+        || messageID.is<CoreIPC::MessageClassWebCookieManagerProxy>()
         || messageID.is<CoreIPC::MessageClassWebDatabaseManagerProxy>()
         || messageID.is<CoreIPC::MessageClassWebGeolocationManagerProxy>()
         || messageID.is<CoreIPC::MessageClassWebResourceCacheManagerProxy>()) {
index 345b156..67739f9 100644 (file)
@@ -40,6 +40,7 @@ WEBKIT2_INCLUDEPATH = \
     $$SOURCE_DIR/WebKit2/WebProcess \
     $$SOURCE_DIR/WebKit2/WebProcess/ApplicationCache \
     $$SOURCE_DIR/WebKit2/WebProcess/Authentication \
+    $$SOURCE_DIR/WebKit2/WebProcess/Cookies \
     $$SOURCE_DIR/WebKit2/WebProcess/Downloads \
     $$SOURCE_DIR/WebKit2/WebProcess/Downloads/qt \
     $$SOURCE_DIR/WebKit2/WebProcess/Geolocation \
index ee52b3c..e3f2ceb 100644 (file)
@@ -35,6 +35,8 @@ WEBKIT2_GENERATED_HEADERS = \
     $$WEBKIT2_GENERATED_SOURCES_DIR/WebApplicationCacheManagerMessages.h \
     $$WEBKIT2_GENERATED_SOURCES_DIR/WebApplicationCacheManagerProxyMessages.h \
     $$WEBKIT2_GENERATED_SOURCES_DIR/WebContextMessages.h \
+    $$WEBKIT2_GENERATED_SOURCES_DIR/WebCookieManagerMessages.h \
+    $$WEBKIT2_GENERATED_SOURCES_DIR/WebCookieManagerProxyMessages.h \
     $$WEBKIT2_GENERATED_SOURCES_DIR/WebDatabaseManagerMessages.h \
     $$WEBKIT2_GENERATED_SOURCES_DIR/WebDatabaseManagerProxyMessages.h \
     $$WEBKIT2_GENERATED_SOURCES_DIR/WebGeolocationManagerMessages.h \
@@ -59,6 +61,8 @@ WEBKIT2_GENERATED_SOURCES = \
     $$WEBKIT2_GENERATED_SOURCES_DIR/WebApplicationCacheManagerMessageReceiver.cpp \
     $$WEBKIT2_GENERATED_SOURCES_DIR/WebApplicationCacheManagerProxyMessageReceiver.cpp \
     $$WEBKIT2_GENERATED_SOURCES_DIR/WebContextMessageReceiver.cpp \
+    $$WEBKIT2_GENERATED_SOURCES_DIR/WebCookieManagerMessageReceiver.cpp \
+    $$WEBKIT2_GENERATED_SOURCES_DIR/WebCookieManagerProxyMessageReceiver.cpp \
     $$WEBKIT2_GENERATED_SOURCES_DIR/WebDatabaseManagerMessageReceiver.cpp \
     $$WEBKIT2_GENERATED_SOURCES_DIR/WebDatabaseManagerProxyMessageReceiver.cpp \
     $$WEBKIT2_GENERATED_SOURCES_DIR/WebGeolocationManagerMessageReceiver.cpp \
@@ -165,6 +169,7 @@ HEADERS += \
     UIProcess/WebContextInjectedBundleClient.h \
     UIProcess/WebContextMenuProxy.h \
     UIProcess/WebContextUserMessageCoders.h \
+    UIProcess/WebCookieManagerProxy.h \
     UIProcess/WebDatabaseManagerProxy.h \
     UIProcess/WebDatabaseManagerProxyClient.h \
     UIProcess/WebDownloadClient.h \
@@ -195,6 +200,7 @@ HEADERS += \
     UIProcess/qt/WebPopupMenuProxyQt.h \
     WebProcess/ApplicationCache/WebApplicationCacheManager.h \
     WebProcess/Authentication/AuthenticationManager.h \
+    WebProcess/Cookies/WebCookieManager.h \
     WebProcess/Downloads/Download.h \
     WebProcess/Downloads/DownloadManager.h \
     WebProcess/Geolocation/GeolocationPermissionRequestManager.h \
@@ -337,6 +343,7 @@ SOURCES += \
     UIProcess/WebContext.cpp \
     UIProcess/WebContextInjectedBundleClient.cpp \
     UIProcess/WebContextMenuProxy.cpp \
+    UIProcess/WebCookieManagerProxy.cpp \
     UIProcess/WebDatabaseManagerProxy.cpp \
     UIProcess/WebDatabaseManagerProxyClient.cpp \
     UIProcess/WebDownloadClient.cpp \
@@ -375,6 +382,7 @@ SOURCES += \
     UIProcess/qt/WebPreferencesQt.cpp \
     WebProcess/ApplicationCache/WebApplicationCacheManager.cpp \
     WebProcess/Authentication/AuthenticationManager.cpp \
+    WebProcess/Cookies/WebCookieManager.cpp \
     WebProcess/Downloads/Download.cpp \
     WebProcess/Downloads/DownloadManager.cpp \
     WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp \
index a8f0ea6..899a1d2 100644 (file)
                1CA8B954127C891500576C2B /* WebInspectorMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1C8E2DAD1278C5B200BC7BD0 /* WebInspectorMac.mm */; };
                29CD55AA128E294F00133C85 /* AccessibilityWebPageObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 29CD55A8128E294F00133C85 /* AccessibilityWebPageObject.h */; };
                29CD55AB128E294F00133C85 /* AccessibilityWebPageObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29CD55A9128E294F00133C85 /* AccessibilityWebPageObject.mm */; };
+               330934471315B9220097A7BC /* WebCookieManagerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 330934431315B9220097A7BC /* WebCookieManagerMessageReceiver.cpp */; };
+               330934481315B9220097A7BC /* WebCookieManagerMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 330934441315B9220097A7BC /* WebCookieManagerMessages.h */; };
+               330934491315B9220097A7BC /* WebCookieManagerProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 330934451315B9220097A7BC /* WebCookieManagerProxyMessageReceiver.cpp */; };
+               3309344A1315B9220097A7BC /* WebCookieManagerProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 330934461315B9220097A7BC /* WebCookieManagerProxyMessages.h */; };
+               3309344F1315B94D0097A7BC /* WebCookieManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3309344C1315B94D0097A7BC /* WebCookieManager.cpp */; };
+               330934501315B94D0097A7BC /* WebCookieManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 3309344D1315B94D0097A7BC /* WebCookieManager.h */; };
+               330934551315B9750097A7BC /* WebCookieManagerProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 330934521315B9750097A7BC /* WebCookieManagerProxy.cpp */; };
+               330934561315B9750097A7BC /* WebCookieManagerProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 330934531315B9750097A7BC /* WebCookieManagerProxy.h */; };
+               3309345A1315B9980097A7BC /* WKCookieManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 330934581315B9980097A7BC /* WKCookieManager.cpp */; };
+               3309345B1315B9980097A7BC /* WKCookieManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 330934591315B9980097A7BC /* WKCookieManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
                33152975130D0CB200ED2483 /* SecurityOriginData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33152973130D0CB200ED2483 /* SecurityOriginData.cpp */; };
                33152976130D0CB200ED2483 /* SecurityOriginData.h in Headers */ = {isa = PBXBuildFile; fileRef = 33152974130D0CB200ED2483 /* SecurityOriginData.h */; };
                3336762F130C9998006C9DE2 /* WebResourceCacheManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3336762C130C9998006C9DE2 /* WebResourceCacheManager.cpp */; };
                29CD55A8128E294F00133C85 /* AccessibilityWebPageObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilityWebPageObject.h; sourceTree = "<group>"; };
                29CD55A9128E294F00133C85 /* AccessibilityWebPageObject.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AccessibilityWebPageObject.mm; sourceTree = "<group>"; };
                32DBCF5E0370ADEE00C91783 /* WebKit2Prefix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKit2Prefix.h; sourceTree = "<group>"; };
+               330934431315B9220097A7BC /* WebCookieManagerMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebCookieManagerMessageReceiver.cpp; sourceTree = "<group>"; };
+               330934441315B9220097A7BC /* WebCookieManagerMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCookieManagerMessages.h; sourceTree = "<group>"; };
+               330934451315B9220097A7BC /* WebCookieManagerProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebCookieManagerProxyMessageReceiver.cpp; sourceTree = "<group>"; };
+               330934461315B9220097A7BC /* WebCookieManagerProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCookieManagerProxyMessages.h; sourceTree = "<group>"; };
+               3309344C1315B94D0097A7BC /* WebCookieManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebCookieManager.cpp; path = Cookies/WebCookieManager.cpp; sourceTree = "<group>"; };
+               3309344D1315B94D0097A7BC /* WebCookieManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebCookieManager.h; path = Cookies/WebCookieManager.h; sourceTree = "<group>"; };
+               3309344E1315B94D0097A7BC /* WebCookieManager.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = WebCookieManager.messages.in; path = Cookies/WebCookieManager.messages.in; sourceTree = "<group>"; };
+               330934521315B9750097A7BC /* WebCookieManagerProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebCookieManagerProxy.cpp; sourceTree = "<group>"; };
+               330934531315B9750097A7BC /* WebCookieManagerProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCookieManagerProxy.h; sourceTree = "<group>"; };
+               330934541315B9750097A7BC /* WebCookieManagerProxy.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebCookieManagerProxy.messages.in; sourceTree = "<group>"; };
+               330934581315B9980097A7BC /* WKCookieManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKCookieManager.cpp; sourceTree = "<group>"; };
+               330934591315B9980097A7BC /* WKCookieManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKCookieManager.h; sourceTree = "<group>"; };
                33152973130D0CB200ED2483 /* SecurityOriginData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SecurityOriginData.cpp; sourceTree = "<group>"; };
                33152974130D0CB200ED2483 /* SecurityOriginData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecurityOriginData.h; sourceTree = "<group>"; };
                3336762C130C9998006C9DE2 /* WebResourceCacheManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebResourceCacheManager.cpp; path = ResourceCache/WebResourceCacheManager.cpp; sourceTree = "<group>"; };
                        tabWidth = 8;
                        usesTabs = 0;
                };
+               3309344B1315B93A0097A7BC /* Cookies */ = {
+                       isa = PBXGroup;
+                       children = (
+                               3309344C1315B94D0097A7BC /* WebCookieManager.cpp */,
+                               3309344D1315B94D0097A7BC /* WebCookieManager.h */,
+                               3309344E1315B94D0097A7BC /* WebCookieManager.messages.in */,
+                       );
+                       name = Cookies;
+                       sourceTree = "<group>";
+               };
                3336762B130C9978006C9DE2 /* ResourceCache */ = {
                        isa = PBXGroup;
                        children = (
                        children = (
                                512E352A130B559900ABD19A /* ApplicationCache */,
                                512F588612A8834700629530 /* Authentication */,
+                               3309344B1315B93A0097A7BC /* Cookies */,
                                1A61614C127798B5003ACD86 /* Downloads */,
                                BC0E5FCB12D696DD0012A72A /* Geolocation */,
                                BC204EDF11C83E72008F3375 /* InjectedBundle */,
                                51A84CE2127F386B00CA6EA4 /* WebContextMenuProxy.cpp */,
                                51ACBB81127A8BAD00D203B9 /* WebContextMenuProxy.h */,
                                BCB0B0DB12305A2500B1341E /* WebContextUserMessageCoders.h */,
+                               330934521315B9750097A7BC /* WebCookieManagerProxy.cpp */,
+                               330934531315B9750097A7BC /* WebCookieManagerProxy.h */,
+                               330934541315B9750097A7BC /* WebCookieManagerProxy.messages.in */,
                                F62A765912B1ABC30005F1B6 /* WebDatabaseManagerProxy.cpp */,
                                F62A765A12B1ABC30005F1B6 /* WebDatabaseManagerProxy.h */,
                                F62A765B12B1ABC30005F1B6 /* WebDatabaseManagerProxy.messages.in */,
                                BCB9E24A1120E15C00A137E0 /* WKContext.cpp */,
                                BCB9E2491120E15C00A137E0 /* WKContext.h */,
                                BCC938E01180DE440085E5FE /* WKContextPrivate.h */,
+                               330934581315B9980097A7BC /* WKCookieManager.cpp */,
+                               330934591315B9980097A7BC /* WKCookieManager.h */,
                                512F58F112A88A5400629530 /* WKCredential.cpp */,
                                512F58F212A88A5400629530 /* WKCredential.h */,
                                518ACF1012B015F800B04B83 /* WKCredentialTypes.h */,
                                512E35F7130B642E00ABD19A /* WebApplicationCacheManagerProxyMessages.h */,
                                BCEE7D0B12846F69009827DA /* WebContextMessageReceiver.cpp */,
                                BCEE7D0C12846F69009827DA /* WebContextMessages.h */,
+                               330934431315B9220097A7BC /* WebCookieManagerMessageReceiver.cpp */,
+                               330934441315B9220097A7BC /* WebCookieManagerMessages.h */,
+                               330934451315B9220097A7BC /* WebCookieManagerProxyMessageReceiver.cpp */,
+                               330934461315B9220097A7BC /* WebCookieManagerProxyMessages.h */,
                                F62A76B212B1B25F0005F1B6 /* WebDatabaseManagerMessageReceiver.cpp */,
                                F62A76B312B1B25F0005F1B6 /* WebDatabaseManagerMessages.h */,
                                F62A76B412B1B25F0005F1B6 /* WebDatabaseManagerProxyMessageReceiver.cpp */,
                                33367656130C9ECA006C9DE2 /* WebResourceCacheManagerMessages.h in Headers */,
                                33367658130C9ECB006C9DE2 /* WebResourceCacheManagerProxyMessages.h in Headers */,
                                33152976130D0CB200ED2483 /* SecurityOriginData.h in Headers */,
+                               330934481315B9220097A7BC /* WebCookieManagerMessages.h in Headers */,
+                               3309344A1315B9220097A7BC /* WebCookieManagerProxyMessages.h in Headers */,
+                               330934501315B94D0097A7BC /* WebCookieManager.h in Headers */,
+                               330934561315B9750097A7BC /* WebCookieManagerProxy.h in Headers */,
+                               3309345B1315B9980097A7BC /* WKCookieManager.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                33367657130C9ECA006C9DE2 /* WebResourceCacheManagerProxyMessageReceiver.cpp in Sources */,
                                33152975130D0CB200ED2483 /* SecurityOriginData.cpp in Sources */,
                                33F9D5B91312F1EE000D683F /* WebResourceCacheManagerCFNet.cpp in Sources */,
+                               330934471315B9220097A7BC /* WebCookieManagerMessageReceiver.cpp in Sources */,
+                               330934491315B9220097A7BC /* WebCookieManagerProxyMessageReceiver.cpp in Sources */,
+                               3309344F1315B94D0097A7BC /* WebCookieManager.cpp in Sources */,
+                               330934551315B9750097A7BC /* WebCookieManagerProxy.cpp in Sources */,
+                               3309345A1315B9980097A7BC /* WKCookieManager.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
diff --git a/Source/WebKit2/WebProcess/Cookies/WebCookieManager.cpp b/Source/WebKit2/WebProcess/Cookies/WebCookieManager.cpp
new file mode 100644 (file)
index 0000000..a04aaca
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * 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 "WebCookieManager.h"
+
+#include "MessageID.h"
+#include "SecurityOriginData.h"
+#include "WebCookieManagerProxyMessages.h"
+#include "WebProcess.h"
+#include <WebCore/NotImplemented.h>
+#include <WebCore/SecurityOrigin.h>
+#include <WebCore/SecurityOriginHash.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebCookieManager& WebCookieManager::shared()
+{
+    DEFINE_STATIC_LOCAL(WebCookieManager, shared, ());
+    return shared;
+}
+
+WebCookieManager::WebCookieManager()
+{
+}
+
+void WebCookieManager::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
+{
+    didReceiveWebCookieManagerMessage(connection, messageID, arguments);
+}
+
+void WebCookieManager::getHostnamesWithCookies(uint64_t callbackID)
+{
+    HashSet<String> hostnames;
+
+    // FIXME <http://webkit.org/b/55086>: Get a list of all cookies, and add their hostnames to the set of hostnames.
+
+    Vector<String> hostnameList;
+    copyToVector(hostnames, hostnameList);
+
+    WebProcess::shared().connection()->send(Messages::WebCookieManagerProxy::DidGetHostnamesWithCookies(hostnameList, callbackID), 0);
+}
+
+void WebCookieManager::deleteCookiesForHostname(const String& hostname)
+{
+    // FIXME <http://webkit.org/b/55086>: Implement.
+    notImplemented();
+}
+
+void WebCookieManager::deleteAllCookies()
+{
+    // FIXME <http://webkit.org/b/55086>: Implement.
+    notImplemented();
+}
+
+} // namespace WebKit
diff --git a/Source/WebKit2/WebProcess/Cookies/WebCookieManager.h b/Source/WebKit2/WebProcess/Cookies/WebCookieManager.h
new file mode 100644 (file)
index 0000000..9b0f028
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * 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 WebCookieManager_h
+#define WebCookieManager_h
+
+#include <wtf/Noncopyable.h>
+#include <wtf/text/WTFString.h>
+
+namespace CoreIPC {
+    class ArgumentDecoder;
+    class Connection;
+    class MessageID;
+}
+
+namespace WebKit {
+
+struct SecurityOriginData;
+
+class WebCookieManager {
+    WTF_MAKE_NONCOPYABLE(WebCookieManager);
+public:
+    static WebCookieManager& shared();
+
+    void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
+
+private:
+    WebCookieManager();
+    
+    void getHostnamesWithCookies(uint64_t callbackID);
+    void deleteCookiesForHostname(const String&);
+    void deleteAllCookies();
+
+    void didReceiveWebCookieManagerMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
+};
+
+} // namespace WebKit
+
+#endif // WebCookieManager_h
diff --git a/Source/WebKit2/WebProcess/Cookies/WebCookieManager.messages.in b/Source/WebKit2/WebProcess/Cookies/WebCookieManager.messages.in
new file mode 100644 (file)
index 0000000..db8bfb8
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ */
+ messages -> WebCookieManager {
+    void GetHostnamesWithCookies(uint64_t callbackID)
+    void DeleteCookiesForHostname(WTF::String hostname)
+    void DeleteAllCookies()
+}
index 4ce438b..a0583eb 100644 (file)
@@ -35,6 +35,7 @@
 #include "SandboxExtension.h"
 #include "WebApplicationCacheManager.h"
 #include "WebContextMessages.h"
+#include "WebCookieManager.h"
 #include "WebCoreArgumentCoders.h"
 #include "WebDatabaseManager.h"
 #include "WebFrame.h"
@@ -536,6 +537,11 @@ void WebProcess::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Mes
         return;
     }
 
+    if (messageID.is<CoreIPC::MessageClassWebCookieManager>()) {
+        WebCookieManager::shared().didReceiveMessage(connection, messageID, arguments);
+        return;
+    }
+
     if (messageID.is<CoreIPC::MessageClassWebDatabaseManager>()) {
         WebDatabaseManager::shared().didReceiveMessage(connection, messageID, arguments);
         return;
index cbb9031..18c53a1 100755 (executable)
                                        >
                                </File>
             </Filter>
+            <Filter
+                Name="Cookies"
+                >
+                <File
+                                       RelativePath="..\WebProcess\Cookies\WebCookieManager.cpp"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\WebProcess\Cookies\WebCookieManager.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\WebProcess\Cookies\WebCookieManager.messages.in"
+                                       >
+                               </File>
+            </Filter>
                        <Filter
                                Name="WebCoreSupport"
                                >
                                RelativePath="..\UIProcess\WebContextMenuProxy.h"
                                >
                        </File>
+            <File
+                               RelativePath="..\UIProcess\WebCookieManagerProxy.cpp"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\UIProcess\WebCookieManagerProxy.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\UIProcess\WebCookieManagerProxy.messages.in"
+                               >
+                       </File>
                        <File
                                RelativePath="..\UIProcess\WebContextUserMessageCoders.h"
                                >
                                                RelativePath="..\UIProcess\API\C\win\WKContextWin.cpp"
                                                >
                                        </File>
+                    <File
+                                               RelativePath="..\UIProcess\API\C\WKCookieManager.cpp"
+                                               >
+                                       </File>
+                                       <File
+                                               RelativePath="..\UIProcess\API\C\WKCookieManager.h"
+                                               >
+                                       </File>
                                        <File
                                                RelativePath="..\UIProcess\API\C\WKCredential.cpp"
                                                >
                                >
                        </File>
             <File
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\WebCookieManagerMessageReceiver.cpp"
+                               >
+                       </File>
+                       <File
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\WebCookieManagerMessages.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\WebCookieManagerProxyMessageReceiver.cpp"
+                               >
+                       </File>
+                       <File
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\WebCookieManagerProxyMessages.h"
+                               >
+                       </File>
+            <File
                                RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\WebResourceCacheManagerMessageReceiver.cpp"
                                >
                        </File>
index 05f3b72..1c0b7c4 100755 (executable)
@@ -6,7 +6,7 @@
        >
        <Tool
                Name="VCCLCompilerTool"
-               AdditionalIncludeDirectories="&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\Platform&quot;;&quot;$(ProjectDir)\..\Platform\cg&quot;;&quot;$(ProjectDir)\..\Platform\CoreIPC&quot;;&quot;$(ProjectDir)\..\PluginProcess&quot;;&quot;$(ProjectDir)\..\Shared&quot;;&quot;$(ProjectDir)\..\Shared\win&quot;;&quot;$(ProjectDir)\..\Shared\cf&quot;;&quot;$(ProjectDir)\..\Shared\API\c&quot;;&quot;$(ProjectDir)\..\Shared\API\c\cf&quot;;&quot;$(ProjectDir)\..\Shared\API\c\win&quot;;&quot;$(ProjectDir)\..\Shared\CoreIPCSupport&quot;;&quot;$(ProjectDir)\..\Shared\Plugins&quot;;&quot;$(ProjectDir)\..\Shared\Plugins\Netscape&quot;;&quot;$(ProjectDir)\..\UIProcess&quot;;&quot;$(ProjectDir)\..\UIProcess\API\C&quot;;&quot;$(ProjectDir)\..\UIProcess\API\C\win&quot;;&quot;$(ProjectDir)\..\UIProcess\API\cpp&quot;;&quot;$(ProjectDir)\..\UIProcess\API\win&quot;;&quot;$(ProjectDir)\..\UIProcess\Authentication&quot;;&quot;$(ProjectDir)\..\UIProcess\Downloads&quot;;&quot;$(ProjectDir)\..\UIProcess\Launcher&quot;;&quot;$(ProjectDir)\..\UIProcess\Plugins&quot;;&quot;$(ProjectDir)\..\UIProcess\win&quot;;&quot;$(ProjectDir)\..\WebProcess&quot;;&quot;$(ProjectDir)\..\WebProcess\WebCoreSupport&quot;;&quot;$(ProjectDir)\..\WebProcess\WebCoreSupport\win&quot;;&quot;$(ProjectDir)\..\WebProcess\WebPage&quot;;&quot;$(ProjectDir)\..\WebProcess\WebPage\win&quot;;&quot;$(ProjectDir)\..\WebProcess\InjectedBundle&quot;;&quot;$(ProjectDir)\..\WebProcess\InjectedBundle\API\c&quot;;&quot;$(ProjectDir)\..\WebProcess\InjectedBundle\DOM&quot;;&quot;$(ProjectDir)\..\WebProcess\InjectedBundle\win&quot;;&quot;$(ProjectDir)\..\WebProcess\Plugins&quot;;&quot;$(ProjectDir)\..\WebProcess\Plugins\Netscape&quot;;&quot;$(ProjectDir)\..\WebProcess\win&quot;;&quot;$(ProjectDir)\..\WebProcess\ApplicationCache&quot;;&quot;$(ProjectDir)\..\WebProcess\Authentication&quot;;&quot;$(ProjectDir)\..\WebProcess\Downloads&quot;;&quot;$(ProjectDir)\..\WebProcess\Downloads\cf&quot;;&quot;$(ProjectDir)\..\WebProcess\Geolocation&quot;;&quot;$(ProjectDir)\..\WebProcess\ResourceCache&quot;;&quot;$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources&quot;;&quot;$(ConfigurationBuildDir)\Include&quot;;&quot;$(ConfigurationBuildDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\Include\pthreads&quot;;&quot;$(ConfigurationBuildDir)\Include\JavaScriptCore&quot;;&quot;$(ConfigurationBuildDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\private\JavaScriptCore&quot;;&quot;$(ConfigurationBuildDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;"
+               AdditionalIncludeDirectories="&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\Platform&quot;;&quot;$(ProjectDir)\..\Platform\cg&quot;;&quot;$(ProjectDir)\..\Platform\CoreIPC&quot;;&quot;$(ProjectDir)\..\PluginProcess&quot;;&quot;$(ProjectDir)\..\Shared&quot;;&quot;$(ProjectDir)\..\Shared\win&quot;;&quot;$(ProjectDir)\..\Shared\cf&quot;;&quot;$(ProjectDir)\..\Shared\API\c&quot;;&quot;$(ProjectDir)\..\Shared\API\c\cf&quot;;&quot;$(ProjectDir)\..\Shared\API\c\win&quot;;&quot;$(ProjectDir)\..\Shared\CoreIPCSupport&quot;;&quot;$(ProjectDir)\..\Shared\Plugins&quot;;&quot;$(ProjectDir)\..\Shared\Plugins\Netscape&quot;;&quot;$(ProjectDir)\..\UIProcess&quot;;&quot;$(ProjectDir)\..\UIProcess\API\C&quot;;&quot;$(ProjectDir)\..\UIProcess\API\C\win&quot;;&quot;$(ProjectDir)\..\UIProcess\API\cpp&quot;;&quot;$(ProjectDir)\..\UIProcess\API\win&quot;;&quot;$(ProjectDir)\..\UIProcess\Authentication&quot;;&quot;$(ProjectDir)\..\UIProcess\Downloads&quot;;&quot;$(ProjectDir)\..\UIProcess\Launcher&quot;;&quot;$(ProjectDir)\..\UIProcess\Plugins&quot;;&quot;$(ProjectDir)\..\UIProcess\win&quot;;&quot;$(ProjectDir)\..\WebProcess&quot;;&quot;$(ProjectDir)\..\WebProcess\WebCoreSupport&quot;;&quot;$(ProjectDir)\..\WebProcess\WebCoreSupport\win&quot;;&quot;$(ProjectDir)\..\WebProcess\WebPage&quot;;&quot;$(ProjectDir)\..\WebProcess\WebPage\win&quot;;&quot;$(ProjectDir)\..\WebProcess\InjectedBundle&quot;;&quot;$(ProjectDir)\..\WebProcess\InjectedBundle\API\c&quot;;&quot;$(ProjectDir)\..\WebProcess\InjectedBundle\DOM&quot;;&quot;$(ProjectDir)\..\WebProcess\InjectedBundle\win&quot;;&quot;$(ProjectDir)\..\WebProcess\Plugins&quot;;&quot;$(ProjectDir)\..\WebProcess\Plugins\Netscape&quot;;&quot;$(ProjectDir)\..\WebProcess\win&quot;;&quot;$(ProjectDir)\..\WebProcess\ApplicationCache&quot;;&quot;$(ProjectDir)\..\WebProcess\Authentication&quot;;&quot;$(ProjectDir)\..\WebProcess\Cookies&quot;;&quot;$(ProjectDir)\..\WebProcess\Downloads&quot;;&quot;$(ProjectDir)\..\WebProcess\Downloads\cf&quot;;&quot;$(ProjectDir)\..\WebProcess\Geolocation&quot;;&quot;$(ProjectDir)\..\WebProcess\ResourceCache&quot;;&quot;$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources&quot;;&quot;$(ConfigurationBuildDir)\Include&quot;;&quot;$(ConfigurationBuildDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\Include\pthreads&quot;;&quot;$(ConfigurationBuildDir)\Include\JavaScriptCore&quot;;&quot;$(ConfigurationBuildDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\private\JavaScriptCore&quot;;&quot;$(ConfigurationBuildDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;"
                PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit;BUILDING_WEBKIT"
                UsePrecompiledHeader="2"
                PrecompiledHeaderThrough="WebKit2Prefix.h"
index b3d9a58..5994391 100644 (file)
@@ -44,6 +44,7 @@ all:
     xcopy /y /d "..\UIProcess\API\C\WKBackForwardListItem.h" "%ConfigurationBuildDir%\include\WebKit2"
     xcopy /y /d "..\UIProcess\API\C\WKContext.h" "%ConfigurationBuildDir%\include\WebKit2"
     xcopy /y /d "..\UIProcess\API\C\WKContextPrivate.h" "%ConfigurationBuildDir%\include\WebKit2"
+    xcopy /y /d "..\UIProcess\API\C\WKCookieManager.h" "%ConfigurationBuildDir%\include\WebKit2"
     xcopy /y /d "..\UIProcess\API\C\WKCredential.h" "%ConfigurationBuildDir%\include\WebKit2"
     xcopy /y /d "..\UIProcess\API\C\WKCredentialTypes.h" "%ConfigurationBuildDir%\include\WebKit2"
     xcopy /y /d "..\UIProcess\API\C\WKDatabaseManager.h" "%ConfigurationBuildDir%\include\WebKit2"