Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Unified Diff: content/browser/web_contents/web_contents_view_aura.cc

Issue 866443003: Push API: Don't require notification if tab is visible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ycm_outdir
Patch Set: Expose WebContents::IsHiddenIgnoringCapturing instead of PushMessagingService::IsWebContentsUserVis… Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/web_contents_view_aura.cc
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index 5b976ba1921edda335408986df99d93983e48370..01266589b0766e436797ae4c56ecdcc087ff1576 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -1631,10 +1631,10 @@ void WebContentsViewAura::UpdateWebContentsVisibility(bool visible) {
return;
}
if (visible) {
- if (!web_contents_->should_normally_be_visible())
+ if (!web_contents_->IsHiddenIgnoringCapturing())
web_contents_->WasShown();
} else {
- if (web_contents_->should_normally_be_visible())
+ if (web_contents_->IsHiddenIgnoringCapturing())
web_contents_->WasHidden();
}
}

Powered by Google App Engine
This is Rietveld 408576698