Index: chrome/browser/android/vr_shell/vr_shell.h |
diff --git a/chrome/browser/android/vr_shell/vr_shell.h b/chrome/browser/android/vr_shell/vr_shell.h |
index 212f1feda085ed61190f8e811835ddfad3b968a8..00e8eb4836f55157b365d6354a5fc0ea41f5de5b 100644 |
--- a/chrome/browser/android/vr_shell/vr_shell.h |
+++ b/chrome/browser/android/vr_shell/vr_shell.h |
@@ -7,6 +7,7 @@ |
#include <jni.h> |
+#include <list> |
#include <memory> |
#include "base/android/jni_weak_ref.h" |
@@ -77,6 +78,10 @@ class VrShell : public device::GvrDelegate, content::WebContentsObserver { |
void SetWebVrMode(JNIEnv* env, |
const base::android::JavaParamRef<jobject>& obj, |
bool enabled); |
+ void SetWebVrSurface(JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& obj, |
+ const base::android::JavaParamRef<jobject>& surface, |
+ jint textureHandle); |
void ContentWebContentsDestroyed(); |
// Called when our WebContents have been hidden. Usually a sign that something |
@@ -95,16 +100,18 @@ class VrShell : public device::GvrDelegate, content::WebContentsObserver { |
// TODO(mthiesse): Clean up threading around GVR API. These functions are |
// called on the UI thread, but use GL thread objects in a non-threadsafe way. |
void SetWebVRSecureOrigin(bool secure_origin) override; |
- void SubmitWebVRFrame() override; |
- void UpdateWebVRTextureBounds(const gvr::Rectf& left_bounds, |
+ void SubmitWebVRFrame(int32_t surface_handle, device::mojom::VRPosePtr pose) override; |
+ void UpdateWebVRTextureBounds(uint32_t for_pose_index, |
+ const gvr::Rectf& left_bounds, |
const gvr::Rectf& right_bounds) override; |
gvr::GvrApi* gvr_api() override; |
- void SetGvrPoseForWebVr(const gvr::Mat4f& pose, uint32_t pose_num) override; |
- void SetWebVRRenderSurfaceSize(int width, int height) override; |
- gvr::Sizei GetWebVRCompositorSurfaceSize() override; |
+ void SetWebVRGvrPose(const gvr::Mat4f& pose, uint32_t pose_num, |
+ int64_t pose_time_nanos) override; |
+ void GetWebVRSurfaceHandle(int width, int height, const device::mojom::VRDisplay::GetSurfaceHandleCallback& callback) override; |
void SurfacesChanged(jobject content_surface, jobject ui_surface); |
void GvrDelegateReady(); |
+ void OnWebVRFrameSubmitted(int32_t surface_handle, uint32_t frame_index, double elapsed); |
void AppButtonPressed(); |
void ContentBoundsChanged( |