[vr] Register VR assets component from native
If running component updates in a background task we won't instantiate an activity. As a consequence we won't register the VR assets component and never get updates for it in the background. To solve this, register the component in native. The component gets only registered if the user has a Daydream headset paired. Checking this is expensive. Thus, we save whether the component should be registered in user preferences. At Chrome startup (which may happen when running an update task in the background) read this flag and conditionally register the component. Reading the flag took less than 1 ms in my tests. Change-Id: I1e9d0f6caab094307f8f3397c913cc1b7431d8fa Reviewed-on: https://chromium-review.googlesource.com/1132147Reviewed-by:Lei Zhang <thestig@chromium.org> Reviewed-by:
Tommy Nyquist <nyquist@chromium.org> Reviewed-by:
Joshua Pawlicki <waffles@chromium.org> Commit-Queue: Tibor Goldschwendt <tiborg@chromium.org> Cr-Commit-Position: refs/heads/master@{#575038}
Showing
Please register or sign in to comment