forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VR: Check focus state browser-side before sending input to renderer.
Unfortunately we have to check focus twice before sending it to a VrDisplay, once in the browser to do view-level focus, then again in the renderer to do frame-level focus. This CL ensures browser-side focus before sending displayactivate events or head pose information to the WebVR page. This CL adds an argument to OnWebContentsFocused to let observers know which RenderWidgetHost gained/lost focus. It also implements GotFocus for Android, meaning OnWebContentsFocused will now be called on Android where it previously wasn't. LostFocus will now be called significantly less, as I've made it symmetric with GotFocus (which involved adding the fullscreen restriction to WebContentsImpl::RenderWidgetLostFocus that's present in WebContentsImpl::RenderWidgetGotFocus) Bug: 687411, 738239 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation Change-Id: Ibeee427d602d7fef8ce533669b45d9cc5f8ffa03 Reviewed-on: https://chromium-review.googlesource.com/565760 Commit-Queue: Michael Thiessen <mthiesse@chromium.org> Reviewed-by: Bo Liu <boliu@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Alex Moshchuk <alexmos@chromium.org> Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org> Cr-Commit-Position: refs/heads/master@{#488300}
- Loading branch information
Michael Thiessen
authored and
Commit Bot
committed
Jul 20, 2017
1 parent
2cda996
commit 896405d
Showing
55 changed files
with
430 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...st/data/android/webvr_instrumentation/html/generic_webvr_page_with_activate_listener.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!doctype html> | ||
<!-- | ||
Tests that scanning the Daydream View NFC tag on supported devices fires the | ||
vrdisplayactivate event | ||
--> | ||
<html> | ||
<head> | ||
<link rel="stylesheet" type="text/css" href="../resources/webvr_e2e.css"> | ||
</head> | ||
<body> | ||
<canvas id="webgl-canvas"></canvas> | ||
<script src="../../../../../../third_party/WebKit/LayoutTests/resources/testharness.js"></script> | ||
<script src="../resources/webvr_e2e.js"></script> | ||
<script> | ||
window.addEventListener("vrdisplayactivate", () => {}, false); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.