Get Window Handle of Chrome Tab from Within Extension? Get Window Handle of Chrome Tab from Within Extension? google-chrome google-chrome

Get Window Handle of Chrome Tab from Within Extension?


If you have Spy++ you'll see that site titles stay consistent with tab window titles. You should definitely use that.

To eliminate title collisions simply call chrome.tabs.query() and chrome.tabs.update() from extension to save, change, and restore a tab's title. Then use GetCurrentProcess() and EnumWindows()/WindowEnumProc() to get child windows hierarchy and match your custom title. You will have to pass it to an EnumWindowsProc callback function.