implement method on browser window

This commit is contained in:
deepak1556 2015-05-18 20:08:08 +05:30
parent 46d80e8f05
commit 9963ddc485
5 changed files with 23 additions and 1 deletions

View file

@ -317,6 +317,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();
}