Introduce TableModelObserver::OnItemsMoved() and enhance ListSelectionModel::Move()
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:Scott Violet <sky@chromium.org> Reviewed-by:
Ahmed Fakhry <afakhry@chromium.org> Cr-Commit-Position: refs/heads/master@{#502933}
Showing
Please register or sign in to comment