diff options
author | Steve Block <steveblock@google.com> | 2010-02-02 14:57:50 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-02-04 15:06:55 +0000 |
commit | d0825bca7fe65beaee391d30da42e937db621564 (patch) | |
tree | 7461c49eb5844ffd1f35d1ba2c8b7584c1620823 /WebCore/dom/ScriptExecutionContext.h | |
parent | 3db770bd97c5a59b6c7574ca80a39e5a51c1defd (diff) | |
download | external_webkit-d0825bca7fe65beaee391d30da42e937db621564.zip external_webkit-d0825bca7fe65beaee391d30da42e937db621564.tar.gz external_webkit-d0825bca7fe65beaee391d30da42e937db621564.tar.bz2 |
Merge webkit.org at r54127 : Initial merge by git
Change-Id: Ib661abb595522f50ea406f72d3a0ce17f7193c82
Diffstat (limited to 'WebCore/dom/ScriptExecutionContext.h')
-rw-r--r-- | WebCore/dom/ScriptExecutionContext.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/WebCore/dom/ScriptExecutionContext.h b/WebCore/dom/ScriptExecutionContext.h index cf332c3..709bc69 100644 --- a/WebCore/dom/ScriptExecutionContext.h +++ b/WebCore/dom/ScriptExecutionContext.h @@ -33,11 +33,17 @@ #include <wtf/HashSet.h> #include <wtf/PassOwnPtr.h> #include <wtf/PassRefPtr.h> +#include <wtf/RefPtr.h> #include <wtf/Threading.h> namespace WebCore { class ActiveDOMObject; +#if ENABLE(DATABASE) + class Database; + class DatabaseTaskSynchronizer; + class DatabaseThread; +#endif class DOMTimer; class MessagePort; class SecurityOrigin; @@ -59,6 +65,19 @@ namespace WebCore { virtual bool isDocument() const { return false; } virtual bool isWorkerContext() const { return false; } +#if ENABLE(DATABASE) + virtual bool isDatabaseReadOnly() const = 0; + virtual void databaseExceededQuota(const String& name) = 0; + DatabaseThread* databaseThread(); + void setHasOpenDatabases() { m_hasOpenDatabases = true; } + bool hasOpenDatabases() const { return m_hasOpenDatabases; } + void addOpenDatabase(Database*); + void removeOpenDatabase(Database*); + // When the database cleanup is done, cleanupSync will be signalled. + void stopDatabases(DatabaseTaskSynchronizer*); +#endif + virtual bool isContextThread() const = 0; + const KURL& url() const { return virtualURL(); } KURL completeURL(const String& url) const { return virtualCompleteURL(url); } @@ -97,6 +116,8 @@ namespace WebCore { public: virtual ~Task(); virtual void performTask(ScriptExecutionContext*) = 0; + // Certain tasks get marked specially so that they aren't discarded, and are executed, when the context is shutting down its message queue. + virtual bool isCleanupTask() const { return false; } }; virtual void postTask(PassOwnPtr<Task>) = 0; // Executes the task on context's thread asynchronously. @@ -129,6 +150,13 @@ namespace WebCore { virtual void refScriptExecutionContext() = 0; virtual void derefScriptExecutionContext() = 0; + +#if ENABLE(DATABASE) + RefPtr<DatabaseThread> m_databaseThread; + bool m_hasOpenDatabases; // This never changes back to false, even after the database thread is closed. + typedef HashSet<Database* > DatabaseSet; + OwnPtr<DatabaseSet> m_openDatabaseSet; +#endif }; } // namespace WebCore |