| Index: content/browser/devtools/ipc_devtools_agent_host.cc
|
| diff --git a/content/browser/devtools/ipc_devtools_agent_host.cc b/content/browser/devtools/ipc_devtools_agent_host.cc
|
| index 4fa45eba4a0601f7c4523e78292a585d1826a0d9..6c63898ca529c6faa001d61054d330d12418b6bb 100644
|
| --- a/content/browser/devtools/ipc_devtools_agent_host.cc
|
| +++ b/content/browser/devtools/ipc_devtools_agent_host.cc
|
| @@ -4,6 +4,9 @@
|
|
|
| #include "content/browser/devtools/ipc_devtools_agent_host.h"
|
|
|
| +#include "content/browser/devtools/service_worker_devtools_agent_host.h"
|
| +#include "content/browser/devtools/service_worker_devtools_manager.h"
|
| +
|
| namespace content {
|
|
|
| void IPCDevToolsAgentHost::Attach() {
|
| @@ -31,6 +34,18 @@ void IPCDevToolsAgentHost::InspectElement(int x, int y) {
|
| GetId(), x, y));
|
| }
|
|
|
| +void IPCDevToolsAgentHost::OpenWorkerInspector(BrowserContext* context,
|
| + const std::string& id) {
|
| + ServiceWorkerDevToolsAgentHost::List agent_hosts;
|
| + ServiceWorkerDevToolsManager::GetInstance()->AddAllAgentHosts(&agent_hosts);
|
| + for (auto host : agent_hosts) {
|
| + if (host->GetId() == id) {
|
| + host->Inspect(context);
|
| + return;
|
| + }
|
| + }
|
| +}
|
| +
|
| IPCDevToolsAgentHost::IPCDevToolsAgentHost()
|
| : message_buffer_size_(0) {
|
| }
|
|
|