[iOS] Use InfoBarIOS::Observer to update InfobarBadgeTabModel state.
This CL updates InfobarBadgeTabModel to use InfoBarIOS::Observer callbacks to detect infobar accept/revert events, deprecating the public API previously used to relay this information. Additionally, this CL decomposes observer functionality into internal classes in order to allow easily hooking up multiple scoped observers. Using nested classes also helps to minimize the publicly-accessible InfobarBadgeTabHelper API, preventing it from being misused. This CL also updates the badge models to be stored in an std::map to avoid the extra step of converting the InfobarType to an NSNumber to use for NSDictionary lookups. Bug: 1030357 Change-Id: I5f22f81fc8f1838b1cf235584390f7d5af54ea30 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1977026 Commit-Queue: Kurt Horimoto <kkhorimoto@chromium.org> Reviewed-by:Sergio Collazos <sczs@chromium.org> Cr-Commit-Position: refs/heads/master@{#727273}
Showing
Please register or sign in to comment