commit | fe4a1775a29fa1918d74dbaf0c5310acb2ccd85d | [log] [tgz] |
---|---|---|
author | Francois Doray <[email protected]> | Sat Feb 17 04:17:09 2018 |
committer | Commit Bot <[email protected]> | Sat Feb 17 04:17:09 2018 |
tree | 41e69170e03dea971ea35e1a34000db73865ccf3 | |
parent | 9e9b798a4b878d81393adaddd515523b2010ec1a [diff] |
Expose occlusion in WebContents and WebContentsObserver. This CL: - Adds content::Visibility {VISIBLE, OCCLUDED, HIDDEN}. - Replaces bool WebContents::IsVisible(); with Visibility WebContents::GetVisibility(); - Replaces void WebContents::WasShown(); void WebContents::WasHidden(); with void WebContents::OnVisibilityChanged(Visibility); FAQ: - What is the meaning of VISIBLE, OCCLUDED or HIDDEN? https://chromium-review.googlesource.com/c/chromium/src/+/867511/17/content/public/browser/visibility.h - What should I consider when reviewing an updated call site? Before, WasShown()/WasHidden() were called for these transitions: visible or occluded -> hidden hidden -> visible or occluded Now, OnVisibilityChanged() is called for each of these transitions: VISIBLE -> OCCLUDED OCCLUDED -> VISIBLE HIDDEN -> VISIBLE: HIDDEN -> OCCLUDED VISIBLE -> HIDDEN OCCLUDED -> HIDDEN - Why a single OnVisibilityChanged observer method instead of WasShown/WasHidden/WasOccluded? Having a single method makes it clearer that visibility states are mutually exclusive. - Why do we need an OCCLUDED state? We plan to use it for metrics recording and to reduce resource usage in occluded tabs. This is important to improve the experience of users that use many windows. https://groups.google.com/a/google.com/d/msg/chrome-desktop/3Qp1857tqw4/E8Qp-YgoDQAJ Bug: 668690 Change-Id: I7a6aa905619f51f5d5463f583bdb4640d57aff00 Reviewed-on: https://chromium-review.googlesource.com/867511 Commit-Queue: François Doray <[email protected]> Reviewed-by: Sami Kyöstilä <[email protected]> Reviewed-by: Avi Drissman <[email protected]> Reviewed-by: Andrey Kosyakov <[email protected]> Reviewed-by: Michael Giuffrida <[email protected]> Reviewed-by: Ted Choc <[email protected]> Reviewed-by: Olga Sharonova <[email protected]> Reviewed-by: Robert Kaplow <[email protected]> Reviewed-by: Mike Wittman <[email protected]> Reviewed-by: rajendrant <[email protected]> Reviewed-by: Sébastien Marchand <[email protected]> Reviewed-by: Peter Kasting <[email protected]> Reviewed-by: Carlos Knippschild <[email protected]> Reviewed-by: Kevin McNee <[email protected]> Reviewed-by: Mathieu Perreault <[email protected]> Reviewed-by: Patti <[email protected]> Reviewed-by: Yuri Wiitala <[email protected]> Reviewed-by: Sergey Ulanov <[email protected]> Reviewed-by: Vaclav Brozek <[email protected]> Reviewed-by: Peter Beverloo <[email protected]> Reviewed-by: Bryan McQuade <[email protected]> Reviewed-by: Charlie Harrison <[email protected]> Reviewed-by: Kentaro Hara <[email protected]> Reviewed-by: Dominick Ng <[email protected]> Cr-Commit-Position: refs/heads/master@{#537529}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .