Fixes tab contents crash. This changes a number of things in dragged
. DraggedTabController now installs itself as the delegate of the
TabContents immediately. It needs to do this so that it can stay in
sync if the selected TabContents of the NavigationController
. DraggedTabController forwards changes to the selected TabContents to
the original delegate. This needs to be done so that the original
delegate can do any cleanup it needs to do. For example, Browser
needs to know if the tab contents changes so that it can remove
entries from its internal mapping of what TabContents need to be
updated. Similarly the TabStripModel needs to install a listener on
the new TabContents type.
. If the tab is destroyed while dragging we shouldn't set the
attached_tabstrip_ to NULL. Doing so results in invoking
source_tabstrip_->DestroyDraggedSourceTab(source_tab_), which is not
what should happen.
These changes are subtle, so give them a good think.
TEST=this is covered by chrome bot tests. But be sure and exercise tab
dragging in as many permutations as you can to make sure this
doesn't break anything.