WebCore:
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Nov 2007 22:27:14 +0000 (22:27 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Nov 2007 22:27:14 +0000 (22:27 +0000)
commitc7deb03009870d465531765a12c036e6e3170e6f
treef30071461ffe66b9e096ae69e3772bc32f862656
parente91ed1c948628c03873c9bded0a2a06267846698
WebCore:

        Reviewed by John and Sam

        Stubbing out everything required for a WebKit API for databases

        Biggest change in WebCore is that we passed around SecurityOriginData as the representation
        of a SecurityOrigin, instead of a String or a SecurityOrigin itself (which is an opaque object
        that has a different purpose besides just hanging on to the data)

        * WebCore.base.exp:
        * WebCore.xcodeproj/project.pbxproj:

        * platform/SecurityOrigin.cpp:
        * platform/SecurityOrigin.h:
        * platform/SecurityOriginData.h: Added.  Simple object to encapsulate the 3
          pieces of data in the SecurityOrigin tuple
        (WebCore::SecurityOriginData::SecurityOriginData):
        (WebCore::SecurityOriginData::protocol):
        (WebCore::SecurityOriginData::host):
        (WebCore::SecurityOriginData::port):
        (WebCore::SecurityOriginData::toString): Simple concatenation of the 3 components,
          colon separated

        * storage/Database.cpp:
        (WebCore::Database::Database): Use SecurityOriginData instead

        * storage/DatabaseTracker.cpp:
        (WebCore::DatabaseTracker::fullPathForDatabase):
        (WebCore::DatabaseTracker::databaseNamesForOrigin):
        (WebCore::DatabaseTracker::deleteDatabasesWithOrigin):
        (WebCore::DatabaseTracker::deleteDatabase):
        * storage/DatabaseTracker.h:

        * storage/DatabaseTrackerClient.h: Added.  For dispatching notifications up to WebKit
        (WebCore::DatabaseTrackerClient::~DatabaseTrackerClient):

WebKit:

        Reviewed by John

        Stubbing out everything required for a WebKit API for databases

        * WebKit.xcodeproj/project.pbxproj:

WebKit/mac:

        Reviewed by John

        Stubbing out everything required for a WebKit API for databases

        These interfaces seem to provide everything we need for UI and management at the browser level

        * Misc/WebDatabaseManager.h: Removed.
        * Misc/WebDatabaseManager.mm: Removed.
        * Misc/WebDatabaseManagerPrivate.h: Removed.

        * Misc/WebSecurityOrigin.mm: Added. Object that acts as a container for the "SecurityOrigin tuple"
          (protocol, domain, and port)
        (-[WebSecurityOriginPrivate initWithProtocol:domain:port:]):
        (-[WebSecurityOriginPrivate dealloc]):
        (-[WebSecurityOrigin initWithProtocol:domain:]):
        (-[WebSecurityOrigin initWithProtocol:domain:port:]):
        (-[WebSecurityOrigin protocol]):
        (-[WebSecurityOrigin domain]):
        (-[WebSecurityOrigin port]):
        (-[WebSecurityOrigin dealloc]):
        (-[WebSecurityOrigin _initWithWebCoreSecurityOriginData:WebCore::]):
        * Misc/WebSecurityOriginInternal.h: Added.
        * Misc/WebSecurityOriginPrivate.h: Added.

        * Storage/WebDatabaseManager.mm: Added.
        (+[WebDatabaseManager sharedWebDatabaseManager]):
        (-[WebDatabaseManager origins]):  Get a list of all origins currently tracked
        (-[WebDatabaseManager detailsForOrigin:]): Get the current usage and current quota for the given origin
        (-[WebDatabaseManager databasesWithOrigin:]): Get all databases for a certain origin
        (-[WebDatabaseManager detailsForDatabase:withOrigin:]): Get all details about a specific database
        (-[WebDatabaseManager setQuota:forOrigin:]): Change origin-wide quota
        (-[WebDatabaseManager deleteAllDatabases]):
        (-[WebDatabaseManager deleteAllDatabasesWithOrigin:]):
        (-[WebDatabaseManager deleteDatabase:withOrigin:]):
        * Storage/WebDatabaseManagerPrivate.h: Added.
        * Storage/WebDatabaseManagerInternal.h: Added.
        (WebKitInitializeDatabasesIfNecessary): One-time initialization of database-related things

        * Storage/WebDatabaseTrackerClient.h: Added. Stubbed out client for notifications
        * Storage/WebDatabaseTrackerClient.mm: Added.
        (WebDatabaseTrackerClient::sharedWebDatabaseTrackerClient):
        (WebDatabaseTrackerClient::WebDatabaseTrackerClient):
        (WebDatabaseTrackerClient::~WebDatabaseTrackerClient):
        (WebDatabaseTrackerClient::dispatchDidModifyOrigin):
        (WebDatabaseTrackerClient::dispatchDidModifyDatabase):

        * WebView/WebView.mm:
        (-[WebView _commonInitializationWithFrameName:groupName:]): Do one-time initialization of
          Database-related things here

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27821 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed:
WebCore/ChangeLog
WebCore/WebCore.base.exp
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/platform/SecurityOrigin.cpp
WebCore/platform/SecurityOrigin.h
WebCore/platform/SecurityOriginData.h [new file with mode: 0644]
WebCore/storage/Database.cpp
WebCore/storage/DatabaseTracker.cpp
WebCore/storage/DatabaseTracker.h
WebCore/storage/DatabaseTrackerClient.h [new file with mode: 0644]
WebKit/ChangeLog
WebKit/WebKit.xcodeproj/project.pbxproj
WebKit/mac/ChangeLog
WebKit/mac/Misc/WebSecurityOrigin.mm [new file with mode: 0644]
WebKit/mac/Misc/WebSecurityOriginInternal.h [moved from WebKit/mac/Misc/WebDatabaseManager.h with 78% similarity]
WebKit/mac/Misc/WebSecurityOriginPrivate.h [new file with mode: 0644]
WebKit/mac/Storage/WebDatabaseManager.mm [moved from WebKit/mac/Misc/WebDatabaseManager.mm with 50% similarity]
WebKit/mac/Storage/WebDatabaseManagerInternal.h [moved from WebKit/mac/Misc/WebDatabaseManagerPrivate.h with 95% similarity]
WebKit/mac/Storage/WebDatabaseManagerPrivate.h [new file with mode: 0644]
WebKit/mac/Storage/WebDatabaseTrackerClient.h [new file with mode: 0644]
WebKit/mac/Storage/WebDatabaseTrackerClient.mm [new file with mode: 0644]
WebKit/mac/WebView/WebView.mm