VR: Add a controller delegate for VrShellGl

A controller delegate is responsible for updating the controller, detect
gestures and produce a model to be sent to the Ui. This CL introduces 2
delegates for VrShellGl, one for production and one for testing.

This is the first step on a major refactoring on which VrShellGl
disappears in favor of a cross platform RenderLoop, composed of platform
specific delegates for each of its functions.

A revert to https://crrev.com/c/1121670 was needed to get the
chrome_public_test_vr_apk built properly.

Bug: 767282, 848494
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:linux_vr;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Ib68f975ce4e5e39fc7ebb5cf386b400f48039f4e
Reviewed-on: https://chromium-review.googlesource.com/1151623
Reviewed-by: agrieve <[email protected]>
Reviewed-by: Amirhossein Simjour <[email protected]>
Reviewed-by: Brian Sheedy <[email protected]>
Reviewed-by: Bill Orr <[email protected]>
Commit-Queue: Aldo Culquicondor <[email protected]>
Cr-Commit-Position: refs/heads/master@{#580178}
diff --git a/chrome/browser/vr/ui_interface.h b/chrome/browser/vr/ui_interface.h
index 8f095e1..2f17e12 100644
--- a/chrome/browser/vr/ui_interface.h
+++ b/chrome/browser/vr/ui_interface.h
@@ -7,6 +7,7 @@
 
 #include <memory>
 #include <queue>
+#include <vector>
 
 #include "base/memory/weak_ptr.h"
 #include "chrome/browser/vr/browser_ui_interface.h"
@@ -15,7 +16,10 @@
 #include "chrome/browser/vr/ui_element_renderer.h"
 #include "chrome/browser/vr/ui_input_manager.h"
 #include "chrome/browser/vr/ui_scene.h"
-#include "chrome/browser/vr/ui_test_input.h"
+
+namespace gfx {
+class Point3F;
+}
 
 namespace vr {
 
@@ -24,6 +28,7 @@
 struct ControllerModel;
 struct RenderInfo;
 struct ReticleModel;
+enum class UserFriendlyElementName;
 
 // This interface represents the methods that should be called by its owner, and
 // also serves to make all such methods virtual for the sake of separating a UI
@@ -75,9 +80,9 @@
   virtual void OnSwapContents(int new_content_id) = 0;
   virtual void OnContentBoundsChanged(int width, int height) = 0;
   virtual void AcceptDoffPromptForTesting() = 0;
-  virtual void PerformControllerActionForTesting(
-      ControllerTestInput controller_input,
-      std::queue<ControllerModel>& controller_model_queue) = 0;
+  virtual gfx::Point3F GetTargetPointForTesting(
+      UserFriendlyElementName element_name,
+      const gfx::PointF& position) = 0;
   virtual bool IsContentVisibleAndOpaque() = 0;
   virtual bool IsContentOverlayTextureEmpty() = 0;
   virtual void SetContentUsesQuadLayer(bool uses_quad_buffers) = 0;