New issue
Advanced search Search tips

Issue 687411 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug
Proj-XR

Blocking:
issue 738239



Sign in to add a comment

Determine VrDisplay focused state in browser process and filter unnecessary mojo message.

Project Member Reported by mthiesse@chromium.org, Feb 1 2017

Issue description

Context: https://codereview.chromium.org/2665293002/

We need to determing which VrDisplay is focused browser-side, and send the VSync provider to only the focused VrDisplay, rather than having the VrDisplay that thinks it has focus request it.

This will also help with issues like  issue 710863 
 
Description: Show this description
Labels: -Pri-3 M-61 Pri-2
Summary: Determine VrDisplay focused state in browser process and filter unnecessary mojo message. (was: Filter vrdisplayactivate mojo messages for vrDisplays that aren't focused.)
We should discuss longer term plan - for example does focus live with devices or in the browser process when devices may not live in the browser process?
Focus always lives in the browser process for security reasons.
Status: Started (was: Available)
Update on this: Only some parts of focus live in the browser process. We can do view-level focus in the browser process, but non-out-of-process frame-level focus can't be done in the browser process.

This means we need to check focus in two places - once in the browser, and once again in blink. Fun.
Blocking: 738239
Project Member

Comment 9 by bugdroid1@chromium.org, Jul 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/896405dba79929bde34c1473583fc4facc6436a9

commit 896405dba79929bde34c1473583fc4facc6436a9
Author: Michael Thiessen <mthiesse@chromium.org>
Date: Thu Jul 20 17:52:32 2017

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}
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/WebVrInputTest.java
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/chrome/browser/android/vr_shell/vr_shell_delegate.cc
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/chrome/browser/android/vr_shell/vr_shell_delegate.h
[add] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/chrome/test/data/android/webvr_instrumentation/html/generic_webvr_page_with_activate_listener.html
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/content/browser/android/content_view_core.cc
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/content/browser/frame_host/interstitial_page_impl.cc
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/content/browser/renderer_host/render_view_host_delegate_view.h
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/content/browser/renderer_host/render_view_host_impl.cc
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/content/browser/renderer_host/render_view_host_unittest.cc
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/content/browser/renderer_host/render_widget_host_impl.cc
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/content/browser/renderer_host/render_widget_host_impl.h
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/content/browser/renderer_host/render_widget_host_view_android.cc
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/content/browser/renderer_host/render_widget_host_view_android.h
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/content/browser/renderer_host/render_widget_host_view_aura.cc
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/content/browser/renderer_host/render_widget_host_view_mac.mm
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/content/browser/web_contents/web_contents_impl.cc
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/content/browser/web_contents/web_contents_impl.h
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/content/browser/web_contents/web_contents_view_android.cc
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/content/browser/web_contents/web_contents_view_android.h
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/content/browser/web_contents/web_contents_view_aura.cc
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/content/browser/web_contents/web_contents_view_aura.h
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/content/browser/web_contents/web_contents_view_child_frame.cc
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/content/browser/web_contents/web_contents_view_child_frame.h
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/content/browser/web_contents/web_contents_view_guest.cc
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/content/browser/web_contents/web_contents_view_guest.h
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/content/browser/web_contents/web_contents_view_mac.h
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/content/browser/web_contents/web_contents_view_mac.mm
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/content/public/browser/web_contents_observer.h
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/device/vr/android/gvr/gvr_delegate_provider.h
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/device/vr/android/gvr/gvr_device.cc
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/device/vr/android/gvr/gvr_device.h
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/device/vr/android/gvr/gvr_device_provider.cc
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/device/vr/android/gvr/gvr_device_provider.h
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/device/vr/openvr/openvr_device_provider.cc
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/device/vr/openvr/openvr_device_provider.h
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/device/vr/test/fake_vr_device.cc
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/device/vr/test/fake_vr_device.h
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/device/vr/test/fake_vr_display_impl_client.h
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/device/vr/vr_device.cc
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/device/vr/vr_device.h
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/device/vr/vr_device_manager.cc
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/device/vr/vr_device_manager.h
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/device/vr/vr_device_manager_unittest.cc
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/device/vr/vr_device_provider.h
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/device/vr/vr_display_impl.cc
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/device/vr/vr_display_impl.h
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/device/vr/vr_display_impl_unittest.cc
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/device/vr/vr_service_impl.cc
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/device/vr/vr_service_impl.h
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/device/vr/vr_service_impl_unittest.cc
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/ui/views/controls/webview/webview.cc
[modify] https://crrev.com/896405dba79929bde34c1473583fc4facc6436a9/ui/views/controls/webview/webview.h

Status: Fixed (was: Started)
Components: Blink>WebXR

Sign in to add a comment