• Nick Carter's avatar
    Introduce TableModelObserver::OnItemsMoved() and enhance ListSelectionModel::Move() · 21d285cc
    Nick Carter authored
    In TableModelObserver, support a OnItemsMoved() operation which indicates
    that a number of rows have been reordered in the model. In a subsequent CL,
    the TaskManagerTableModel will emit these, with the goal being to
    keep a tab properly selected during cross-process navigation.
    
    In TableView and its unittest, handle the OnItemsMoved() operation, by
    updating the ListSelectionModel as appropriate.
    
    In ListSelectionModel, Add a |length| parameter to Move, and provide
    an efficient implementation of this. Implement IncrementFrom() and
    DecrementFrom() in terms of the Move() operation. Add unittests that
    exercise Move().
    
    Bug: 527455
    Change-Id: I448bc18b2a3efbe6b2acb78d73ee350212bbf485
    Reviewed-on: https://chromium-review.googlesource.com/661757
    Commit-Queue: Nick Carter <nick@chromium.org>
    Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Reviewed-by: default avatarAhmed Fakhry <afakhry@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#502933}
    21d285cc
table_view_unittest.cc 44.7 KB