Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2884)

Unified Diff: content/worker/websharedworker_stub.h

Issue 115713004: Move the worker script loading code to the worker process (phase:2/5) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move IPC_ENUM_TRAITS(blink::WebContentSecurityPolicyType) to content_param_traits_macros.h. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/websharedworker_proxy.cc ('k') | content/worker/websharedworker_stub.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/worker/websharedworker_stub.h
diff --git a/content/worker/websharedworker_stub.h b/content/worker/websharedworker_stub.h
index 66d11ea7b18a2d0e04aaff0c733ad35160ca3c9c..bde7cbae29609283a681bebbe14d995be1114dc3 100644
--- a/content/worker/websharedworker_stub.h
+++ b/content/worker/websharedworker_stub.h
@@ -14,18 +14,24 @@
#include "url/gurl.h"
namespace blink {
+class WebMessagePortChannel;
class WebSharedWorker;
}
namespace content {
class SharedWorkerDevToolsAgent;
+class WebMessagePortChannelImpl;
// This class creates a WebSharedWorker, and translates incoming IPCs to the
// appropriate WebSharedWorker APIs.
class WebSharedWorkerStub : public IPC::Listener {
public:
- WebSharedWorkerStub(const base::string16& name, int route_id,
+ WebSharedWorkerStub(const GURL& url,
+ const base::string16& name,
+ const base::string16& content_security_policy,
+ blink::WebContentSecurityPolicyType security_policy_type,
+ int route_id,
const WorkerAppCacheInitInfo& appcache_init_info);
// IPC::Listener implementation.
@@ -35,6 +41,9 @@ class WebSharedWorkerStub : public IPC::Listener {
// Invoked when the WebSharedWorkerClientProxy is shutting down.
void Shutdown();
+ void WorkerScriptLoaded();
+ void WorkerScriptLoadFailed();
+
// Called after terminating the worker context to make sure that the worker
// actually terminates (is not stuck in an infinite loop).
void EnsureWorkerContextTerminates();
@@ -74,11 +83,11 @@ class WebSharedWorkerStub : public IPC::Listener {
base::string16 name_;
bool started_;
GURL url_;
+ bool worker_script_loaded_;
scoped_ptr<SharedWorkerDevToolsAgent> worker_devtools_agent_;
- typedef std::pair<int, int> PendingConnectInfo;
- typedef std::vector<PendingConnectInfo> PendingConnectInfoList;
- PendingConnectInfoList pending_connects_;
+ typedef std::vector<blink::WebMessagePortChannel*> PendingChannelList;
+ PendingChannelList pending_channels_;
DISALLOW_COPY_AND_ASSIGN(WebSharedWorkerStub);
};
« no previous file with comments | « content/renderer/websharedworker_proxy.cc ('k') | content/worker/websharedworker_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698