WebContents without owner window should always open detached devtools

This commit is contained in:
Cheng Zhao 2016-05-17 22:39:18 +09:00
parent 998ce73ad9
commit d6cb84f8a3

View file

@ -866,7 +866,7 @@ void WebContents::OpenDevTools(mate::Arguments* args) {
return;
std::string state;
if (type_ == WEB_VIEW) {
if (type_ == WEB_VIEW || !owner_window()) {
state = "detach";
} else if (args && args->Length() == 1) {
bool detach = false;