Add WebContents::Was(Un)Occluded.

WebContentsImpl::Was(Un)Occluded already existed. These methods called
RenderWidgetHostView::Was(Un)Occluded() on all RenderWidgetHostViews
in the WebContentsImpl's frame tree. RenderWidgetHostView::WasOccluded()
allows a view's renderer to be suspended.

This CL exposes these methods in WebContents so that they can be called
by resource_coordinator::TabManager when it detects that a
WebContents' parent window is occluded.

This CL also fixes WebContentsImpl::WasOccluded() so that if it's
called when the capturer count is > 0, the views are notified when
the capturer count becomes zero (instead of never).

Bug: 738387
Change-Id: Ic5619071441cde09acb62185eecf749b2a5a0e74
Reviewed-on: https://chromium-review.googlesource.com/628976
Commit-Queue: Francois Doray <[email protected]>
Reviewed-by: Chris Hamilton <[email protected]>
Reviewed-by: Jochen Eisinger <[email protected]>
Cr-Commit-Position: refs/heads/master@{#497570}
4 files changed