[WK2] Forward cookie jar calls to NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=103457

Reviewed by Darin Adler.

Source/WebCore:

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
PlatformCookieJar.h functions are now used in WebKit2.

* loader/CookieJar.cpp:
(WebCore::cookies):
(WebCore::setCookies):
(WebCore::cookiesEnabled):
(WebCore::cookieRequestHeaderFieldValue):
(WebCore::getRawCookies):
(WebCore::deleteCookie):
(WebCore::getHostnamesWithCookies):
(WebCore::deleteCookiesForHostname):
(WebCore::deleteAllCookies):
Use a strategy instead of going to PlatformCookieJar directly.

* platform/Cookie.h: (Cookie): Added a default constructor, so that Cookie could be
sent over IPC.

* platform/CookiesStrategy.h: Added functions for cookie jar.

Source/WebKit/efl:

* WebCoreSupport/PlatformStrategiesEfl.cpp:
(PlatformStrategiesEfl::cookiesForDOM):
(PlatformStrategiesEfl::setCookiesFromDOM):
(PlatformStrategiesEfl::cookiesEnabled):
(PlatformStrategiesEfl::cookieRequestHeaderFieldValue):
(PlatformStrategiesEfl::getRawCookies):
(PlatformStrategiesEfl::deleteCookie):
(PlatformStrategiesEfl::getHostnamesWithCookies):
(PlatformStrategiesEfl::deleteCookiesForHostname):
(PlatformStrategiesEfl::deleteAllCookies):

Source/WebKit/gtk:

* WebCoreSupport/PlatformStrategiesGtk.cpp:
(PlatformStrategiesGtk::cookiesForDOM):
(PlatformStrategiesGtk::setCookiesFromDOM):
(PlatformStrategiesGtk::cookiesEnabled):
(PlatformStrategiesGtk::cookieRequestHeaderFieldValue):
(PlatformStrategiesGtk::getRawCookies):
(PlatformStrategiesGtk::deleteCookie):
(PlatformStrategiesGtk::getHostnamesWithCookies):
(PlatformStrategiesGtk::deleteCookiesForHostname):
(PlatformStrategiesGtk::deleteAllCookies):

Source/WebKit/mac:

* WebCoreSupport/WebPlatformStrategies.h:
(WebPlatformStrategies):
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::cookiesForDOM):
(WebPlatformStrategies::setCookiesFromDOM):
(WebPlatformStrategies::cookiesEnabled):
(WebPlatformStrategies::cookieRequestHeaderFieldValue):
(WebPlatformStrategies::getRawCookies):
(WebPlatformStrategies::deleteCookie):
(WebPlatformStrategies::getHostnamesWithCookies):
(WebPlatformStrategies::deleteCookiesForHostname):
(WebPlatformStrategies::deleteAllCookies):
(WebPlatformStrategies::getPluginInfo):
(WebPlatformStrategies::bufferForType):
WebKit1 strategy just uses PlatformCookieJar.

Source/WebKit/qt:

* WebCoreSupport/PlatformStrategiesQt.cpp:
(PlatformStrategiesQt::cookiesForDOM):
(PlatformStrategiesQt::setCookiesFromDOM):
(PlatformStrategiesQt::cookiesEnabled):
(PlatformStrategiesQt::cookieRequestHeaderFieldValue):
(PlatformStrategiesQt::getRawCookies):
(PlatformStrategiesQt::deleteCookie):
(PlatformStrategiesQt::getHostnamesWithCookies):
(PlatformStrategiesQt::deleteCookiesForHostname):
(PlatformStrategiesQt::deleteAllCookies):

Source/WebKit/win:

* WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::cookiesForDOM):
(WebPlatformStrategies::setCookiesFromDOM):
(WebPlatformStrategies::cookiesEnabled):
(WebPlatformStrategies::cookieRequestHeaderFieldValue):
(WebPlatformStrategies::getRawCookies):
(WebPlatformStrategies::deleteCookie):
(WebPlatformStrategies::getHostnamesWithCookies):
(WebPlatformStrategies::deleteCookiesForHostname):
(WebPlatformStrategies::deleteAllCookies):

Source/WebKit/wince:

* WebCoreSupport/PlatformStrategiesWinCE.cpp:
(PlatformStrategiesWinCE::cookiesForDOM):
(PlatformStrategiesWinCE::setCookiesFromDOM):
(PlatformStrategiesWinCE::cookiesEnabled):
(PlatformStrategiesWinCE::cookieRequestHeaderFieldValue):
(PlatformStrategiesWinCE::getRawCookies):
(PlatformStrategiesWinCE::deleteCookie):
(PlatformStrategiesWinCE::getHostnamesWithCookies):
(PlatformStrategiesWinCE::deleteCookiesForHostname):
(PlatformStrategiesWinCE::deleteAllCookies):

Source/WebKit2:

* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
Added messages to maniputate CookieJar in network process.

* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp: Removed unnecessary WebCore:: prefixes,
this file has a using direcive.
(WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
(WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
(WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
(WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
(WebKit::NetworkConnectionToWebProcess::getRawCookies):
(WebKit::NetworkConnectionToWebProcess::deleteCookie):
(WebKit::NetworkConnectionToWebProcess::getHostnamesWithCookies):
(WebKit::NetworkConnectionToWebProcess::deleteCookiesForHostname):
(WebKit::NetworkConnectionToWebProcess::deleteAllCookies):
Added implementations that use PlatformCookieJar in the network process.

* Scripts/webkit2/messages.py: (struct_or_class):
* Shared/WebCoreArgumentCoders.h:
* Shared/WebCoreArgumentCoders.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):
Added support for Cookie.

* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::cookiesForDOM):
(WebKit::WebPlatformStrategies::setCookiesFromDOM):
(WebKit::WebPlatformStrategies::cookiesEnabled):
(WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
(WebKit::WebPlatformStrategies::getRawCookies):
(WebKit::WebPlatformStrategies::deleteCookie):
(WebKit::WebPlatformStrategies::getHostnamesWithCookies):
(WebKit::WebPlatformStrategies::deleteCookiesForHostname):
(WebKit::WebPlatformStrategies::deleteAllCookies):
When using the network process, forward cookie calls to it.


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