Fix possible race condition with updating close-tab/window key equivalents from a thread that's not the main thread. Go back to performSelector:withObject:afterDelay: if we are on the main thread because moving to performSelectorOnMainThread: made drag and drop really janky. BUG=37111, 37091, 32786 TEST=close-window/close tab command key regression testing, visuals dragging a tab should suck less. Review URL: http://codereview.chromium.org/668260
Fix possible race condition with updating close-tab/window key equivalents from a thread that's not the main thread. Go back to performSelector:withObject:afterDelay: if we are on the main thread because moving to performSelectorOnMainThread: made drag and drop really janky.
BUG=37111, 37091, 32786
TEST=close-window/close tab command key regression testing, visuals dragging a tab should suck less.
Review URL: http://codereview.chromium.org/668260

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

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