Make DocumentTabModelImpl fire didSelectTab
DocumentTabModelImpl now fires didSelectTab to its observers. This is done in setLastShownId() instead of setIndex() for a few reasons: * setIndex() has the side effect of bringing Tabs forward, which you may not want. * setLastShownId() hopefully more faithfully tracks what Tab was last shown in the foreground, and is called by DocumentActivity.onResume(). This might still be incorrect (e.g. when opening a Tab in the background), but this is one of those weird cases where Android has two Activities in the foreground simultaneously. * It's really difficult to actually indicate what brings a Tab back to the foreground. Slap a TODO on there to actually fix it when an Observer actually needs to know the type. BUG=443772 Review URL: https://codereview.chromium.org/1039513003 Cr-Commit-Position: refs/heads/master@{#322519}
Showing
Please register or sign in to comment