Split out default tray icon from HoldingSpaceTrayIcon
Leaves HoldingSpaceTrayIcon to only handle the content forward icon. Adds another image view for the default icon, and lets HoldingSpaceTray manage which icon is visible. Removes holding space observation logic from HoldingSpaceTrayIcon to avoid duplicate event handling to avoid HoldingSpaceTrayIcon getting duplicate holding space model events - e.g. if the icon is created or initialized during OnHoldingSpaceModelAttached, and starts observing model changes itself, it may handle model attachment twice. Relying on HoldingSpaceTray to notify HoldingSpaceTrayIcon about model changes makes avoid such scenario easier. The end goal is to make HoldingSpaceTrayIcon not depend on individual holding space model changes, and just have an API that would specify the list of items whose previews should be shown in the tray icon - will be done in a follow-up. BUG=1142572 Change-Id: Iad3bc7089d2aec770e03ef88bf168d3e43f706da Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2586554 Commit-Queue: Toni Baržić <tbarzic@chromium.org> Reviewed-by:David Black <dmblack@google.com> Cr-Commit-Position: refs/heads/master@{#836273}
Showing
Please register or sign in to comment