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

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

Issue 985343002: DevTools: remove the WorkerDevToolsManager base - implementations are diverging. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed. 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 | « no previous file | content/browser/devtools/protocol/service_worker_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/devtools_agent_host_impl.cc
diff --git a/content/browser/devtools/devtools_agent_host_impl.cc b/content/browser/devtools/devtools_agent_host_impl.cc
index 5274b8376850c350bbf4280119cc8fcad1fd4267..4ac3b998857d25584c814963b448892d4c7bbe15 100644
--- a/content/browser/devtools/devtools_agent_host_impl.cc
+++ b/content/browser/devtools/devtools_agent_host_impl.cc
@@ -43,6 +43,21 @@ DevToolsAgentHost::List DevToolsAgentHost::GetOrCreateAll() {
return result;
}
+// Called on the UI thread.
+// static
+scoped_refptr<DevToolsAgentHost> DevToolsAgentHost::GetForWorker(
+ int worker_process_id,
+ int worker_route_id) {
+ if (scoped_refptr<DevToolsAgentHost> host =
+ SharedWorkerDevToolsManager::GetInstance()
+ ->GetDevToolsAgentHostForWorker(worker_process_id,
+ worker_route_id)) {
+ return host;
+ }
+ return ServiceWorkerDevToolsManager::GetInstance()
+ ->GetDevToolsAgentHostForWorker(worker_process_id, worker_route_id);
+}
+
DevToolsAgentHostImpl::DevToolsAgentHostImpl()
: id_(base::GenerateGUID()),
client_(NULL) {
« no previous file with comments | « no previous file | content/browser/devtools/protocol/service_worker_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698