Index: content/browser/devtools/worker_devtools_agent_host.cc |
diff --git a/content/browser/devtools/worker_devtools_agent_host.cc b/content/browser/devtools/worker_devtools_agent_host.cc |
index 32cd668e3d68e34f498aa986d4d18cdaa5f304af..fe6a4881b17b227496a6a93fb2187d010aefc388 100644 |
--- a/content/browser/devtools/worker_devtools_agent_host.cc |
+++ b/content/browser/devtools/worker_devtools_agent_host.cc |
@@ -21,7 +21,8 @@ void WorkerDevToolsAgentHost::Attach() { |
AttachToWorker(); |
} |
if (RenderProcessHost* host = RenderProcessHost::FromID(worker_id_.first)) |
- host->Send(new DevToolsAgentMsg_Attach(worker_id_.second, GetId())); |
+ host->Send( |
+ new DevToolsAgentMsg_Attach(worker_id_.second, GetId(), SessionId())); |
OnAttachedStateChanged(true); |
DevToolsAgentHostImpl::NotifyCallbacks(this, true); |
} |
@@ -45,12 +46,12 @@ bool WorkerDevToolsAgentHost::DispatchProtocolMessage( |
return true; |
int call_id; |
- if (protocol_handler_->HandleOptionalMessage(message, &call_id)) |
+ if (protocol_handler_->HandleOptionalMessage(SessionId(), message, &call_id)) |
return true; |
if (RenderProcessHost* host = RenderProcessHost::FromID(worker_id_.first)) { |
host->Send(new DevToolsAgentMsg_DispatchOnInspectorBackend( |
- worker_id_.second, message)); |
+ worker_id_.second, SessionId(), message)); |
} |
return true; |
} |
@@ -82,8 +83,9 @@ void WorkerDevToolsAgentHost::WorkerReadyForInspection() { |
state_ = WORKER_INSPECTED; |
AttachToWorker(); |
if (RenderProcessHost* host = RenderProcessHost::FromID(worker_id_.first)) { |
- host->Send(new DevToolsAgentMsg_Reattach( |
- worker_id_.second, GetId(), chunk_processor_.state_cookie())); |
+ host->Send( |
+ new DevToolsAgentMsg_Reattach(worker_id_.second, GetId(), SessionId(), |
+ chunk_processor_.state_cookie())); |
} |
OnAttachedStateChanged(true); |
} |
@@ -101,9 +103,9 @@ void WorkerDevToolsAgentHost::WorkerDestroyed() { |
if (state_ == WORKER_INSPECTED) { |
DCHECK(IsAttached()); |
// Client host is debugging this worker agent host. |
- base::Callback<void(const std::string&)> raw_message_callback( |
+ base::Callback<void(int, const std::string&)> raw_message_callback( |
base::Bind(&WorkerDevToolsAgentHost::SendMessageToClient, |
- base::Unretained(this))); |
+ base::Unretained(this))); |
devtools::inspector::Client inspector(raw_message_callback); |
inspector.TargetCrashed( |
devtools::inspector::TargetCrashedParams::Create()); |
@@ -117,15 +119,13 @@ bool WorkerDevToolsAgentHost::IsTerminated() { |
return state_ == WORKER_TERMINATED; |
} |
-WorkerDevToolsAgentHost::WorkerDevToolsAgentHost( |
- WorkerId worker_id) |
+WorkerDevToolsAgentHost::WorkerDevToolsAgentHost(WorkerId worker_id) |
: protocol_handler_(new DevToolsProtocolHandler( |
this, |
base::Bind(&WorkerDevToolsAgentHost::SendMessageToClient, |
base::Unretained(this)))), |
- chunk_processor_( |
- base::Bind(&WorkerDevToolsAgentHost::SendMessageToClient, |
- base::Unretained(this))), |
+ chunk_processor_(base::Bind(&WorkerDevToolsAgentHost::SendMessageToClient, |
+ base::Unretained(this))), |
state_(WORKER_UNINSPECTED), |
worker_id_(worker_id) { |
WorkerCreated(); |