I'm creating an extension where I'd like to be able to figure out whether Chrome (as an application) has the user's focus, i.e. is it not minimized or in the background?
I believe there are javascript functions that check if a tab has focus, would injecting that code into every tab and seeing if any of the tabs return false work? That sounds like terrible peformance though, maybe just inject it into the "active" window using chrome.tabs.onUpdated
?
Or would this be do-able relatively easily using NPAPI? Would it require different code for different OSes?
Thanks!