Stop TtsUtterance if its associated WebContents is destroyed
In https://chromium-review.googlesource.com/c/chromium/src/+/2261098 TtsUtteranceImpl started taking an optional WebContents in its constructor. When the WebContents is destroyed, the utterance is cleared and stopped from triggering tts. This change exposes this behavior up to c/p/b and cleans up AccessibilityManager which approximated this behavior by calling TtsController::Stop(). Some notable examples that benefit from this: - extensions that trigger tts utterances, when destroyed, stop those utterances - the tts settings webui, if closed, will stop tts utterances in progress Change-Id: I7169b7ea3093e24e093c6c478040d943f34353f5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2541002 Commit-Queue: David Tseng <dtseng@chromium.org> Reviewed-by:Avi Drissman <avi@chromium.org> Cr-Commit-Position: refs/heads/master@{#828529}
Showing
Please register or sign in to comment