File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -438,19 +438,19 @@ void Shell::ShowDevTools(const char* jail_id, bool headless) {
438
438
439
439
ShellDevToolsDelegate* delegate =
440
440
browser_client->shell_browser_main_parts ()->devtools_delegate ();
441
- GURL url = delegate->devtools_http_handler ()->GetFrontendURL ();
442
441
DevToolsHttpHandlerImpl* http_handler = static_cast <DevToolsHttpHandlerImpl*>(delegate->devtools_http_handler ());
443
442
http_handler->EnumerateTargets ();
444
443
444
+ GURL url;
445
445
if (headless) {
446
- url = delegate->devtools_http_handler ()->GetFrontendURL ();
447
- DevToolsHttpHandlerImpl* http_handler = static_cast <DevToolsHttpHandlerImpl*>(delegate->devtools_http_handler ());
448
- http_handler->EnumerateTargets ();
446
+ url = delegate->devtools_http_handler ()->GetFrontendURL (agent.get ());
449
447
SendEvent (" devtools-opened" , url.spec ());
450
448
return ;
449
+ } else {
450
+ url = delegate->devtools_http_handler ()->GetFrontendURL ();
451
+ SendEvent (" devtools-opened" , url.spec ());
451
452
}
452
453
453
- SendEvent (" devtools-opened" , url.spec ());
454
454
// Use our minimum set manifest
455
455
base::DictionaryValue manifest;
456
456
manifest.SetBoolean (switches::kmToolbar, false );
You can’t perform that action at this time.
0 commit comments