Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: chrome/browser/android/vr_shell/vr_shell_gl.cc

Issue 2808723003: VR: Sending the fling event to the right target (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell_gl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/vr_shell_gl.cc
diff --git a/chrome/browser/android/vr_shell/vr_shell_gl.cc b/chrome/browser/android/vr_shell/vr_shell_gl.cc
index 2f6ca1858794f98ba5b079eec8914441c31f2b4f..bd73b109b0bcf60417e0691ff689a181de76af9c 100644
--- a/chrome/browser/android/vr_shell/vr_shell_gl.cc
+++ b/chrome/browser/android/vr_shell/vr_shell_gl.cc
@@ -653,22 +653,21 @@ void VrShellGl::SendEventsToTarget(InputTarget input_target,
// Once the user starts scrolling send all the scroll events to this
// element until the scrolling stops.
case WebInputEvent::GestureScrollBegin:
- current_scroll_target = input_target;
- if (current_scroll_target != InputTarget::NONE) {
- SendGesture(current_scroll_target, std::move(movableGesture));
+ current_scroll_target_ = input_target;
+ if (current_scroll_target_ != InputTarget::NONE) {
+ SendGesture(current_scroll_target_, std::move(movableGesture));
}
break;
case WebInputEvent::GestureScrollEnd:
- if (current_scroll_target != InputTarget::NONE) {
- SendGesture(current_scroll_target, std::move(movableGesture));
+ if (current_scroll_target_ != InputTarget::NONE) {
+ SendGesture(current_scroll_target_, std::move(movableGesture));
}
- current_scroll_target = InputTarget::NONE;
mthiesse 2017/04/10 15:54:17 Don't we know have confusing state where we have a
mthiesse 2017/04/10 15:54:35 s/know/now
asimjour1 2017/04/12 17:35:01 current_fling_target_ is added.
break;
case WebInputEvent::GestureScrollUpdate:
case WebInputEvent::GestureFlingCancel:
case WebInputEvent::GestureFlingStart:
- if (current_scroll_target != InputTarget::NONE) {
- SendGesture(current_scroll_target, std::move(movableGesture));
+ if (current_scroll_target_ != InputTarget::NONE) {
+ SendGesture(current_scroll_target_, std::move(movableGesture));
}
break;
case WebInputEvent::GestureTapDown:
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell_gl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698