Merge pull request #2879 from deepak1556/web_contents_visibility_patch

browser: notify webcontents hidden when window not shown
This commit is contained in:
Cheng Zhao 2015-09-24 18:00:25 +08:00
commit 10731de9d6
3 changed files with 30 additions and 1 deletions

View file

@ -159,8 +159,13 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) {
// Then show it.
bool show = true;
options.Get(switches::kShow, &show);
if (show)
if (show) {
Show();
} else {
// When RenderView is created it sets to visible, this is to prevent
// breaking the visibility API.
web_contents()->WasHidden();
}
}
void NativeWindow::SetSize(const gfx::Size& size) {