Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2013)

Unified Diff: chrome/test/data/android/webvr_instrumentation/resources/webvr_boilerplate.js

Issue 2881233002: WebVR: lock focus while presenting to presenting window (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/android/webvr_instrumentation/resources/webvr_boilerplate.js
diff --git a/chrome/test/data/android/webvr_instrumentation/resources/webvr_boilerplate.js b/chrome/test/data/android/webvr_instrumentation/resources/webvr_boilerplate.js
index 8474593ccf35dd4363463d6a4cce98c32b924c3f..4d168c5da45aa2d69f13c35b9c80319fd4ee1c7b 100644
--- a/chrome/test/data/android/webvr_instrumentation/resources/webvr_boilerplate.js
+++ b/chrome/test/data/android/webvr_instrumentation/resources/webvr_boilerplate.js
@@ -9,6 +9,7 @@ var glAttribs = {
var gl = webglCanvas.getContext("webgl", glAttribs);
var vrDisplay = null;
var frameData = null;
+var onAnimationFrameCallback = null;
function onResize() {
if (vrDisplay && vrDisplay.isPresenting) {
@@ -40,6 +41,7 @@ function onAnimationFrame(t) {
vrDisplay.requestAnimationFrame(onAnimationFrame);
// If presenting, set canvas to blue. Otherwise, red.
if (vrDisplay.isPresenting) {
+ if (onAnimationFrameCallback) onAnimationFrameCallback();
vrDisplay.getFrameData(frameData);
gl.clearColor(0.0, 0.0, 1.0, 1.0);

Powered by Google App Engine
This is Rietveld 408576698