summaryrefslogtreecommitdiffstats
path: root/WebCore/storage/DatabaseThread.h
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:05:15 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:05:15 -0800
commit1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353 (patch)
tree4457a7306ea5acb43fe05bfe0973b1f7faf97ba2 /WebCore/storage/DatabaseThread.h
parent9364f22aed35e1a1e9d07c121510f80be3ab0502 (diff)
downloadexternal_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.zip
external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.gz
external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.bz2
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'WebCore/storage/DatabaseThread.h')
-rw-r--r--WebCore/storage/DatabaseThread.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/WebCore/storage/DatabaseThread.h b/WebCore/storage/DatabaseThread.h
index a95ca37..654c2dd 100644
--- a/WebCore/storage/DatabaseThread.h
+++ b/WebCore/storage/DatabaseThread.h
@@ -28,11 +28,11 @@
#ifndef DatabaseThread_h
#define DatabaseThread_h
-#include "MessageQueue.h"
-
+#include <wtf/Deque.h>
#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
-#include <wtf/Deque.h>
+#include <wtf/MessageQueue.h>
+#include <wtf/PassRefPtr.h>
#include <wtf/RefPtr.h>
namespace WebCore {
@@ -44,18 +44,20 @@ class Document;
class DatabaseThread : public ThreadSafeShared<DatabaseThread>
{
public:
- DatabaseThread(Document*);
+ static PassRefPtr<DatabaseThread> create(Document* doc) { return adoptRef(new DatabaseThread(doc)); }
~DatabaseThread();
bool start();
void requestTermination();
bool terminationRequested() const;
- void scheduleTask(DatabaseTask*);
- void scheduleImmediateTask(DatabaseTask*); // This just adds the task to the front of the queue - the caller needs to be extremely careful not to create deadlocks when waiting for completion.
+ void scheduleTask(PassRefPtr<DatabaseTask>);
+ void scheduleImmediateTask(PassRefPtr<DatabaseTask>); // This just adds the task to the front of the queue - the caller needs to be extremely careful not to create deadlocks when waiting for completion.
void unscheduleDatabaseTasks(Database*);
private:
+ DatabaseThread(Document*);
+
static void* databaseThreadStart(void*);
void* databaseThread();