commit | d5c9de46626708f710bed9634e1c598d4ac506fa | [log] [tgz] |
---|---|---|
author | James Hollyer <[email protected]> | Tue Mar 10 19:02:45 2020 |
committer | Commit Bot <[email protected]> | Tue Mar 10 19:02:45 2020 |
tree | c2c297b60b37019ec6ca0fc37b94875331ddb40f | |
parent | a8f625602233adaf6fcd181946f3ecca28a1c6e8 [diff] [blame] |
Use Promise with RequestPointerLock calls The Pointer Lock API used to use an even based system. However, that is an outdated system and the events do not give an reason in failures. This change introduces a Promise to the call that adds reasons if the request is rejected. Bug: 1042289 Change-Id: I4c8cacac3db5d9dc8d2f3a09c663c2dfb5bdf89e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2069199 Commit-Queue: James Hollyer <[email protected]> Reviewed-by: Kinuko Yasuda <[email protected]> Reviewed-by: Kentaro Hara <[email protected]> Reviewed-by: Yuki Shiino <[email protected]> Cr-Commit-Position: refs/heads/master@{#748810}
diff --git a/content/shell/browser/shell.cc b/content/shell/browser/shell.cc index cb39064..46f509c2 100644 --- a/content/shell/browser/shell.cc +++ b/content/shell/browser/shell.cc
@@ -498,7 +498,8 @@ void Shell::RequestToLockMouse(WebContents* web_contents, bool user_gesture, bool last_unlocked_by_target) { - web_contents->GotResponseToLockMouseRequest(true); + web_contents->GotResponseToLockMouseRequest( + blink::mojom::PointerLockResult::kSuccess); } void Shell::CloseContents(WebContents* source) {