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

Unified Diff: content/renderer/shared_worker/embedded_shared_worker_stub.cc

Issue 196503005: Make DevTools support for the embedded SharedWorker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: http://crrev.com/214343002 has landed. So I rebased. 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
Index: content/renderer/shared_worker/embedded_shared_worker_stub.cc
diff --git a/content/renderer/shared_worker/embedded_shared_worker_stub.cc b/content/renderer/shared_worker/embedded_shared_worker_stub.cc
index aa3452961fcb45034e71543e4854312a29b21c90..57cd279e547069b089404beb37528a9e5ea36606 100644
--- a/content/renderer/shared_worker/embedded_shared_worker_stub.cc
+++ b/content/renderer/shared_worker/embedded_shared_worker_stub.cc
@@ -21,13 +21,16 @@ EmbeddedSharedWorkerStub::EmbeddedSharedWorkerStub(
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),
- name_(name),
- runing_(false),
- url_(url) {
+ : route_id_(route_id), name_(name), runing_(false), url_(url) {
RenderThreadImpl::current()->AddSharedWorkerRoute(route_id_, this);
impl_ = blink::WebSharedWorker::create(this);
+ 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_));
impl_->startWorkerContext(url, name_,

Powered by Google App Engine
This is Rietveld 408576698