[Mac] Fix Fullscreen Spoofing Issue on 10.13

On 10.13, -didEnteredFullscreen: is called before the
fullscreen transition actually gets finished. As a result,
AppKit ignores -toggleFullscreen: inside that runloop and will
print "not in a fullscreen state". To fix this issue, call
-toggleFullscreen: asynchronously.

Bug: 806162
Change-Id: If0d3559c68bfb38ba70da86894f1231f976ee403
Reviewed-on: https://chromium-review.googlesource.com/909080
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Sarah Chan <spqchan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535506}
3 files changed