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

Unified Diff: content/browser/web_contents/web_contents_impl.h

Issue 1733173002: Mac: Make calling WebContents::WasShown/WasHidden the responsibility of the content layer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rollback unnecessary test diffs Created 4 years, 10 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_impl.h
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 79c0c86e2b34d8b5df32c2775f16e94cb3222efd..e1d457fcbf483477d0a65c148420a1d72a4fa729 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -728,6 +728,9 @@ class CONTENT_EXPORT WebContentsImpl
return media_web_contents_observer_.get();
}
+ // Update the web contents visibility.
+ void UpdateWebContentsVisibility(bool visible);
+
private:
friend class WebContentsObserver;
friend class WebContents; // To implement factory methods.
@@ -1166,6 +1169,11 @@ class CONTENT_EXPORT WebContentsImpl
// Tracks whether RWHV should be visible once capturer_count_ becomes zero.
bool should_normally_be_visible_;
+ // Background tabs are loaded with |should_normally_be_visible_| set, so that
+ // they actually load something, but then need to receive an initial
+ // WasShown() message when first switching to that tab.
Avi (use Gerrit) 2016/02/26 17:50:23 This is a rationale of _why_ we need this, but it'
tapted 2016/02/29 06:49:00 Done. Clarified it a bit. When it was just used fo
+ bool is_or_was_visible_;
+
// See getter above.
bool is_being_destroyed_;

Powered by Google App Engine
This is Rietveld 408576698