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

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

Issue 988003002: DevTools: pick sw targets to attach to on the backend side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaselined Created 5 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/browser/devtools/worker_devtools_agent_host.h ('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 882ed378f2dbeb73660f9cad7ab948c0c8795177..15fadb27f3025590018005ac137cf4e57b097b08 100644
--- a/content/browser/devtools/worker_devtools_agent_host.cc
+++ b/content/browser/devtools/worker_devtools_agent_host.cc
@@ -65,11 +65,17 @@ bool WorkerDevToolsAgentHost::OnMessageReceived(
return handled;
}
+void WorkerDevToolsAgentHost::PauseForDebugOnStart() {
+ DCHECK(state_ == WORKER_UNINSPECTED);
+ state_ = WORKER_PAUSED_FOR_DEBUG_ON_START;
+}
+
+bool WorkerDevToolsAgentHost::IsPausedForDebugOnStart() {
+ return state_ == WORKER_PAUSED_FOR_DEBUG_ON_START;
+}
+
void WorkerDevToolsAgentHost::WorkerReadyForInspection() {
- if (state_ == WORKER_PAUSED_FOR_DEBUG_ON_START) {
- RenderProcessHost* rph = RenderProcessHost::FromID(worker_id_.first);
- Inspect(rph->GetBrowserContext());
- } else if (state_ == WORKER_PAUSED_FOR_REATTACH) {
+ if (state_ == WORKER_PAUSED_FOR_REATTACH) {
DCHECK(IsAttached());
state_ = WORKER_INSPECTED;
AttachToWorker();
« no previous file with comments | « content/browser/devtools/worker_devtools_agent_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698