desktopCapture: avoid freezing at getting icon from an unresponsive window

We'll get window icons at starting the picker for each available window.
If there is any app window unresponsive, then the system call will block,
which will freeze the browser too.
This cl is to use SendMessageTimeout instead of original SendMessage, which
will returen when the target window is hung. (PS: we can still get its
icon by GetClassLong().)

Since the unresponsive window can't be captured, there is no need to show
it in the picker. It's reasonable to skip it in the window list, which will
be done in a seperate cl in webrtc.

Bug: 911110
Change-Id: Ib4e73d75d2012f75d7b969aea855a6de0b88a879
Reviewed-on: https://chromium-review.googlesource.com/c/1378670
Reviewed-by: Emircan Uysaler <emircan@chromium.org>
Commit-Queue: Weiyong Yao <braveyao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616826}
1 file changed