Make devtools API aware of devtools window.
This commit is contained in:
parent
6bd0b82b2e
commit
01b42c9e59
1 changed files with 6 additions and 2 deletions
|
@ -188,11 +188,15 @@ void NativeWindow::OpenDevTools() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindow::CloseDevTools() {
|
void NativeWindow::CloseDevTools() {
|
||||||
inspectable_web_contents()->GetView()->CloseDevTools();
|
if (devtools_window_)
|
||||||
|
devtools_window_->Close();
|
||||||
|
else
|
||||||
|
inspectable_web_contents()->GetView()->CloseDevTools();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindow::IsDevToolsOpened() {
|
bool NativeWindow::IsDevToolsOpened() {
|
||||||
return inspectable_web_contents()->IsDevToolsViewShowing();
|
return (devtools_window_ && devtools_window_->IsFocused()) ||
|
||||||
|
inspectable_web_contents()->IsDevToolsViewShowing();
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindow::InspectElement(int x, int y) {
|
void NativeWindow::InspectElement(int x, int y) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue