[go: nahoru, domu]

Refactor client visibility handling

Currently, ContextSupport::SetClientVisibile relies on the caller
remembering to pair visible/not-visible calls. Failure to do so will
result in a "leak", where the context support will always think there
are visible clients.

To avoid this, visibility handling now uses ScopedVisibility objects
which will dcheck if visible > not visible updates are not paired.

This change also introduces a new ContextCacheController object which
handles trimming context caches based on visibility. This simplifies
handling in clients of the ContextProvider and removes this logic
from ContextSupport.

CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

Review-Url: https://codereview.chromium.org/2278283003
Cr-Commit-Position: refs/heads/master@{#415491}
34 files changed