DescriptionMake KitkatCaptioningBridge a singleton
Currently each ContentViewCore creates a KitkatCaptioningBridge on K+ devices.
And all of them listens to the system CaptioningManager.
So whenever the system captioning changes, all ContentViewCores will have to handle it separately.
This change simplifies that process by making KitkatCaptioningBridge a singleton.
All ContentViewCores become listeners to that singleton.
Whenever system captioning changes, a single CaptioningChangeDelegate class will handle the change.
It will then inform all ContentViewCores that are alive.
If all ContentViewCores are GC'ed, KitkatCaptioningBridge will stop listen to system CaptioningManager.
BUG=457850
Committed: https://crrev.com/ef83a816a5494cc0eb6b6f6ae7a22464b7624f3d
Cr-Commit-Position: refs/heads/master@{#330408}
Patch Set 1 #
Total comments: 2
Patch Set 2 : remove unused singleton #Messages
Total messages: 9 (3 generated)
|