Add support for batched operations to WebStateList
Some observers of WebStateList are interested in grouping multiple mutations of the WebStateList as a single operation (e.g. "closing all tabs" or "restoring a session"). Add WillBeginBatchOperation() and BatchOperationEnded() methods to WebStateListObserver that can be used to detect those operations (and to avoid expensives UI events during the batch). Sending the notifications is managed by PerformBatchOperation that executes a callback surrounded by invoking the two methonds on the observers. Bug: 1014526 Change-Id: Ieb3ffa5ab349159b333dc651314aa594713ce94e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1865161 Commit-Queue: Sylvain Defresne <sdefresne@chromium.org> Reviewed-by:edchin <edchin@chromium.org> Auto-Submit: Sylvain Defresne <sdefresne@chromium.org> Cr-Commit-Position: refs/heads/master@{#706881}
Showing
Please register or sign in to comment