• Tibor Goldschwendt's avatar
    [vr] Register VR assets component from native · c8c23733
    Tibor Goldschwendt authored
    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: default avatarLei Zhang <thestig@chromium.org>
    Reviewed-by: default avatarTommy Nyquist <nyquist@chromium.org>
    Reviewed-by: default avatarJoshua Pawlicki <waffles@chromium.org>
    Commit-Queue: Tibor Goldschwendt <tiborg@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#575038}
    c8c23733
java_sources.gni 180 KB