Show label for offscreen webview
This commit is contained in:
parent
e644e883ba
commit
1a80cb22b7
3 changed files with 13 additions and 5 deletions
|
@ -224,11 +224,11 @@ InspectableWebContentsImpl::InspectableWebContentsImpl(
|
|||
gfx::Rect display;
|
||||
if (web_contents->GetNativeView()) {
|
||||
display = display::Screen::GetScreen()->
|
||||
GetDisplayNearestWindow(web_contents->GetNativeView()).bounds();
|
||||
GetDisplayNearestWindow(web_contents->GetNativeView()).bounds();
|
||||
} else {
|
||||
display = display::Screen::GetScreen()->GetPrimaryDisplay().bounds();
|
||||
}
|
||||
|
||||
|
||||
devtools_bounds_.set_x(display.x() + (display.width() - devtools_bounds_.width()) / 2);
|
||||
devtools_bounds_.set_y(display.y() + (display.height() - devtools_bounds_.height()) / 2);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue