summaryrefslogtreecommitdiff
path: root/Source/WebCore/workers/WorkerGlobalScopeProxy.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/workers/WorkerGlobalScopeProxy.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/workers/WorkerGlobalScopeProxy.h')
-rw-r--r--Source/WebCore/workers/WorkerGlobalScopeProxy.h58
1 files changed, 20 insertions, 38 deletions
diff --git a/Source/WebCore/workers/WorkerGlobalScopeProxy.h b/Source/WebCore/workers/WorkerGlobalScopeProxy.h
index 0a300710a..1cff6b7dc 100644
--- a/Source/WebCore/workers/WorkerGlobalScopeProxy.h
+++ b/Source/WebCore/workers/WorkerGlobalScopeProxy.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -28,50 +29,31 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WorkerGlobalScopeProxy_h
-#define WorkerGlobalScopeProxy_h
+#pragma once
-#include "MessagePort.h"
-#include "WorkerThread.h"
-#include <wtf/Forward.h>
-#include <wtf/PassOwnPtr.h>
+#include "MessagePortChannel.h"
+#include <runtime/RuntimeFlags.h>
namespace WebCore {
- class URL;
- class Worker;
+class ContentSecurityPolicyResponseHeaders;
+class URL;
+class Worker;
- // A proxy to talk to the worker context.
- class WorkerGlobalScopeProxy {
- public:
- static WorkerGlobalScopeProxy* create(Worker*);
+// A proxy to talk to the worker context.
+class WorkerGlobalScopeProxy {
+public:
+ static WorkerGlobalScopeProxy& create(Worker&);
- virtual ~WorkerGlobalScopeProxy() { }
+ virtual void startWorkerGlobalScope(const URL& scriptURL, const String& userAgent, const String& sourceCode, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, MonotonicTime timeOrigin, JSC::RuntimeFlags) = 0;
+ virtual void terminateWorkerGlobalScope() = 0;
+ virtual void postMessageToWorkerGlobalScope(RefPtr<SerializedScriptValue>&&, std::unique_ptr<MessagePortChannelArray>) = 0;
+ virtual bool hasPendingActivity() const = 0;
+ virtual void workerObjectDestroyed() = 0;
+ virtual void notifyNetworkStateChange(bool isOnline) = 0;
- virtual void startWorkerGlobalScope(const URL& scriptURL, const String& userAgent, const String& sourceCode, WorkerThreadStartMode) = 0;
-
- virtual void terminateWorkerGlobalScope() = 0;
-
- virtual void postMessageToWorkerGlobalScope(PassRefPtr<SerializedScriptValue>, PassOwnPtr<MessagePortChannelArray>) = 0;
-
- virtual bool hasPendingActivity() const = 0;
-
- virtual void workerObjectDestroyed() = 0;
-
- virtual void notifyNetworkStateChange(bool isOnline) = 0;
-
-#if ENABLE(INSPECTOR)
- class PageInspector {
- public:
- virtual ~PageInspector() { }
- virtual void dispatchMessageFromWorker(const String&) = 0;
- };
- virtual void connectToInspector(PageInspector*) { }
- virtual void disconnectFromInspector() { }
- virtual void sendMessageToInspector(const String&) { }
-#endif
- };
+protected:
+ virtual ~WorkerGlobalScopeProxy() { }
+};
} // namespace WebCore
-
-#endif // WorkerGlobalScopeProxy_h