• Andrew Xu's avatar
    Fix the issue that no shelf icons show on the external display · 44057dc0
    Andrew Xu authored
    Scrollable shelf updates its layout when a shelf icon is added to
    shelf view as a child. When an external display is connected, shelf
    view of the external display should add shelf icons during shelf view
    initialization. However, ShelfView::Init is called before shelf view
    becomes the grand child of ScrollableShelfView. As a result,
    scrollable shelf cannot perceive the change in view hierarchy.
    
    This CL makes the initialization of shelf view be the last step of
    ScrollableShelfView::Init. It also fixes the side effect brought by
    reordering of child views' initialization.
    
    Bug: 1035596
    Change-Id: Ice08606d34b5af725157602c0038d995df2d36ab
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1984725
    Commit-Queue: Andrew Xu <andrewxu@chromium.org>
    Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#728252}
    44057dc0
hotseat_widget.cc 13.2 KB