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

Unified Diff: content/browser/devtools/worker_devtools_agent_host.cc

Issue 2499343002: [DevTools] Introduce DevToolsSession. (Closed)
Patch Set: Created 4 years, 1 month 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/browser/devtools/render_frame_devtools_agent_host.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ec77e2f16c390307259f4954d2c6537cb49241f4..35276b809036dd488d3d660dd04365c1ceb110a9 100644
--- a/content/browser/devtools/worker_devtools_agent_host.cc
+++ b/content/browser/devtools/worker_devtools_agent_host.cc
@@ -6,6 +6,7 @@
#include "base/guid.h"
#include "content/browser/devtools/devtools_protocol_handler.h"
+#include "content/browser/devtools/devtools_session.h"
#include "content/browser/devtools/protocol/schema_handler.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_process_host.h"
@@ -22,9 +23,10 @@ void WorkerDevToolsAgentHost::Attach() {
state_ = WORKER_INSPECTED;
AttachToWorker();
}
- if (RenderProcessHost* host = RenderProcessHost::FromID(worker_id_.first))
- host->Send(
- new DevToolsAgentMsg_Attach(worker_id_.second, GetId(), session_id()));
+ if (RenderProcessHost* host = RenderProcessHost::FromID(worker_id_.first)) {
+ host->Send(new DevToolsAgentMsg_Attach(
+ worker_id_.second, GetId(), session()->session_id()));
+ }
OnAttachedStateChanged(true);
}
@@ -47,13 +49,13 @@ bool WorkerDevToolsAgentHost::DispatchProtocolMessage(
int call_id;
std::string method;
- if (protocol_handler_->HandleOptionalMessage(session_id(), message, &call_id,
- &method))
+ if (protocol_handler_->HandleOptionalMessage(session()->session_id(), message,
+ &call_id, &method))
return true;
if (RenderProcessHost* host = RenderProcessHost::FromID(worker_id_.first)) {
host->Send(new DevToolsAgentMsg_DispatchOnInspectorBackend(
- worker_id_.second, session_id(), call_id, method, message));
+ worker_id_.second, session()->session_id(), call_id, method, message));
}
return true;
}
@@ -86,7 +88,7 @@ void WorkerDevToolsAgentHost::WorkerReadyForInspection() {
AttachToWorker();
if (RenderProcessHost* host = RenderProcessHost::FromID(worker_id_.first)) {
host->Send(new DevToolsAgentMsg_Reattach(
- worker_id_.second, GetId(), session_id(),
+ worker_id_.second, GetId(), session()->session_id(),
chunk_processor_.state_cookie()));
}
OnAttachedStateChanged(true);
« no previous file with comments | « content/browser/devtools/render_frame_devtools_agent_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698