WebKit2: Add additional API for managing databases
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 27 Dec 2010 19:17:31 +0000 (19:17 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 27 Dec 2010 19:17:31 +0000 (19:17 +0000)
commit5b8e152da9f2634dfb268caa5e8f8c9f3d56f873
treeb676e84469896e54d6e0fa7472e2c7c999a9fcec
parentc935fb333e3494ede61b7dc37a6b85c9d9eca8ca
WebKit2: Add additional API for managing databases
https://bugs.webkit.org/show_bug.cgi?id=51629

Reviewed by Anders Carlsson.

- Adds WKDatabaseManagerGetDatabasesByOrigin, which asynchronously returns
  an array of dictionaries containing details about each origin using
  databases and details about each database. Keys were added for accessing
  the data in the dictionaries.
- Adds WKDatabaseManagerDeleteDatabasesWithNameForOrigin to delete a database
  with a specific identifier.
- Adds WKDatabaseManagerSetQuotaForOrigin to set the quota for an origin.

* Shared/OriginAndDatabases.cpp: Added.
(WebKit::OriginAndDatabases::encode):
(WebKit::OriginAndDatabases::decode):
* Shared/OriginAndDatabases.h: Added.
* Shared/WebCoreArgumentCoders.h:
* UIProcess/API/C/WKDatabaseManager.cpp:
(WKDatabaseManagerGetOriginKey):
(WKDatabaseManagerGetOriginQuotaKey):
(WKDatabaseManagerGetOriginUsageKey):
(WKDatabaseManagerGetDatabaseDetailsKey):
(WKDatabaseManagerGetDatabaseDetailsNameKey):
(WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
(WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
(WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
(WKDatabaseManagerGetDatabasesByOrigin):
(callGetDatabasesByOriginBlockAndDispose):
(WKDatabaseManagerGetDatabasesByOrigin_b):
(WKDatabaseManagerGetDatabaseOrigins):
(callGetDatabaseOriginsBlockBlockAndDispose):
(WKDatabaseManagerGetDatabaseOrigins_b):
(WKDatabaseManagerDeleteDatabasesWithNameForOrigin):
(WKDatabaseManagerDeleteDatabasesForOrigin):
(WKDatabaseManagerDeleteAllDatabases):
(WKDatabaseManagerSetQuotaForOrigin):
* UIProcess/API/C/WKDatabaseManager.h:
* UIProcess/WebDatabaseManagerProxy.cpp:
(WebKit::WebDatabaseManagerProxy::originKey):
(WebKit::WebDatabaseManagerProxy::originQuotaKey):
(WebKit::WebDatabaseManagerProxy::originUsageKey):
(WebKit::WebDatabaseManagerProxy::databaseDetailsKey):
(WebKit::WebDatabaseManagerProxy::databaseDetailsNameKey):
(WebKit::WebDatabaseManagerProxy::databaseDetailsDisplayNameKey):
(WebKit::WebDatabaseManagerProxy::databaseDetailsExpectedUsageKey):
(WebKit::WebDatabaseManagerProxy::databaseDetailsCurrentUsageKey):
(WebKit::WebDatabaseManagerProxy::invalidate):
(WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin):
(WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
(WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
(WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
(WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
(WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
(WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):
* UIProcess/WebDatabaseManagerProxy.h:
* UIProcess/WebDatabaseManagerProxy.messages.in:
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
(WebKit::WebDatabaseManager::getDatabasesByOrigin):
(WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin):
(WebKit::WebDatabaseManager::setQuotaForOrigin):
* WebProcess/WebCoreSupport/WebDatabaseManager.h:
* WebProcess/WebCoreSupport/WebDatabaseManager.messages.in:
* win/WebKit2.vcproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@74690 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
WebKit2/ChangeLog
WebKit2/Shared/OriginAndDatabases.cpp [new file with mode: 0644]
WebKit2/Shared/OriginAndDatabases.h [new file with mode: 0644]
WebKit2/Shared/WebCoreArgumentCoders.h
WebKit2/UIProcess/API/C/WKDatabaseManager.cpp
WebKit2/UIProcess/API/C/WKDatabaseManager.h
WebKit2/UIProcess/WebDatabaseManagerProxy.cpp
WebKit2/UIProcess/WebDatabaseManagerProxy.h
WebKit2/UIProcess/WebDatabaseManagerProxy.messages.in
WebKit2/WebKit2.pro
WebKit2/WebKit2.xcodeproj/project.pbxproj
WebKit2/WebProcess/WebCoreSupport/WebDatabaseManager.cpp
WebKit2/WebProcess/WebCoreSupport/WebDatabaseManager.h
WebKit2/WebProcess/WebCoreSupport/WebDatabaseManager.messages.in
WebKit2/win/WebKit2.vcproj