Part of <rdar://problem/8762095> and https://bugs.webkit.org/show_bug.cgi?id=55172
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Feb 2011 02:15:25 +0000 (02:15 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Feb 2011 02:15:25 +0000 (02:15 +0000)
commit5694acf005a6b9c941ac74d034fdb1d243237831
tree528076c2058c248fb96418439c62c5a3474faf72
parent742824c4e78542c7e297c1f47aca116b235c115e
Part of <rdar://problem/8762095> and https://bugs.webkit.org/show_bug.cgi?id=55172
Need WebKit2 API to view/manage origins with LocalStorage.

Reviewed by Sam Weinig and looked over by Brian Weinstein.

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

WK2 derived sources and API stuff:
* DerivedSources.make:
* DerivedSources.pro:
* Platform/CoreIPC/MessageID.h:
* Shared/API/c/WKBase.h:
* Shared/APIObject.h:
* UIProcess/API/C/WKAPICast.h:

Add an KeyValueStorageManager to the context and invalidate it at the appropriate times:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::WebContext::~WebContext):
(WebKit::WebContext::disconnectProcess):
(WebKit::WebContext::didReceiveMessage):
* UIProcess/WebContext.h:
(WebKit::WebContext::keyValueStorageManagerProxy):

Add API to get the KeyValueStorageManager for a context:
* UIProcess/API/C/WKContext.cpp:
(WKContextGetKeyValueStorageManager):
* UIProcess/API/C/WKContext.h:

Route messages to the right place:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didReceiveMessage):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didReceiveMessage):

Add the API object, which wraps to WebKeyValueStorageManagerProxy:
* UIProcess/API/C/WKKeyValueStorageManager.cpp: Added.
(WKKeyValueStorageManagerGetTypeID):
(WKKeyValueStorageManagerGetKeyValueStorageOrigins):
(WKKeyValueStorageManagerDeleteEntriesForOrigin):
(WKKeyValueStorageManagerDeleteAllEntries):
* UIProcess/API/C/WKKeyValueStorageManager.h: Added.

The UIProcess implementation of the manager to send messages to the WebProcess and pipe a callback back up to the client:
* UIProcess/WebKeyValueStorageManagerProxy.cpp: Added.
(WebKit::WebKeyValueStorageManagerProxy::create):
(WebKit::WebKeyValueStorageManagerProxy::WebKeyValueStorageManagerProxy):
(WebKit::WebKeyValueStorageManagerProxy::~WebKeyValueStorageManagerProxy):
(WebKit::WebKeyValueStorageManagerProxy::invalidate):
(WebKit::WebKeyValueStorageManagerProxy::didReceiveMessage):
(WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins):
(WebKit::WebKeyValueStorageManagerProxy::didGetKeyValueStorageOrigins):
(WebKit::WebKeyValueStorageManagerProxy::deleteEntriesForOrigin):
(WebKit::WebKeyValueStorageManagerProxy::deleteAllEntries):
* UIProcess/WebKeyValueStorageManagerProxy.h: Added.
(WebKit::WebKeyValueStorageManagerProxy::clearContext):
(WebKit::WebKeyValueStorageManagerProxy::type):
* UIProcess/WebKeyValueStorageManagerProxy.messages.in: Added.

The WebProcess implementation to response to UIProcess messages and actually do the dirty-work in WebCore:
* WebProcess/KeyValueStorage: Added.
* WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp: Added.
(WebKit::WebKeyValueStorageManager::shared):
(WebKit::WebKeyValueStorageManager::WebKeyValueStorageManager):
(WebKit::WebKeyValueStorageManager::didReceiveMessage):
(WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
(WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
(WebKit::WebKeyValueStorageManager::deleteAllEntries):
* WebProcess/KeyValueStorage/WebKeyValueStorageManager.h: Added.
* WebProcess/KeyValueStorage/WebKeyValueStorageManager.messages.in: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@79654 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/WKKeyValueStorageManager.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/API/C/WKKeyValueStorageManager.h [new file with mode: 0644]
Source/WebKit2/UIProcess/WebContext.cpp
Source/WebKit2/UIProcess/WebContext.h
Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.h [new file with mode: 0644]
Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.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/KeyValueStorage/WebKeyValueStorageManager.cpp [new file with mode: 0644]
Source/WebKit2/WebProcess/KeyValueStorage/WebKeyValueStorageManager.h [new file with mode: 0644]
Source/WebKit2/WebProcess/KeyValueStorage/WebKeyValueStorageManager.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