2011-02-22 Brady Eidson <beidson@apple.com>
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Feb 2011 23:22:24 +0000 (23:22 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Feb 2011 23:22:24 +0000 (23:22 +0000)
commit341664078d494d2f046d612cf173adc24048df57
treefadbb6b88aa9b04b899546c11859b037ed567426
parent7f832468390b55b00816ad8f4effb930d30b4cba
2011-02-22  Brady Eidson  <beidson@apple.com>

        Reviewed by Anders Carlsson and looked over by Brian Weinstein.

        <rdar://problem/8762042> and https://bugs.webkit.org/show_bug.cgi?id=54514
        API to view and delete Application Cache data by origin.

        I couldn't help myself - I also re-alphabetized WebResourceCacheManager in many places where
        it's sorting was wrong due to a last minute name change.

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

        WK2 build-system and API paperwork:
        * DerivedSources.make:
        * Platform/CoreIPC/MessageID.h:
        * Shared/API/c/WKBase.h:
        * Shared/APIObject.h:
        * UIProcess/API/C/WKAPICast.h:

        Add a helper to perform an ArrayCallback with a Vector of SecurityOriginDatas:
        * Shared/SecurityOriginData.cpp:
        (WebKit::performAPICallbackWithSecurityOriginDataVector):
        * Shared/SecurityOriginData.h:
        * UIProcess/WebResourceCacheManagerProxy.cpp:
        (WebKit::WebResourceCacheManagerProxy::didGetCacheOrigins): Use performAPICallbackWithSecurityOriginDataVector here.

        Add an ApplicationCacheManagerProxy to the context and invalidate it at the appropriate times:
        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::WebContext):
        (WebKit::WebContext::~WebContext):
        (WebKit::WebContext::processDidClose):
        (WebKit::WebContext::didReceiveMessage): Route messages to the right proxy.
        * UIProcess/WebContext.h:
        (WebKit::WebContext::applicationCacheManagerProxy):
        (WebKit::WebContext::resourceCacheManagerProxy):

        Add API to get the ApplicationCacheManager for a context:
        * UIProcess/API/C/WKContext.cpp:
        (WKContextGetApplicationCacheManager):
        (WKContextGetResourceCacheManager):
        * 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 WebApplicationCacheManagerProxy:
        * UIProcess/API/C/WKApplicationCacheManager.cpp: Added.
        (WKApplicationCacheManagerGetTypeID):
        (WKApplicationCacheManagerGetApplicationCacheOrigins):
        (WKApplicationCacheManagerDeleteEntriesForOrigin):
        (WKApplicationCacheManagerDeleteAllEntries):
        * UIProcess/API/C/WKApplicationCacheManager.h: Added.

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

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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@79366 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebURLRequest.cpp
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/WebContext.cpp
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebProcessManager.cpp [deleted file]
Source/WebKit2/UIProcess/WebProcessManager.h [deleted file]
Source/WebKit2/UIProcess/WebProcessProxy.cpp
Source/WebKit2/WebKit2.pro
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/win/WebKit2.vcproj