Fix for crash related to tab restore containing NPAPI plugins in metro/ash environment. This crash happens because as it stands right now, background tabs are not added in ash/shell root window hierarchy until they become active, but renderviewcreated notification is sent whenever tab views are created. We use renderviewcreated notification to block npapi plugin from loading if view is on ash/metro desktop. This CL modifies this logic with detection of last known active desktop.
Fix for crash related to tab restore containing NPAPI plugins in metro/ash environment. This crash happens because
as it stands right now, background tabs are not added in ash/shell root window hierarchy until they become active, but
renderviewcreated notification is sent whenever tab views are created. We use renderviewcreated notification to block
npapi plugin from loading if view is on ash/metro desktop. This CL modifies this logic with detection of last known active desktop.

This is a temporary fix as there could be instances on both desktop at the same time, which could break global state.

R=bauerb@chromium.org, cpu@chromium.org, ananta, cpu
TBR=bauerb@chromium.org
BUG=317940

Review URL: https://codereview.chromium.org/73153002

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

TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,patrickm/chromium.src,Chilledheart/chromium,ondra-novak/chromium.src,jaruba/chromium.src,dednal/chromium.src,chuan9/chromium-crosswalk,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,krieger-od/nwjs_chromium.src,patrickm/chromium.src,ltilve/chromium,littlstar/chromium.src,Chilledheart/chromium,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,ChromiumWebApps/chromium,ondra-novak/chromium.src,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,anirudhSK/chromium,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,dednal/chromium.src,ChromiumWebApps/chromium,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,Fireblend/chromium-crosswalk,ondra-novak/chromium.src,jaruba/chromium.src,PeterWangIntel/chromium-crosswalk,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,dushu1203/chromium.src,littlstar/chromium.src,krieger-od/nwjs_chromium.src,M4sse/chromium.src,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,anirudhSK/chromium,anirudhSK/chromium,hgl888/chromium-crosswalk,anirudhSK/chromium,jaruba/chromium.src,littlstar/chromium.src,jaruba/chromium.src,jaruba/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ondra-novak/chromium.src,Jonekee/chromium.src,patrickm/chromium.src,Jonekee/chromium.src,fujunwei/chromium-crosswalk,M4sse/chromium.src,Jonekee/chromium.src,PeterWangIntel/chromium-crosswalk,ltilve/chromium,fujunwei/chromium-crosswalk,ltilve/chromium,PeterWangIntel/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk,Just-D/chromium-1,littlstar/chromium.src,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,dushu1203/chromium.src,axinging/chromium-crosswalk,littlstar/chromium.src,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,dednal/chromium.src,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,ltilve/chromium,Fireblend/chromium-crosswalk,jaruba/chromium.src,axinging/chromium-crosswalk,patrickm/chromium.src,M4sse/chromium.src,markYoungH/chromium.src,ltilve/chromium,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,Just-D/chromium-1,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,fujunwei/chromium-crosswalk,markYoungH/chromium.src,ondra-novak/chromium.src,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,dednal/chromium.src,littlstar/chromium.src,M4sse/chromium.src,PeterWangIntel/chromium-crosswalk,ltilve/chromium,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,M4sse/chromium.src,anirudhSK/chromium,patrickm/chromium.src,markYoungH/chromium.src,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,dednal/chromium.src,ChromiumWebApps/chromium,markYoungH/chromium.src,ChromiumWebApps/chromium,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,anirudhSK/chromium,ondra-novak/chromium.src,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,M4sse/chromium.src,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,M4sse/chromium.src,Chilledheart/chromium,ltilve/chromium,axinging/chromium-crosswalk,M4sse/chromium.src,fujunwei/chromium-crosswalk,ChromiumWebApps/chromium,jaruba/chromium.src,dushu1203/chromium.src,bright-sparks/chromium-spacewalk,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk,patrickm/chromium.src,hgl888/chromium-crosswalk-efl,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,Just-D/chromium-1,chuan9/chromium-crosswalk,Just-D/chromium-1,Jonekee/chromium.src,dednal/chromium.src,anirudhSK/chromium,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk-efl,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,ChromiumWebApps/chromium,dednal/chromium.src,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk-efl,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,patrickm/chromium.src,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,crosswalk-project/chromium-crosswalk-efl,ChromiumWebApps/chromium,M4sse/chromium.src,patrickm/chromium.src,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,Fireblend/chromium-crosswalk,dednal/chromium.src,hgl888/chromium-crosswalk,Jonekee/chromium.src,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,mohamed--abdel-maksoud/chromium.src,anirudhSK/chromium,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,littlstar/chromium.src,dushu1203/chromium.src,dushu1203/chromium.src,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,Chilledheart/chromium,Just-D/chromium-1,Chilledheart/chromium,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,dednal/chromium.src,anirudhSK/chromium,dednal/chromium.src,Pluto-tv/chromium-crosswalk,littlstar/chromium.src,fujunwei/chromium-crosswalk,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,patrickm/chromium.src,dushu1203/chromium.src,hgl888/chromium-crosswalk,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,chuan9/chromium-crosswalk,dushu1203/chromium.src,ChromiumWebApps/chromium,ondra-novak/chromium.src,ChromiumWebApps/chromium,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk,axinging/chromium-crosswalk,jaruba/chromium.src,anirudhSK/chromium,dushu1203/chromium.src,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,M4sse/chromium.src