• sangwoo.ko's avatar
    Remove TabStrip::PrepareForCloseAt() · 362c8025
    sangwoo.ko authored
    When removing tabs with mouse button, we'd like to know
    the next active tab so that we can tailor available_width_for_tabs_.
    But as PrepareForCloseAt() is called before the next tab is decided,
    we don't know that. So move this logic to RemoveTabAt() where we
    know it.
     And move other logic in PrepareCloseTabAt() is moved to CloseTab(),
     which triggered PrepareForCloseAt() via TabStripController::CloseTab().
    As TabStripController::CloseTab() was invoked only by
    TabStrip::CloseTab(), it's okay to move them to TabStrip::CloseTab().
    
    Bug: 856289
    Change-Id: I5eb7036da4214e92a218f20e8c09891ab9a11955
    Reviewed-on: https://chromium-review.googlesource.com/1119616
    Commit-Queue: Sang Woo Ko <sangwoo108@chromium.org>
    Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#572566}
    362c8025
tab_strip.h 27 KB