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

Unified Diff: content/worker/websharedworker_stub.cc

Issue 213423008: Add pause_on_start flag to WorkerProcessMsg_CreateWorker_Params. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporated yurys's comment Created 6 years, 9 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/worker/websharedworker_stub.h ('k') | content/worker/worker_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/worker/websharedworker_stub.cc
diff --git a/content/worker/websharedworker_stub.cc b/content/worker/websharedworker_stub.cc
index fd33a61a22c4e7b332991564367f034be2a55539..474feb3070abf9e730f1ea5a31a701bcfa7989fa 100644
--- a/content/worker/websharedworker_stub.cc
+++ b/content/worker/websharedworker_stub.cc
@@ -23,6 +23,7 @@ WebSharedWorkerStub::WebSharedWorkerStub(
const base::string16& name,
const base::string16& content_security_policy,
blink::WebContentSecurityPolicyType security_policy_type,
+ bool pause_on_start,
int route_id)
: route_id_(route_id),
client_(route_id, this),
@@ -37,6 +38,11 @@ WebSharedWorkerStub::WebSharedWorkerStub(
// TODO(atwilson): Add support for NaCl when they support MessagePorts.
impl_ = blink::WebSharedWorker::create(client());
+ if (pause_on_start) {
+ // Pause worker context when it starts and wait until either DevTools client
+ // is attached or explicit resume notification is received.
+ impl_->pauseWorkerContextOnStart();
+ }
worker_devtools_agent_.reset(new SharedWorkerDevToolsAgent(route_id, impl_));
client()->set_devtools_agent(worker_devtools_agent_.get());
impl_->startWorkerContext(url_, name,
« no previous file with comments | « content/worker/websharedworker_stub.h ('k') | content/worker/worker_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698