summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium/src/WebWorkerBase.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/chromium/src/WebWorkerBase.h')
-rw-r--r--WebKit/chromium/src/WebWorkerBase.h42
1 files changed, 30 insertions, 12 deletions
diff --git a/WebKit/chromium/src/WebWorkerBase.h b/WebKit/chromium/src/WebWorkerBase.h
index 0217401..fe84bf7 100644
--- a/WebKit/chromium/src/WebWorkerBase.h
+++ b/WebKit/chromium/src/WebWorkerBase.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2010 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -34,6 +34,7 @@
#if ENABLE(WORKERS)
#include "ScriptExecutionContext.h"
+#include "WebFrameClient.h"
#include "WorkerLoaderProxy.h"
#include "WorkerObjectProxy.h"
#include <wtf/PassOwnPtr.h>
@@ -44,16 +45,22 @@ class WorkerThread;
}
namespace WebKit {
+class WebApplicationCacheHost;
+class WebApplicationCacheHostClient;
class WebCommonWorkerClient;
+class WebSecurityOrigin;
+class WebString;
class WebURL;
class WebView;
+class WebWorker;
class WebWorkerClient;
// Base class for WebSharedWorkerImpl and WebWorkerImpl. It contains common
// code used by both implementation classes, including implementations of the
// WorkerObjectProxy and WorkerLoaderProxy interfaces.
class WebWorkerBase : public WebCore::WorkerObjectProxy
- , public WebCore::WorkerLoaderProxy {
+ , public WebCore::WorkerLoaderProxy
+ , public WebFrameClient {
public:
WebWorkerBase();
virtual ~WebWorkerBase();
@@ -63,10 +70,10 @@ public:
PassRefPtr<WebCore::SerializedScriptValue>,
PassOwnPtr<WebCore::MessagePortChannelArray>);
virtual void postExceptionToWorkerObject(
- const WebCore::String&, int, const WebCore::String&);
+ const WTF::String&, int, const WTF::String&);
virtual void postConsoleMessageToWorkerObject(
- WebCore::MessageDestination, WebCore::MessageSource, WebCore::MessageType,
- WebCore::MessageLevel, const WebCore::String&, int, const WebCore::String&);
+ WebCore::MessageSource, WebCore::MessageType,
+ WebCore::MessageLevel, const WTF::String&, int, const WTF::String&);
virtual void confirmMessageFromWorkerObject(bool);
virtual void reportPendingActivity(bool);
virtual void workerContextClosed();
@@ -75,7 +82,19 @@ public:
// WebCore::WorkerLoaderProxy methods:
virtual void postTaskToLoader(PassOwnPtr<WebCore::ScriptExecutionContext::Task>);
virtual void postTaskForModeToWorkerContext(
- PassOwnPtr<WebCore::ScriptExecutionContext::Task>, const WebCore::String& mode);
+ PassOwnPtr<WebCore::ScriptExecutionContext::Task>, const WTF::String& mode);
+
+ // WebFrameClient methods to support resource loading thru the 'shadow page'.
+ virtual void didCreateDataSource(WebFrame*, WebDataSource*);
+ virtual WebApplicationCacheHost* createApplicationCacheHost(WebFrame*, WebApplicationCacheHostClient*);
+
+ // Controls whether access to Web Databases is allowed for this worker.
+ virtual bool allowDatabase(WebFrame*, const WebString& name, const WebString& displayName, unsigned long estimatedSize);
+
+#if ENABLE(FILE_SYSTEM)
+ // Requests to open a file system for this worker. (Note that this is not the implementation for WebFrameClient::openFileSystem.)
+ void openFileSystem(WebFileSystem::Type, long long size, WebFileSystemCallbacks*, bool synchronous);
+#endif
// Executes the given task on the main thread.
static void dispatchTaskToMainThread(PassOwnPtr<WebCore::ScriptExecutionContext::Task>);
@@ -101,24 +120,23 @@ private:
static void postMessageTask(
WebCore::ScriptExecutionContext* context,
WebWorkerBase* thisPtr,
- WebCore::String message,
+ WTF::String message,
PassOwnPtr<WebCore::MessagePortChannelArray> channels);
static void postExceptionTask(
WebCore::ScriptExecutionContext* context,
WebWorkerBase* thisPtr,
- const WebCore::String& message,
+ const WTF::String& message,
int lineNumber,
- const WebCore::String& sourceURL);
+ const WTF::String& sourceURL);
static void postConsoleMessageTask(
WebCore::ScriptExecutionContext* context,
WebWorkerBase* thisPtr,
- int destination,
int source,
int type,
int level,
- const WebCore::String& message,
+ const WTF::String& message,
int lineNumber,
- const WebCore::String& sourceURL);
+ const WTF::String& sourceURL);
static void confirmMessageTask(
WebCore::ScriptExecutionContext* context,
WebWorkerBase* thisPtr,