Add XRSession.viewerSpace and refactor XRFrame.getPose

Also check if XRFrame is an animation frame in XRFrame.getViewerPose

Instead of adding methods like GetInputSource() and ReturnTargetRay() to XRSpace,
there are 3 new classes derived from XRSpace: XRViewerSpace, XRTargetRaySpace, and
XRGripSpace. Instances of those classes can be passed as the first argument to
XRFrame.getPose to trigger the spec-required behavior for those special cases.
XRSpace has a virtual method called getPose which handles the core logic of
XRFrame.getPose. That avoids having a bunch of extra checks in the XRFrame.getPose
method itself.

Bug: 928466
Change-Id: Ib4eeafe8f88b1d2ea2c2685b0112cbbd27f1b653
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1526788
Commit-Queue: Jacob DeWitt <jacde@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Klaus Weidner <klausw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#642157}
23 files changed