ambient: synchronize images among photo_views on multiple displays
When a new display is added during ambient mode, make sure that each image view has the same images. Prior behavior: * OnImagesReady internal display initializes -> {0*, _} * internal display receives immediate OnImageAdded -> {0*, 1} * external display is connected -> {0*, 1}, {0*, _} * OnImageAdded for image 2 -> {2, 1*}, {0*, 2} - external display does not switch image because none on deck * OnImageAdded for image 3 -> {2*, 3}, {3, 2*} New behavior: * OnImagesReady internal display initializes -> {0*, 1} * external display is connected -> {0*, 1}, {0*, 1} * OnImageAdded for image 2 -> {2, 1*}, {2, 1*} Initialize |PhotoView| with both images stored in |AmbientBackendModel| to guarantee they show images in the same order. When the second image is added, call |OnImagesReady| after |OnImageAdded| so that |PhotoView| does not receive an immediate |OnImageAdded| after being constructed. BUG=b:173229098 Cq-Include-Trybots: luci.chrome.try:linux-chromeos-chrome Change-Id: I0f47d9a1b3748d74502080da9f0011e013897393 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2547308 Commit-Queue: Jeffrey Young <cowmoo@chromium.org> Reviewed-by:Xiaohui Chen <xiaohuic@chromium.org> Reviewed-by:
Tao Wu <wutao@chromium.org> Cr-Commit-Position: refs/heads/master@{#837306}
Showing
Please register or sign in to comment