From 443040e8d7c2f7092b19f49e4c3c8a35c6dd83db Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 19 Dec 2016 16:25:32 -0800 Subject: [PATCH] Call InspectElement directly on InspectableWebContents --- atom/browser/api/atom_api_web_contents.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 3d1c247c45..c4762c10b9 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -1062,10 +1062,7 @@ void WebContents::InspectElement(int x, int y) { if (!managed_web_contents()->GetDevToolsWebContents()) OpenDevTools(nullptr); - scoped_refptr agent( - content::DevToolsAgentHost::GetOrCreateFor(web_contents())); - // FIXME(zcbenz): Figure out how to implement this for Chrome 54. - agent->InspectElement(nullptr, x, y); + managed_web_contents()->InspectElement(x, y); } void WebContents::InspectServiceWorker() {