Fix an erroneous set of tab change notifications sent whenever closing a tab before the current one.  GetSelectedTabContents() was using the old |selected_index_|, which was no longer the selected tab, leading to bogus notifications, which in turn caused other problems.
Fix an erroneous set of tab change notifications sent whenever closing a tab before the current one.  GetSelectedTabContents() was using the old |selected_index_|, which was no longer the selected tab, leading to bogus notifications, which in turn caused other problems.

BUG=16753
TEST=Open Chrome.  Hit ctrl-t twice.  Type a few letters.  Middle click the tab to the left of the current tab (the first "New Tab" you opened).  Your typing should not disappear.
Review URL: http://codereview.chromium.org/276052

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@29233 0039d316-1c4b-4281-b951-d872f2087c98

hujiajie/pa-chromium,junmin-zhu/chromium-rivertrail,Chilledheart/chromium,dushu1203/chromium.src,timopulkkinen/BubbleFish,Chilledheart/chromium,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,dednal/chromium.src,hujiajie/pa-chromium,keishi/chromium,nacl-webkit/chrome_deps,mogoweb/chromium-crosswalk,mogoweb/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,keishi/chromium,Just-D/chromium-1,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk,rogerwang/chromium,hgl888/chromium-crosswalk-efl,ondra-novak/chromium.src,ondra-novak/chromium.src,jaruba/chromium.src,Fireblend/chromium-crosswalk,anirudhSK/chromium,anirudhSK/chromium,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,dushu1203/chromium.src,nacl-webkit/chrome_deps,junmin-zhu/chromium-rivertrail,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,rogerwang/chromium,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,nacl-webkit/chrome_deps,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,robclark/chromium,zcbenz/cefode-chromium,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,rogerwang/chromium,Jonekee/chromium.src,patrickm/chromium.src,ltilve/chromium,mogoweb/chromium-crosswalk,krieger-od/nwjs_chromium.src,chuan9/chromium-crosswalk,ChromiumWebApps/chromium,hujiajie/pa-chromium,chuan9/chromium-crosswalk,timopulkkinen/BubbleFish,junmin-zhu/chromium-rivertrail,keishi/chromium,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,rogerwang/chromium,markYoungH/chromium.src,dednal/chromium.src,rogerwang/chromium,ChromiumWebApps/chromium,junmin-zhu/chromium-rivertrail,ondra-novak/chromium.src,markYoungH/chromium.src,ltilve/chromium,crosswalk-project/chromium-crosswalk-efl,M4sse/chromium.src,chuan9/chromium-crosswalk,ondra-novak/chromium.src,fujunwei/chromium-crosswalk,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,Just-D/chromium-1,mohamed--abdel-maksoud/chromium.src,hujiajie/pa-chromium,Just-D/chromium-1,junmin-zhu/chromium-rivertrail,hgl888/chromium-crosswalk,ChromiumWebApps/chromium,keishi/chromium,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,pozdnyakov/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,Pluto-tv/chromium-crosswalk,junmin-zhu/chromium-rivertrail,Fireblend/chromium-crosswalk,markYoungH/chromium.src,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,Chilledheart/chromium,markYoungH/chromium.src,dednal/chromium.src,Chilledheart/chromium,crosswalk-project/chromium-crosswalk-efl,hujiajie/pa-chromium,pozdnyakov/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,patrickm/chromium.src,markYoungH/chromium.src,littlstar/chromium.src,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,jaruba/chromium.src,hujiajie/pa-chromium,pozdnyakov/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ltilve/chromium,anirudhSK/chromium,littlstar/chromium.src,Pluto-tv/chromium-crosswalk,patrickm/chromium.src,robclark/chromium,zcbenz/cefode-chromium,ondra-novak/chromium.src,fujunwei/chromium-crosswalk,Chilledheart/chromium,Just-D/chromium-1,ChromiumWebApps/chromium,hgl888/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,patrickm/chromium.src,rogerwang/chromium,anirudhSK/chromium,Jonekee/chromium.src,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,junmin-zhu/chromium-rivertrail,Just-D/chromium-1,dednal/chromium.src,M4sse/chromium.src,bright-sparks/chromium-spacewalk,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,M4sse/chromium.src,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,jaruba/chromium.src,ChromiumWebApps/chromium,rogerwang/chromium,dednal/chromium.src,ondra-novak/chromium.src,ChromiumWebApps/chromium,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,ChromiumWebApps/chromium,Jonekee/chromium.src,axinging/chromium-crosswalk,zcbenz/cefode-chromium,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,timopulkkinen/BubbleFish,timopulkkinen/BubbleFish,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,keishi/chromium,hgl888/chromium-crosswalk-efl,nacl-webkit/chrome_deps,Chilledheart/chromium,littlstar/chromium.src,Just-D/chromium-1,junmin-zhu/chromium-rivertrail,mogoweb/chromium-crosswalk,markYoungH/chromium.src,nacl-webkit/chrome_deps,krieger-od/nwjs_chromium.src,chuan9/chromium-crosswalk,anirudhSK/chromium,markYoungH/chromium.src,markYoungH/chromium.src,zcbenz/cefode-chromium,rogerwang/chromium,junmin-zhu/chromium-rivertrail,ltilve/chromium,keishi/chromium,Jonekee/chromium.src,jaruba/chromium.src,littlstar/chromium.src,jaruba/chromium.src,Fireblend/chromium-crosswalk,hujiajie/pa-chromium,Pluto-tv/chromium-crosswalk,zcbenz/cefode-chromium,axinging/chromium-crosswalk,timopulkkinen/BubbleFish,junmin-zhu/chromium-rivertrail,littlstar/chromium.src,timopulkkinen/BubbleFish,crosswalk-project/chromium-crosswalk-efl,markYoungH/chromium.src,ltilve/chromium,mogoweb/chromium-crosswalk,Fireblend/chromium-crosswalk,dednal/chromium.src,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,Chilledheart/chromium,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,mogoweb/chromium-crosswalk,krieger-od/nwjs_chromium.src,keishi/chromium,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk,ltilve/chromium,Just-D/chromium-1,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,robclark/chromium,markYoungH/chromium.src,anirudhSK/chromium,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,M4sse/chromium.src,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,zcbenz/cefode-chromium,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,axinging/chromium-crosswalk,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,robclark/chromium,robclark/chromium,PeterWangIntel/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,littlstar/chromium.src,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,timopulkkinen/BubbleFish,jaruba/chromium.src,Jonekee/chromium.src,ondra-novak/chromium.src,ondra-novak/chromium.src,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,robclark/chromium,fujunwei/chromium-crosswalk,bright-sparks/chromium-spacewalk,dednal/chromium.src,robclark/chromium,patrickm/chromium.src,hgl888/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,Jonekee/chromium.src,anirudhSK/chromium,ChromiumWebApps/chromium,dednal/chromium.src,jaruba/chromium.src,keishi/chromium,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,ltilve/chromium,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,anirudhSK/chromium,littlstar/chromium.src,Pluto-tv/chromium-crosswalk,patrickm/chromium.src,ChromiumWebApps/chromium,dushu1203/chromium.src,nacl-webkit/chrome_deps,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,timopulkkinen/BubbleFish,ondra-novak/chromium.src,nacl-webkit/chrome_deps,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,jaruba/chromium.src,ChromiumWebApps/chromium,bright-sparks/chromium-spacewalk,patrickm/chromium.src,keishi/chromium,M4sse/chromium.src,dednal/chromium.src,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,dednal/chromium.src,keishi/chromium,axinging/chromium-crosswalk,robclark/chromium,Fireblend/chromium-crosswalk,dushu1203/chromium.src,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,fujunwei/chromium-crosswalk,pozdnyakov/chromium-crosswalk,keishi/chromium,Jonekee/chromium.src,jaruba/chromium.src,markYoungH/chromium.src,Chilledheart/chromium,hujiajie/pa-chromium,ltilve/chromium,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,rogerwang/chromium,pozdnyakov/chromium-crosswalk,zcbenz/cefode-chromium,robclark/chromium,hujiajie/pa-chromium,hgl888/chromium-crosswalk,M4sse/chromium.src,dednal/chromium.src,hujiajie/pa-chromium,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,timopulkkinen/BubbleFish,Fireblend/chromium-crosswalk,hujiajie/pa-chromium,Just-D/chromium-1,robclark/chromium,littlstar/chromium.src,TheTypoMaster/chromium-crosswalk,zcbenz/cefode-chromium,M4sse/chromium.src,M4sse/chromium.src,Chilledheart/chromium,rogerwang/chromium,crosswalk-project/chromium-crosswalk-efl