Don't open dev tools if already initialized
This commit is contained in:
parent
463b3de199
commit
21de91d6e2
1 changed files with 2 additions and 1 deletions
|
@ -1004,7 +1004,8 @@ void WebContents::InspectElement(int x, int y) {
|
||||||
if (type_ == REMOTE)
|
if (type_ == REMOTE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
OpenDevTools(nullptr);
|
if (!managed_web_contents()->GetDevToolsWebContents())
|
||||||
|
OpenDevTools(nullptr);
|
||||||
scoped_refptr<content::DevToolsAgentHost> agent(
|
scoped_refptr<content::DevToolsAgentHost> agent(
|
||||||
content::DevToolsAgentHost::GetOrCreateFor(web_contents()));
|
content::DevToolsAgentHost::GetOrCreateFor(web_contents()));
|
||||||
agent->InspectElement(x, y);
|
agent->InspectElement(x, y);
|
||||||
|
|
Loading…
Reference in a new issue