Index: chrome/browser/android/vr_shell/vr_shell.cc |
diff --git a/chrome/browser/android/vr_shell/vr_shell.cc b/chrome/browser/android/vr_shell/vr_shell.cc |
index 48a19ba7428bd18e1c01cffffc3b08cfa2120c9f..5ec4f6bb8699ca04b220345076d6b78ab7f8791c 100644 |
--- a/chrome/browser/android/vr_shell/vr_shell.cc |
+++ b/chrome/browser/android/vr_shell/vr_shell.cc |
@@ -375,6 +375,19 @@ void VrShell::UpdateController(const gvr::Vec3f& forward_vector) { |
} |
#endif |
if (html_interface_->GetMode() == UiInterface::Mode::WEB_VR) { |
+ // Process screen touch events for Cardboard button compatibility. |
+ if (touch_pending_) { |
mthiesse
2016/11/17 21:03:56
This will only work for cardboard, also check if t
klausw
2016/11/17 21:32:08
Done.
|
+ touch_pending_ = false; |
+ std::unique_ptr<WebGestureEvent> gesture(new WebGestureEvent()); |
+ gesture->sourceDevice = blink::WebGestureDeviceTouchpad; |
+ gesture->timeStampSeconds = |
+ (base::TimeTicks::Now() - base::TimeTicks()).InSecondsF(); |
+ gesture->type = WebInputEvent::GestureTapDown; |
+ gesture->data.tapDown.width = 0; |
+ gesture->data.tapDown.height = 0; |
+ content_input_manager_->ProcessUpdatedGesture(*gesture.get()); |
+ } |
+ |
return; |
} |