Merge pull request #1719 from deepak1556/service_worker_patch
devtools: api to inspect service worker
This commit is contained in:
commit
4a376694b4
9 changed files with 41 additions and 1 deletions
|
@ -314,6 +314,17 @@ void NativeWindow::InspectElement(int x, int y) {
|
|||
agent->InspectElement(x, y);
|
||||
}
|
||||
|
||||
void NativeWindow::InspectServiceWorker() {
|
||||
for (const auto& agent_host : content::DevToolsAgentHost::GetOrCreateAll()) {
|
||||
if (agent_host->GetType() ==
|
||||
content::DevToolsAgentHost::TYPE_SERVICE_WORKER) {
|
||||
OpenDevTools(true);
|
||||
inspectable_web_contents()->AttachTo(agent_host);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void NativeWindow::FocusOnWebView() {
|
||||
GetWebContents()->GetRenderViewHost()->Focus();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue